API reference

Drive real cloud browsers in plain English: extract structured data, run autonomous agents, open live sessions you can watch, and schedule reusable jobs.

Authentication

Base URL https://api.browseit.live. Every request sends your key as a Bearer token: find and rotate your key on your dashboard (rotating it immediately invalidates the old one).

Authorization: Bearer byd_xxxxxxxxxxxxxxxxxxxx

Usage (sessions, browser-minutes, tasks, LLM spend) is metered per key and capped by your plan quota. Errors return JSON { "error": "…", "code": "…" }: branch on code.

Machine-readable: openapi.json (import into Postman, generate a client) · llms.txt (for AI coding tools).

Limits & behavior

tasks / agentSynchronous. A single call runs on the live-command budget (~95s), then returns. For longer or unattended work, save it as a Job (runs up to 5 hours).
sessionsKeep-alive: ping /heartbeat ~every 60s or the session is reaped. There is a hard max-minutes cap per session.
request bodyMax 1 MB. Cookie injection max 200 cookies.
jobsRun-now returns immediately (202); the run schedules on a background runner and starts within a few minutes. Poll the run for status.
quotaSessions, browser-minutes, and LLM spend count against your plan; exceeding it returns 429.

Quickstart

The fastest path is a one-shot task: point at a URL, describe what you want, get JSON back.

curl https://api.browseit.live/v1/tasks \
  -H "Authorization: Bearer $BROWSEIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "instructions": "the top 3 story titles and their points",
    "schema": {
      "type": "object",
      "properties": { "stories": { "type": "array", "items": {
        "type": "object",
        "properties": { "title": {"type":"string"}, "points": {"type":"number"} }
      } } }
    }
  }'

Engine v2

The new browser engine, rolling out: send "engine": "v2". A task runs up to 25 steps in one fresh browser and returns every step's result; a session gives you a live browser over one connection, or raw access for Playwright. Credit and usage: GET /v1/me.

POST/v1/tasks

Run steps in a fresh browser. Synchronous, up to 15 minutes.

enginerequired"v2"Use the v2 engine.
stepsrequiredarrayUp to 25. type: navigate {url}, back, forward, reload, wait {ms}, act {instruction}, observe {instruction}, extract {instruction, schema?} (required fields must be filled or the step fails), agent {instruction, maxSteps?}, screenshot {format?, fullPage?}, content, pdf, save {kind?: png|pdf|dom} (into Files), ip, evaluate {expression} (page JavaScript, JSON result), viewport {width, height}, tabs, tab_new {url?}, tab_switch {tabId}, tab_close {tabId}, save_login {domain, name?}.
browser"light" | "full"light: fastest (default for plain tasks). full: closest to a real Chrome (default with a saved login).
credentialIdstringStart signed in with a saved login.
proxyIdstringYour own proxy instead of ours.
continueOnErrorbooleanRun every step even after one fails.

Returns { ok, sessionId, results: [{ type, ok, data | error, ms }], finalUrl, usage, timing }

curl https://api.browseit.live/v1/tasks \
  -H "Authorization: Bearer $BROWSEIT_KEY" -H "Content-Type: application/json" \
  -d '{ "engine": "v2", "continueOnError": true, "steps": [
        { "type": "navigate", "url": "https://news.ycombinator.com" },
        { "type": "extract", "instruction": "the top 3 story titles",
          "schema": { "type": "object", "properties": { "titles": { "type": "array", "items": { "type": "string" } } }, "required": ["titles"] } },
        { "type": "screenshot", "format": "png" },
        { "type": "evaluate", "expression": "document.title" } ] }'
# -> { "ok": true, "results": [ { "type": "navigate", "ok": true, ... }, ... ], "usage": {...}, "timing": {...} }
POST/v1/sessions

Open a live browser. Returns a single-use connectUrl (valid 60 s) for the live view. With cdp: true (raw-browser grant needed), connect Playwright to the /cdp form of that link.

enginerequired"v2"Use the v2 engine.
urlstringStart page.
browser"light" | "full"As for tasks.
credentialIdstringStart signed in with a saved login.
cdpbooleanRaw access for Playwright: one shared context, downloads go to your Files.

Returns 201 { session: { id, status }, connectUrl, expiresInSec: 60 }

