Skip to content

Usage

Local API (Automation Scripts)

When the AdsPower desktop client is running, it exposes a Local API on http://localhost:50325. Use this to start and stop browser profiles from any script or agent without touching the GUI.

Start a Browser Profile

bash
curl "http://localhost:50325/api/v1/browser/start?user_id=YOUR_PROFILE_ID"

A successful response returns the WebSocket debugger URL and the local proxy port that Playwright or Puppeteer can connect to:

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "ws": {
      "puppeteer": "ws://127.0.0.1:PORT/devtools/browser/...",
      "selenium": "127.0.0.1:PORT"
    },
    "debug_port": "PORT",
    "webdriver": "path/to/chromedriver"
  }
}

Stop a Browser Profile

bash
curl "http://localhost:50325/api/v1/browser/stop?user_id=YOUR_PROFILE_ID"

Connect Playwright to a Running Profile

python
from playwright.sync_api import sync_playwright

ws_url = "ws://127.0.0.1:PORT/devtools/browser/..."  # from start response

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(ws_url)
    page = browser.contexts[0].pages[0]
    page.goto("https://example.com")
    print(page.title())
    browser.close()

CLI (npm Package)

After npm install -g adspower-browser and setting ADS_API_KEY:

Start the CLI runtime

bash
ads start -k YOUR_API_KEY
# or if ADS_API_KEY is set:
ads start

Open a browser profile

bash
ads open-browser YOUR_PROFILE_ID

Close a browser profile

bash
ads close-browser YOUR_PROFILE_ID

List all profiles

bash
ads get-browser-list '{}'

Create a new profile (no proxy, default group)

bash
ads create-browser '{"group_id":"0","user_proxy_config":{"proxy_soft":"no_proxy"}}'

Check which profiles are active

bash
ads get-browser-active YOUR_PROFILE_ID

Refresh fingerprint for a profile

bash
ads new-fingerprint YOUR_PROFILE_ID

Get cookies for a profile

bash
ads get-profile-cookies YOUR_PROFILE_ID

Delete profiles (batch, max 10)

bash
ads delete-browser '{"profile_id":["ID1","ID2"]}'

Tab Completion

bash
ads complete zsh        # zsh
ads complete bash       # bash
ads complete powershell # PowerShell

Full API Reference

See the Postman collection for all endpoints (profile CRUD, proxy management, group management, member management):

https://documenter.getpostman.com/view/45822952/2sB34hEzQH