Execute code in a browser session
Browser Endpoints
Execute Browser Code
Execute code in a sandboxed browser environment.
POST
Execute code in a browser session
Headers
Request Body
Response
Example Request
Example Response (Success)
Example Response (Error)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The browser session ID
Body
application/json
Code to execute in the browser sandbox
Required string length:
1 - 100000Language of the code to execute. Use node for JavaScript or bash for agent-browser CLI commands.
Available options:
python, node, bash Execution timeout in seconds
Required range:
1 <= x <= 300Response
Code executed successfully
Standard output from the code execution
Standard output (alias for stdout)
Standard error output from the code execution
Exit code of the executed process
Whether the process was killed due to timeout
Error message if the code raised an exception

