Skip to main content
POST
/
v1
/
browsers
/
{id}
/
find-node
Find Node
curl --request POST \
  --url https://api.example.com/v1/browsers/{id}/find-node/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "selector": "<string>"
}
'
{
  "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

Searches the current page for a DOM element matching the given CSS selector and returns its node reference. Use the returned reference with other node-based commands.

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 find.

Response

node_id
integer
The node ID of the matched element. Use this with Fetch Text and other node-based commands.

Example

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