Observed since 20 Oct, 19:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Typed synchronous and asynchronous Python SDK for the AdsPower Local API.
Typed synchronous and asynchronous clients for AdsPower Local API. The SDK covers profile, proxy and tag operations plus Selenium and Playwright browser attachment. It preserves the server response envelope and does not forward an AdsPower API key to CDP, WebDriver, or browser-version probes.
pip install adspower
pip install 'adspower[selenium]'
pip install 'adspower[playwright]'
pip install 'adspower[all]'
This repository includes the adspower-python skill for agents that write,
review, debug, or migrate code using this SDK. It captures the v3 API surface,
browser lifecycle, pagination, topology, rate-limit, and safety conventions.
Install it with:
npx skills add https://github.com/CrocoFactory/adspower/tree/master/skills/adspower-python
from adspower import AdsPowerClient, AdsPowerRatePolicy
with AdsPowerClient(
base_url="http://127.0.0.1:50325",
api_key="your-api-key",
rate_policy=AdsPowerRatePolicy.for_profile_count(200),
) as client:
created = client.profiles.create(name="example")
with client.browsers.session(created.profile_id, headless=True) as session:
with session.selenium() as driver:
driver.get("https://example.com")
print(driver.title)
client.profiles.delete(created.profile_id)
BrowserSession owns the AdsPower browser lifecycle. Exiting the session stops
the profile even if an attached driver raises an exception.
import asyncio
from adspower import AdsPowerRatePolicy, AsyncAdsPowerClient
async def main() -> None:
async with AsyncAdsPowerClient(
api_key="your-api-key",
rate_policy=AdsPowerRatePolicy.conservative(),
) as client:
async with await client.browsers.session("profile-id", headless=True) as session:
async with session.playwright() as browser:
context = browser.contexts[0]
page = context.pages[0] if context.pages else await context.new_page()
await page.goto("https://example.com")
print(await page.title())
asyncio.run(main())
By default, browser endpoints are used exactly as AdsPower returns them. This
avoids CDP WebSocket host-header failures on Local API installations. For a
remote or Docker topology where AdsPower returns unreachable loopback endpoints,
opt into browser_endpoint_policy="rewrite_loopback_to_api_host"; see
configuration.
from adspower import StoredProxyConfig
page = client.profiles.list(
name="shop",
name_filter="include",
tag_ids=["tag-id"],
tags_filter="include",
page_size=100, # AdsPower V2 allows 1–100
)
proxy_ids = client.proxies.create_many(
[StoredProxyConfig("http", "127.0.0.1", 8080, remark="example")]
)
for profile in client.profiles.iter_all(group_id="0"):
print(profile.profile_id)
groups.list() accepts pages up to 2000; proxies.create_many() accepts up to
500 proxy definitions. AdsPowerRatePolicy applies the documented 1 req/s
limits to profile/group listings, cookies, and UA generation in addition to the
global rate limit.
envelope = client.raw.request("POST", "/api/v2/future-endpoint", json={"x": 1})
Raw paths must be root-relative. Absolute URLs are rejected so the Local API authorization header cannot be sent to another host.
See the MIT License.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 3.0.0 | 28 Sept 2026 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c45e9966b40c9b2b076d922d62b7d3f67cb2a4e3b248ab3e54368227a258afc2