Browser Control
Direct browser automation endpoints. All require a valid session ID.
Navigation
/api/sessions/:sessionId/navigateNavigate to a URL. Waits for the page to load before returning.
Body Parameters
urlstringrequiredTarget URL (must include protocol)waitUntilstringLoad event: load, domcontentloaded, networkidle (default: load)Response
{
"success": true,
"title": "Example Domain",
"url": "https://example.com/"
}/api/sessions/:sessionId/go-backNavigate back in browser history. Uses Playwright goBack() in cloud, chrome.tabs.goBack() locally.
Body Parameters
waitUntilstringLoad event: load, domcontentloaded (default: load)timeoutnumberMax wait in ms (default: 30000)Response
{
"success": true,
"url": "https://example.com/page1",
"title": "Page 1",
"navigated": true
}/api/sessions/:sessionId/go-forwardNavigate forward in browser history.
Body Parameters
waitUntilstringLoad event: load, domcontentloaded (default: load)timeoutnumberMax wait in ms (default: 30000)Response
{
"success": true,
"url": "https://example.com/page2",
"title": "Page 2",
"navigated": true
}Interaction
/api/sessions/:sessionId/clickClick an element on the page.
Body Parameters
selectorstringrequiredCSS selector of the element to clickResponse
{
"success": true,
"selector": "button.submit"
}/api/sessions/:sessionId/typeType text character by character (triggers keyboard events).
Body Parameters
selectorstringrequiredCSS selector of the input elementtextstringrequiredText to typeResponse
{
"success": true,
"selector": "input[name=search]",
"text": "hello world"
}/api/sessions/:sessionId/fillFill an input field instantly (sets value directly, faster than type).
Body Parameters
selectorstringrequiredCSS selector of the input elementvaluestringrequiredValue to fillResponse
{
"success": true,
"selector": "input[name=email]",
"value": "[email protected]"
}/api/sessions/:sessionId/pressPress a keyboard key (e.g. Enter, Tab, Escape, ArrowDown).
Body Parameters
keystringrequiredKey name (e.g. "Enter", "Tab", "Escape")Response
{
"success": true,
"key": "Enter"
}/api/sessions/:sessionId/selectSelect an option from a dropdown element.
Body Parameters
selectorstringrequiredCSS selector of the select elementvaluestringrequiredOption value to selectResponse
{
"success": true,
"selector": "select#country",
"value": "US"
}/api/sessions/:sessionId/hoverHover over an element to trigger hover styles or tooltips.
Body Parameters
selectorstringrequiredCSS selector of the elementResponse
{
"success": true,
"selector": ".tooltip-trigger"
}/api/sessions/:sessionId/scrollScroll the page or scroll a specific element into view.
Body Parameters
selectorstringCSS selector to scroll into view (if provided, x/y are ignored)xnumberHorizontal scroll position in pixels (default: 0)ynumberVertical scroll position in pixels (default: 0)Response
{
"success": true
}Data Extraction
/api/sessions/:sessionId/screenshotCapture a screenshot. Optionally stores it as an artifact.
Body Parameters
typestring"png", "jpeg", or "webp" (default: png)fullPagebooleanCapture full scrollable page (default: false)uploadbooleanStore as artifact (default: true)qualitynumberImage quality 0-100 (for jpeg/webp, default: 80)Response
{
"success": true,
"format": "png",
"size": 145320,
"artifactId": "obj-abc123",
"publicUrl": "https://storage.example.com/..."
}/api/sessions/:sessionId/extractExtract page content in various formats.
Body Parameters
typestringrequired"html", "text", "dom", or "evaluate"selectorstringExtract from specific element (for html/text/dom)scriptstringJavaScript expression (for type=evaluate)Response
{
"success": true,
"type": "text",
"content": "Example Domain\nThis domain is for..."
}/api/sessions/:sessionId/evaluateExecute JavaScript in the browser and return the result.
Body Parameters
scriptstringrequiredJavaScript expression or function bodyResponse
{
"success": true,
"result": "Example Domain"
}/api/sessions/:sessionId/snapshotGet the accessibility tree (aria snapshot) of the current page. Lightweight alternative to DOM extraction.
Response
{
"success": true,
"ariaSnapshot": "- document: Example Domain\n - heading \"Example Domain\"\n - paragraph: This domain is..."
}/api/sessions/:sessionId/waitWait for an element, navigation, or timeout.
Body Parameters
selectorstringWait for element to appeartimeoutnumberMax wait in ms (default: 5000)statestring"visible", "hidden", "attached" (default: visible)Response
{
"success": true,
"waited": "selector",
"selector": ".modal",
"durationMs": 230
}/api/sessions/:sessionId/wait-for-textWait for specific text to appear on the page. High-value for agents waiting for loading states, confirmation messages, or dynamic content.
Body Parameters
textstringrequiredText to wait for (max 1000 chars)timeoutnumberMax wait in ms (default: 30000, max: 60000)Response
{
"success": true,
"found": true
}Dialog Handling
/api/sessions/:sessionId/dialogCheck for pending browser dialogs (alert, confirm, prompt) and view dialog history.
Response
{
"success": true,
"hasDialog": true,
"dialog": { "type": "confirm", "message": "Are you sure?" },
"history": [
{ "type": "alert", "message": "Welcome!", "action": "auto-dismissed", "timestamp": "..." }
]
}/api/sessions/:sessionId/dialogAccept or dismiss a pending browser dialog. Dialogs auto-dismiss after 30 seconds if not handled.
Body Parameters
acceptbooleanAccept (true) or dismiss (false). Default: truepromptTextstringText to enter for prompt dialogsResponse
{
"success": true,
"action": "accepted"
}Page Cache (Stateless)
One-shot URL fetch with no browser session. Auth: same as all other endpoints (x-api-key). Cloud mode consumes credits (HTML/text: 1, screenshot: 3). Local mode is free. Force local-only with options.sensitive: true or header X-Page-Cache-Sensitive: true.
/api/cache/htmlFetch rendered HTML for a URL without a browser session. Accept: text/html returns raw HTML; Accept: application/json (default) returns JSON envelope.
Body Parameters
urlstringrequiredTarget URL (must be http/https, no private IPs)options.providerstring"cloud" (default) or "local" — "auto" returns 400; cloud uses ScrapingDog when configuredoptions.sensitivebooleanForce local provider; URL never sent to third partiesoptions.waitForstring|numberload | domcontentloaded | networkidle (default) | positive msoptions.timeoutnumberNavigation timeout ms (default: 30000, max: 60000)options.proxyobject{ server: string, username?: string, password?: string } — outbound proxy for the page fetchoptions.javascriptbooleanEnable JavaScript execution (default: true)options.userAgentstringCustom User-Agent string (max 2000 chars)options.headersobjectAdditional HTTP request headersoptions.adBlockingbooleanOnly true is accepted (false is rejected by schema); ad blocking always activeoptions.textFormatstringOnly "plain" is accepted (additional formats not yet implemented)Response
{
"success": true,
"html": "<!doctype html>...",
"metadata": {
"provider": "cloud",
"url": "https://example.com",
"fetchedAt": "2026-04-16T10:00:00Z"
}
}/api/cache/textExtract plain text for a URL without a browser session. Accept: text/plain returns raw text; Accept: application/json (default) returns JSON envelope.
Body Parameters
urlstringrequiredTarget URLoptionsobjectSame options as /api/cache/htmlResponse
{
"success": true,
"text": "Example Domain\nThis domain is for use in illustrative examples...",
"metadata": { "provider": "cloud", "url": "https://example.com" }
}/api/cache/screenshotCapture a PNG screenshot for a URL without a browser session. Accept: image/png returns raw PNG bytes; Accept: application/json (default) uploads to R2 and returns artifactUrl.
Body Parameters
urlstringrequiredTarget URLoptions.fullPagebooleanCapture full scrollable page (default: false)options.maxDimensionnumberResize longest edge to N pixels (default: 1280)options.viewportobject{ width, height } viewport before captureoptions.providerstring"cloud" (default) or "local"Response
{
"success": true,
"artifactUrl": "https://pub-xxx.r2.dev/page-cache-abc123.png",
"metadata": {
"provider": "cloud",
"url": "https://example.com",
"objectId": "page-cache-abc123"
}
}