Page Actions
API Reference
Page Actions
Drive the browser — navigate, click, type, extract, wait, scroll
POST
Page Actions
Page Actions
Every running session exposes action endpoints that execute real CDP commands inside the browser. All actions require session authentication and return the standard{ "data": ... } envelope.
Navigate
POST /v1/sessions/{id}/navigate
Absolute URL to navigate to.
Lifecycle event to wait for:
load, domcontentloaded, or none. (wait is accepted as an alias.)Navigation timeout in seconds.
Response
Execute Script
POST /v1/sessions/{id}/execute
JavaScript evaluated in the page context. Promises are awaited; the resolved value is returned.
Response
Click
POST /v1/sessions/{id}/click
CSS selector of the element to click.
Type
POST /v1/sessions/{id}/type
CSS selector of the input element.
Text to type. The element’s value is replaced and
input/change events are dispatched.Extract
POST /v1/sessions/{id}/extract
CSS selector of elements to extract.
text (innerText) or html (outerHTML).Truncate the combined content to this many characters.
Response
Wait For Selector
POST /v1/sessions/{id}/wait
CSS selector to wait for.
Maximum wait in milliseconds. Returns
504 on timeout.Scroll
POST /v1/sessions/{id}/scroll
up, down, top, or bottom.Pixels to scroll for
up/down.Errors
| Status | Meaning |
|---|---|
400 | Missing/invalid parameters (e.g. no selector). |
404 | Session not found or already destroyed. |
502 | The browser rejected the command (element missing, script exception). |
504 | wait timed out before the selector appeared. |