Skip to main content
POST
/
v1
/
browsers
/
{id}
/
eval
Eval
curl --request POST \
  --url https://api.example.com/v1/browsers/{id}/eval/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "expression": "<string>"
}
'
{
  "success": true,
  "data": {}
}

Description

Executes a JavaScript expression in the context of the current page and returns the result.

Authentication

Authorization: Bearer YOUR_API_KEY

Path Parameters

id
string
required
UUID of the browser.

Request Body

expression
string
required
The JavaScript expression to evaluate.

Response

success
boolean
Whether the evaluation completed successfully.
data
object
The return value of the evaluated expression.

Example

curl -X POST https://api.rustybrowser.com/v1/browsers/550e8400-e29b-41d4-a716-446655440000/eval/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "expression": "document.title" }'