// Playwright, connected to a Browseit browser (needs the raw-browser grant on your account)
const r = await fetch('https://api.browseit.live/v1/sessions', { method: 'POST',
  headers: { Authorization: 'Bearer ' + process.env.BROWSEIT_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ engine: 'v2', cdp: true }) }).then((x) => x.json());
const browser = await chromium.connectOverCDP(r.connectUrl.replace('/s?t=', '/cdp?t='));
const page = await browser.contexts()[0].newPage(); // one shared context: newContext() is refused
await page.goto('https://example.com');
POST/v1/sessions/:id/connect

A fresh connectUrl for the same browser. One connection lasts up to about 55 minutes; reconnect and the browser resumes from its last save point (cookies and open tabs, saved every minute). An idle browser ends after 5 minutes.

Returns { session, connectUrl, expiresInSec: 60 }

GET/v1/me

Your plan, usage (all time and this month) and credit: { period: "monthly" | "lifetime", quotaUsd, spentUsd, remainingUsd, resetsAt }.

Tasks

One-shot browser actions in plain English. Point at a URL, say what you want, get a result or structured JSON back: no session to manage.

POST/v1/tasks

Run a single task. Provide exactly one of act, instructions+schema, or observe.

urlstringPage to start on. Optional when sessionId is given.
actstringDo something ("click Sign in", "add to cart").
instructionsstringWhat to extract; pair with schema for typed JSON.
schemaJSON SchemaShape of the data to return (with instructions).
observestringAsk what actions are available on the page.
sessionIdstringRun inside an existing live session instead of a one-off.
modelstringOverride the model (must be allowed: see /v1/models). Models marked free are free: rate-limited, prompts may be logged by the provider; avoid for private/signed-in data. If a free model is busy or fails, the step runs on the paid fallback model; each AI step result says which model answered.

Returns { ok, data, usage, taskId }: synchronous; runs on the live-command budget (~95s). For longer work, use a Job.

curl https://api.browseit.live/v1/tasks \
  -H "Authorization: Bearer $BROWSEIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "instructions": "the top 3 story titles and their points",
    "schema": {
      "type": "object",
      "properties": { "stories": { "type": "array", "items": {
        "type": "object",
        "properties": { "title": {"type":"string"}, "points": {"type":"number"} }
      } } }
    }
  }'
POST/v1/tasks

Act example: perform an action and return what happened.

curl https://api.browseit.live/v1/tasks \
  -H "Authorization: Bearer $BROWSEIT_KEY" -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/pricing", "act": "add the cheapest plan to the cart" }'
GET/v1/tasks/:id

Fetch a past task/agent run by id (the taskId a run returns).

Agent

Autonomous multi-step automation: give a goal, the agent plans and executes the steps itself (navigate, click, type, extract) until it is done.

POST/v1/agent

Run an autonomous agent against a live session.

sessionIdrequiredstringThe live session to drive.
instructionrequiredstringThe goal, in plain English.
urlstringNavigate here first.
credentialIdstringA saved password login the agent may use to sign in.
maxStepsnumberCap the planning loop (default 12, max 20).

Returns { ok, result: { success, summary, data, steps, stoppedReason, finalUrl, file? }, usage }: synchronous, ~95s budget.

curl https://api.browseit.live/v1/agent \
  -H "Authorization: Bearer $BROWSEIT_KEY" -H "Content-Type: application/json" \
  -d '{
    "sessionId": "sess_…",
    "instruction": "find the cheapest direct flight NYC->LON next Friday and return the price + airline"
  }'

Live sessions

Open a real cloud browser you can watch and drive. The liveUrl is a token-gated live view you can embed in an iframe.

POST/v1/sessions

Open a live browser. Returns a session id + token-gated liveUrl.

urlstringLand on this page immediately (optional).
contextIdstringReuse a saved login profile (see Contexts).
credentialIdstringAttach a saved login (cookies apply at start; password lets the agent sign in).
proxyIdstringEgress through one of your proxies instead of the default.
cookiesarrayOne-off cookie set to inject (max 200): alternative to a saved login.

Returns { session: { id, liveUrl, startedAt, … }, cookieReport? }

curl https://api.browseit.live/v1/sessions \
  -H "Authorization: Bearer $BROWSEIT_KEY" -H "Content-Type: application/json" \
  -d '{ "contextId": "ctx_…", "proxyId": "px_…" }'
