SablePower Help
All help pages

Help Scripts and API

Scripts and the Local API

Let your scripts open and close your team's profiles on this computer: switch on the Local API, copy the key, and see what it supports.

The Local API lets your scripts open and close your team's profiles on this computer, and list them. Puppeteer, Playwright, Selenium or plain web requests all work. Only programs on this computer can reach it, and only with its key. It answers only while SablePower is open and signed in to your team: otherwise every call but /status says to sign in first.

Switch it on#

  1. Settings (the gear at the bottom left), Data tab, the part Local API.
  2. Tick Turn on the Local API. It says Listening at http://127.0.0.1:50325.
  3. Leave the Port at 50325 unless another program on this computer already uses it: then type another, from 1024 to 65535, and press Use this port.

Nothing needs a restart, and the setting is remembered. The API answers while SablePower runs.

The key#

The API key is in the same place: Copy copies it, Show shows it. Scripts send it as Authorization: Bearer <key>. SablePower always asks for the key.

New key, pressed twice, makes a new one: scripts still using the old key are refused from that moment. Do it if the key was shared by mistake.

An example#

In Python with Playwright: open a profile, visit a page, close it again.

import requests
from playwright.sync_api import sync_playwright

API = "http://127.0.0.1:50325"
H = {"Authorization": "Bearer PASTE_THE_KEY_HERE"}

r = requests.get(f"{API}/api/v1/browser/start",
                 params={"user_id": "PROFILE_ID"}, headers=H).json()
assert r["code"] == 0, r["msg"]
with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(r["data"]["ws"]["puppeteer"])
    page = browser.contexts[0].new_page()
    page.goto("https://example.com")
requests.get(f"{API}/api/v1/browser/stop",
             params={"user_id": "PROFILE_ID"}, headers=H)

Which profile: ids and numbers#

  • user_id or profile_id is the profile's ID (the ID column of the list; click it to copy).
  • serial_number or profile_no is the No. column. Every call that names a profile takes it instead of the id. It is per computer: a team profile can have another number on a colleague's computer. The Custom no. is the same for everyone, but scripts cannot start a profile by it.
  • group_id is a project; "0" means no project.

What is supported#

CallWhat it does
/statusAnswers when the API is on.
browser/start, browser-profile/startOpens the profile for automation; answers the Puppeteer and Selenium addresses and the debugging port.
browser/stop, browser-profile/stopCloses it; its session is saved as from the window.
browser/active, local-activeWhether a profile is open, and every open profile.
user/create, browser-profile/createRefused since 1.6.2: profiles are made in the team, in the window.
user/update, browser-profile/updateChange name, notes, platform, tabs, proxy, login, cookies, time zone and languages of a profile kept on this computer from before.
user/delete, browser-profile/deleteTo the Trash, up to 100 at once.
user/list, browser-profile/listThe list, with filters, sorting and pages.
user/regroupMove profiles to a project.
delete-cacheClears caches, never cookies or storage.
browser-profile/cookiesThe profile's cookies.
group/list, updateProjects. group/create is refused: projects are made in the window.
proxy-list/create, update, delete, listYour saved proxies.

GET and POST both work everywhere, and parameters can be in the address or in a JSON body.

Fingerprints from a script#

SablePower profiles are measured real computers, so a script's fingerprint_config is matched, not copied. Time zone, languages, location, screen, CPU cores, memory and the WebGL renderer are set when SablePower has that value for that computer; canvas 0 is the real canvas. Anything else is ignored, and an update never changes the computer a profile is.

Team profiles#

  • Team profiles are listed and can be started while the SablePower window is running and signed in to the team: the window opens them exactly as its Open button does, with the team's hold, and saves them when they close.
  • Starting one needs the right Export cookies and the bundle in its project, because automation can read every cookie. VAs normally do not have it.
  • Only start, stop, active and the lists work on team profiles. Create, update and delete them in the window, where the team's rights are checked.
  • Profiles kept on this computer only, from before 1.6.2, are listed and can be changed, but they do not open: move them to the team in the window (Move to the team).

Good to know#

  • The key is always required.
  • A profile opened from the window has no automation port: close it, then start it through the API.
  • Delete goes to the Trash, where the profile can be restored.
  • "Cache" means disk caches only, never the login.
  • Some launch switches are refused: the ones that would change the proxy, the profile folder, the debugging port, the language or the user agent, and so undo what keeps a profile apart.
  • Not available: ssh proxies, profile sharing, tags, browser kernel and patch calls, cloud-active, stop-all. Selenium needs a chromedriver of your own, or Selenium 4.6 and later, which fetch one themselves.
  • Errors come as code -1 with a message. A missing or wrong key is refused.

Scripts written for another browser#

The calls, their parameters and their answers follow AdsPower's Local API, so a script written for AdsPower runs here with one change: the key. It may keep its address, http://local.adspower.net:50325, which also points to this computer. Where SablePower answers differently is under Good to know.

Who can reach it#

Only programs on this computer, and only with the key. Web pages cannot use it, even ones that know the key: a request from a page is refused.

AI assistants#

AI assistants on the left connects Claude, Cursor or another assistant that speaks MCP, so you can ask in plain words: "open every profile tagged warm and check it is still logged in". It works with profiles kept on this computer only, not yet with team profiles, and those no longer open since 1.6.2; it answers only while SablePower is signed in to your team. It never sees proxy passwords or notes, and it makes no profiles: they are made in the team, in the window.