Skip to main content
POST
/
v1
/
sessions
/
{id}
/
navigate
Page Actions
curl --request POST \
  --url https://api.example.com/v1/sessions/{id}/navigate \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "wait_until": "<string>",
  "timeout": 123,
  "script": "<string>",
  "selector": "<string>",
  "text": "<string>",
  "kind": "<string>",
  "max_length": 123,
  "timeout_ms": 123,
  "direction": "<string>",
  "amount": 123
}
'

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. POST /v1/sessions/{id}/navigate
url
string
required
Absolute URL to navigate to.
wait_until
string
default:"load"
Lifecycle event to wait for: load, domcontentloaded, or none. (wait is accepted as an alias.)
timeout
number
default:"30"
Navigation timeout in seconds.
Response
{ "data": { "status": "complete", "url": "https://example.com/", "title": "Example" } }

Execute Script

POST /v1/sessions/{id}/execute
script
string
required
JavaScript evaluated in the page context. Promises are awaited; the resolved value is returned.
Response
{ "data": { "result": "Example Domain" } }

Click

POST /v1/sessions/{id}/click
selector
string
required
CSS selector of the element to click.

Type

POST /v1/sessions/{id}/type
selector
string
required
CSS selector of the input element.
text
string
required
Text to type. The element’s value is replaced and input/change events are dispatched.

Extract

POST /v1/sessions/{id}/extract
selector
string
default:"body"
CSS selector of elements to extract.
kind
string
default:"text"
text (innerText) or html (outerHTML).
max_length
number
Truncate the combined content to this many characters.
Response
{ "data": { "selector": "h1", "content": ["Example Domain"] } }

Wait For Selector

POST /v1/sessions/{id}/wait
selector
string
required
CSS selector to wait for.
timeout_ms
number
default:"30000"
Maximum wait in milliseconds. Returns 504 on timeout.

Scroll

POST /v1/sessions/{id}/scroll
direction
string
default:"down"
up, down, top, or bottom.
amount
number
default:"500"
Pixels to scroll for up/down.

Errors

StatusMeaning
400Missing/invalid parameters (e.g. no selector).
404Session not found or already destroyed.
502The browser rejected the command (element missing, script exception).
504wait timed out before the selector appeared.