# -> { "session": { "id": "sess_…", "liveUrl": "https://…?token=…" } }
GET/v1/sessions

List your sessions (live + ended) with duration and cost.

GET/v1/sessions/:id

Fetch one session.

POST/v1/sessions/:id/navigate

Navigate the browser to a URL.

urlrequiredstringDestination (http/https).
POST/v1/sessions/:id/heartbeat

Keep the session alive: ping about every 60s (idle sessions are reaped).

GET/v1/sessions/:id/stats

Live bandwidth + performance + proxy status.

GET/v1/sessions/:id/ip

The egress IP the session is using (verify your proxy).

GET/v1/sessions/:id/content

Current page HTML + visible text + title + URL.

GET/v1/sessions/:id/screenshot

PNG of the current page (?full=1 for full height).

GET/v1/sessions/:id/pdf

PDF render of the current page.

DELETE/v1/sessions/:id

Release the session.

Jobs

Save a sequence of steps as a reusable automation and run it on demand. Runs execute on a background runner (up to 5 hours): poll the run history for results.

POST/v1/jobs

Create a job.

namerequiredstringA label for the job.
stepsrequiredarray[{ instruction, url? }] run in order.
contextIdstringRun signed in against a saved login profile.
credentialIdstringAttach a saved login.
proxyIdstringEgress through one of your proxies.
# 1) create a saved job
curl https://api.browseit.live/v1/jobs \
  -H "Authorization: Bearer $BROWSEIT_KEY" -H "Content-Type: application/json" \
  -d '{ "name": "Daily HN digest",
        "steps": [ { "instruction": "list the top 5 story titles", "url": "https://news.ycombinator.com" } ] }'
# 2) run it (returns a runId; poll /v1/jobs/:id/runs)
curl -X POST https://api.browseit.live/v1/jobs/JOB_ID/run -H "Authorization: Bearer $BROWSEIT_KEY"
GET/v1/jobs

List your jobs.

GET/v1/jobs/:id

Fetch one job.

PATCH/v1/jobs/:id

Update name / steps / attachments / enabled.

DELETE/v1/jobs/:id

Delete a job.

PATCH/v1/jobs/:id

Set a schedule (cron) to run automatically.

schedule{ cron, tz }5-field cron + IANA timezone, e.g. { "cron": "0 8,20 * * *", "tz": "America/Toronto" }.
enabledbooleanA disabled job never fires on its schedule.
POST/v1/jobs/:id/run

Run now: returns a runId (202). Poll the run for status + results.

Returns { runId, status }

GET/v1/jobs/:id/runs

Run history: status, per-step results, timing.

GET/v1/jobs/:id/runs/:runId

Fetch one run directly (poll this after Run-now).

Returns { run: { status, stepResults[], browserMs, … } }

Contexts

Login-once browser profiles. Sign in during a session, save it as a context, and reuse it so future sessions/jobs start already authenticated.

GET/v1/contexts

List your saved contexts.

POST/v1/contexts

Create a context.

namerequiredstringA label (often the site name).
GET/v1/contexts/:id

Fetch one context.

PATCH/v1/contexts/:id

Rename a context.

DELETE/v1/contexts/:id

Delete a context + its saved profile.

Saved logins

A write-only credential vault. Store a site login as a password or a cookie set; attach it to a session or job. Secrets are encrypted at rest and never returned.

GET/v1/credentials

List saved logins (never returns secrets).

POST/v1/credentials

Save a login.

typerequired"password" | "cookie"Credential kind.
domainrequiredstringThe site it applies to.
username / passwordstringFor a password login.
cookiesarrayFor a cookie login (Playwright/Chrome cookie JSON).
PATCH/v1/credentials/:id

Replace fields (secrets are replace-only, never shown).

DELETE/v1/credentials/:id

Delete a saved login.

Proxies

Bring your own residential/ISP proxies. Attach one to a session or job and it egresses through your IP; the password is encrypted and never returned.

GET/v1/proxies

List your proxies (never returns the password).

POST/v1/proxies

Add a proxy.

hostrequiredstringProxy hostname (must resolve to a public address).
portrequirednumber1–65535.
username / passwordstringProxy auth (optional for IP-authed).
labelstringA name to recognize it by.
PATCH/v1/proxies/:id

