open starts one and returns a
browser_id; each browser owns one or more targets (tabs), and every page
operation takes a browser_id plus an optional target_id (empty means the
current tab).
CLI and cURL examples assume $RT holds a browser-small runtime id (see
Overview). The
first browser opened in a runtime is b1.
Endpoints
Open, list, status, close
open starts a browser — headed on the display when the display is enabled,
headless otherwise; pass headless: true to force headless. status returns
{browser_id, state, targets}; list returns every browser in the runtime
({browsers: [...]} on the wire). close stops the browser.
b1 browser opened here.
Open parameters
Returns a
BrowserInfo.
The CLI’s open exposes --url and --headless.
Navigate and history
navigate loads a URL in a tab (empty target_id = current tab) and waits
per wait_until. back, forward, and reload take the same optional
target_id.
Returns
{url, title, status, navigated, settled} — status is the HTTP
status of the response. back, forward, reload, and activate return
the tab’s BrowserTargetInfo.
Tabs — targets and activate
targets lists a browser’s tabs. Pass url to open a new tab — the response’s
target_id is the new tab. A new tab does not become current on its own:
call activate to make it the default for calls without a target_id, or
pass target_id to any page call (snapshot, screenshot, actions, evaluate).
targets returns {target_id, targets} — target_id is the tab just opened
(empty when listing). The CLI lists tabs; open new ones through an SDK or
cURL.
Notes
sandbox.browser.goto(url)is the fast path — it opens a browser on first use, navigates it, and reuses it on later calls. Useopenwhen you need the id up front or a second browser.- A
browser_idstays valid untilcloseor the runtime is killed. Eachopenstarts a new instance with new tabs; withoutprofile_dirit also starts from an empty profile. - If the browser process dies,
statusreportsexitedand page calls return400— callopenagain rather than retrying. - Headless browsers still produce snapshots, screenshots, PDFs, and downloads — everything except a window on the display.