Skip to main content
POST
/
v1
/
browsers
/
{id}
/
wait-for-node
Wait For Node
curl --request POST \
  --url https://api.example.com/v1/browsers/{id}/wait-for-node/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "selector": "<string>",
  "timeout_ms": 123
}
'
{
  "node_id": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.rustybrowser.com/llms.txt

Use this file to discover all available pages before exploring further.

Description

Blocks until a DOM element matching the given CSS selector appears on the page, or until the timeout is reached. Useful after navigation or dynamic content loads.

Authentication

Authorization: Bearer YOUR_API_KEY
Self-hosted open source deployments do not require authentication.

Path Parameters

id
string
required
The browser ID returned from Create Session.

Request Body

selector
string
required
CSS selector for the element to wait for.
timeout_ms
integer
Maximum time to wait in milliseconds. Defaults to 5000.

Response

node_id
integer
The node ID of the matched element once it appears.

Example

curl -X POST https://api.rustybrowser.com/v1/browsers/exc-b9534e98-c3ce-4d1b-9671-b563ac66adc3/wait-for-node/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "selector": "#example", "timeout_ms": 5000 }'