Update a proxy (password replace-only).

DELETE/v1/proxies/:id

Delete a proxy.

Files

Artifacts your tasks and jobs export: screenshots, PDFs, page DOM, extracted JSON.

GET/v1/files

List exported files.

GET/v1/files/:id

File metadata.

GET/v1/files/:id/download

A signed download URL.

DELETE/v1/files/:id

Delete a file.

Webhooks

Get notified on job + session events. We POST a signed JSON payload to your URL; verify it with the HMAC secret shown once at creation.

GET/v1/webhooks

List your webhook subscriptions.

POST/v1/webhooks

Subscribe a URL to events. Returns the signing secret ONCE.

urlrequiredstringHTTPS endpoint to POST to.
eventsstring[]Any of run.finished, run.failed, session.ended. Empty = all.

Returns { webhook, secret } : signature header: X-Browseit-Signature: t=<ts>,v1=HMAC_SHA256(secret, "<ts>.<body>")

DELETE/v1/webhooks/:id

Remove a webhook.

Account

Your plan, usage, keys, and available models.

GET/v1/me

Plan, quotas, and usage-to-date (sessions, browser-minutes, tasks, LLM spend).

GET/v1/activity

Recent tasks + sessions.

GET/v1/models

The models you may choose from + the default.

GET/v1/keys

List your API keys.

POST/v1/keys/rotate

Rotate your API key (the old one stops working).

Recipes

Common end-to-end patterns. Each composes the primitives above.

Scrape behind a login

Save a login once, then attach it to a session or job so it starts signed in.

# 1) open a session with a saved login attached
curl https://api.browseit.live/v1/sessions -H "Authorization: Bearer $BROWSEIT_KEY" \
  -H "Content-Type: application/json" -d '{ "credentialId": "cred_…", "url": "https://app.example.com/reports" }'
# 2) extract with the agent (already authenticated)
curl https://api.browseit.live/v1/agent -H "Authorization: Bearer $BROWSEIT_KEY" \
  -H "Content-Type: application/json" -d '{ "sessionId": "sess_…", "instruction": "export this month's revenue as JSON" }'
Monitor a page daily (unattended)

Save the steps as a Job, schedule it, and get a webhook when it finishes.

# create a scheduled job (8am daily): the run output is saved to Files each day
curl https://api.browseit.live/v1/jobs -H "Authorization: Bearer $BROWSEIT_KEY" \
  -H "Content-Type: application/json" -d '{
    "name": "Daily price check",
    "steps": [ { "instruction": "extract the price as JSON", "url": "https://shop.example.com/item/42" } ],
    "schedule": { "cron": "0 8 * * *", "tz": "America/Toronto" }, "enabled": true }'
# subscribe to completion events
curl https://api.browseit.live/v1/webhooks -H "Authorization: Bearer $BROWSEIT_KEY" \
  -H "Content-Type: application/json" -d '{ "url": "https://your-app.com/hooks", "events": ["run.finished"] }'
Embed the live browser in your app

Open a session and drop its liveUrl (already token-gated) into an iframe. It stays live until you DELETE the session or it hits its time cap.

const { session } = await createSession();   // POST /v1/sessions
<iframe src={session.liveUrl} allow="clipboard-read; clipboard-write" />
Verify your proxy egress
curl https://api.browseit.live/v1/sessions -H "Authorization: Bearer $BROWSEIT_KEY" \
  -H "Content-Type: application/json" -d '{ "proxyId": "px_…" }'
curl https://api.browseit.live/v1/sessions/SESS_ID/ip -H "Authorization: Bearer $BROWSEIT_KEY"   # -> your proxy's IP

Errors & status codes

codemeaning
200 / 201 / 202Success (202 = accepted, still running: e.g. a job run).
400Bad request: missing/invalid field, or an unsupported combination.
401Missing or invalid API key.
403Not allowed (e.g. a feature disabled for your account).
404Not found (or not yours).
409Conflict (e.g. a context already in use).
429Quota reached: you hit a plan limit.
502 / 503Upstream/browser issue or no free capacity: retry shortly.

Errors return JSON { "error": "…" }. Prefer the playground to feel out prompts before wiring the API.