Docs
Local Automation API
HTTP API on your own Mac for scripts: start and stop profiles, drive Chrome profiles over CDP, read and set cookies.
- Address:
http://127.0.0.1:58889(this Mac only; the port can be changed) - Turn on: Settings → Local Automation API
- Auth:
Authorization: Bearer <token>(the token is shown in the same place) - Plans: Starter and higher
- The panel must be open, unlocked and signed in
- At most 30 starts per minute
/status,/cookies,waitandurlneed OFF Browser 2.1.6 or newer
Quick start (Python)
import os, time, requests
BASE = "http://127.0.0.1:58889/v1/profiles/PROFILE_ID"
H = {"Authorization": f"Bearer {os.environ['OFF_API_TOKEN']}"}
requests.post(f"{BASE}/start", json={"wait": False, "url": "https://example.com"}, headers=H).raise_for_status()
while True:
st = requests.get(f"{BASE}/status", headers=H).json()
if st["state"] == "failed":
raise RuntimeError(st["error"])
if st["state"] == "running" and st["ready"]:
break
time.sleep(1)
print(st["debugPort"], st["webSocketDebuggerUrl"])
requests.post(f"{BASE}/stop", headers=H)
Quick start (Node)
const base = 'http://127.0.0.1:58889/v1/profiles/PROFILE_ID';
const headers = { Authorization: `Bearer ${process.env.OFF_API_TOKEN}`, 'Content-Type': 'application/json' };
const res = await fetch(`${base}/start`, { method: 'POST', headers, body: JSON.stringify({ debug_port: true }) });
const started = await res.json();
if (!started.ok) throw new Error(started.error);
// puppeteer.connect({ browserWSEndpoint: started.webSocketDebuggerUrl })
// chromium.connectOverCDP(started.webSocketDebuggerUrl) // Playwright
await fetch(`${base}/stop`, { method: 'POST', headers });
Start, status, stop
| Method | Path | Notes |
|---|---|---|
| POST | / | see the body below |
| GET | / | state, ready, error, debugPort, webSocketDebuggerUrl |
| POST | / | saves the session; / is the same |
| GET | / | running profiles |
| GET | / | no token |
Body of start, all optional:
debug_port—trueor a port number (Chrome)wait—falseanswers202at once; follow/status. By default the call answers when the start is over, which takes minutes for an iPhoneurlorurls—https://pages to open, up to 6. Chrome opens the first one, Safari all of them, iPhone does not take them
state is stopped, starting, running or failed. For an iPhone ready becomes true when its screen can be used. A second start while the first is in progress joins it.
Cookies
| Method | Path | Notes |
|---|---|---|
| GET | / | cookies, live (read from the running browser or not) |
| PUT | / | { "cookies": [...] }: JSON list, or a Netscape cookies.txt as text |
- Chrome: adds and updates cookies; at once when running, otherwise on the next start
- Safari: stored for the next start; stop the profile first (
409 PROFILE_RUNNING) - iPhone: at once when running, otherwise on the next start
applied and pending in the answer say which happened. An empty list is refused.
Profiles, folders, tags, proxies
| Method | Path |
|---|---|
| GET / POST | / |
| GET / PATCH / DELETE | / (delete moves to the trash) |
| POST | / |
| GET / POST | /, /, / |
| DELETE | / |
| PATCH / DELETE | / |
| GET / PATCH / DELETE | / |
Plan limits apply as in the panel. Short aliases: POST /api/profiles/start and /stop with { "uuid": "..." }, GET /api/profiles/active.
Engines
CDP (debugPort, webSocketDebuggerUrl) works for Chrome profiles. Safari and iPhone profiles start, stop and exchange cookies through this API, without CDP.
Selenium attaches with debuggerAddress. Take the ChromeDriver of the engine's version (http://127.0.0.1:<debugPort>/json/version), not of the profile's User-Agent. ChromeDriver leaves cdc_… variables that a site can see; a client that talks CDP directly does not use ChromeDriver.
Closing the last Chrome tab stops the profile.
Errors
| Code | Meaning |
|---|---|
| 400 | bad request or the start failed: see error, code |
| 401 | no or wrong token |
| 403 | see code: PLAN_REQUIRED (Free), PLAN_UNCONFIRMED (no connection to the cloud for a while), LICENSE_EXPIRED, a plan limit, or the panel is locked or signed out |
| 404 | no such profile or path |
| 409 | PROFILE_TRASHED, PROFILE_RUNNING, PROFILE_STARTING |
| 429 | too many starts per minute |