Screenshots & Actions
Browser actions
Drive a page with a sequence of clicks, typing, scrolling, and waits.
The actions array runs a sequence of browser actions against the page before returning. The API navigates to
your url first, then executes each action in order. An array can contain 1 to 50 actions.
{
"url": "https://example.com/search",
"actions": [
{ "type": "write", "text": "wireless headphones" },
{ "type": "press", "key": "Enter" },
{ "type": "wait", "selector": ".results" },
{ "type": "scroll", "direction": "down", "amount": 2000 },
{ "type": "screenshot", "full_page": true }
]
}Action types
Each action is an object with a type and its own fields.
type | Fields | Description |
|---|---|---|
navigate | url | Navigate to a URL. |
click | selector, all? | Click an element. Set all: true to click every match. |
write | text | Type text into the focused element. |
press | key | Press a key (e.g. Enter, Tab). |
hover | selector | Hover over an element. |
scroll | direction? (up/down/left/right), amount?, selector? | Scroll the page or an element. |
selectOption | selector, value (string or string array) | Select option(s) in a <select>. |
wait | milliseconds? (≤ 30000), selector?, timeout? (≤ 30000) | Wait for a duration, or for a selector to appear. |
screenshot | full_page?, quality? (1–100) | Capture a screenshot. Max one per request. |
Response
{
"statusCode": 200,
"headers": { "content-type": ["text/html"] },
"finalUrl": "https://example.com/search?q=wireless+headphones",
"data": "<!doctype html>…",
"screenshot": { "format": "png", "base64": "iVBORw0KGgo…" }
}| Field | Description |
|---|---|
finalUrl | The URL after all actions ran (navigations and redirects applied). |
data | The final page's HTML — always present. |
screenshot | Present only if a screenshot action ran: { format, base64 }. |
error | Present if the sequence failed. |
failedActionIndex | 0-based index into your actions array of the action that failed. |
Access control applies to every step
Each navigation an action triggers — including clicks that follow links and script-driven redirects — is re-checked against your organization's access rules. See Access control & KYC.