Run Browser Automation Task
Execute AI-powered browser automation tasks using natural language with optional geotargeting. This endpoint always streams responses using Server-Sent Events (SSE).
Streaming Response:
- All responses are streamed using Server-Sent Events (
text/event-stream) - Real-time progress updates and results as they're generated
Geotargeting:
- Optionally specify a country code for geotargeted browsing
Use Cases:
- Web scraping and data extraction
- Form filling and interaction
- Navigation and information gathering
- Multi-step web workflows
- Content analysis from web pages
Authorization
BearerAuth Bearer token for API authentication
In: header
Request Body
application/json
Request body with optional geotargeting
JSON data to provide context for form filling or complex tasks
Optional geotargeting parameters for proxy requests
Safety constraints for execution
Enable interactive mode to allow human-in-the-loop input during task execution
falseMaximum task iterations
1 <= value <= 10050Maximum validation attempts
1 <= value <= 103The task description in natural language
TrustedHostnames lists hostnames where the action firewall is bypassed for fills and submissions. WARNING: on listed hosts, prompt injection from page content can drive the agent to fill and submit any field, including personal and credential data. Use only for sites you fully trust to receive your data.
UnsafeMode disables the action firewall entirely. WARNING: prompt injection from page content can then cause the agent to submit your data, including credentials, personal information, and conversation context, to attacker-controlled forms. Only enable for trusted, controlled environments.
falseStarting URL for the task
uriResponse Body
text/event-stream
text/event-stream
text/event-stream
text/event-stream
text/event-stream
text/event-stream
curl -X POST "https://example.com/automate" \ -H "Content-Type: application/json" \ -d '{ "guardrails": "browse and extract only, don\'t interact with repositories", "task": "Find the top 3 trending repositories and extract their names, descriptions, and star counts", "url": "https://github.com/trending" }'"event: start\ndata: {\"task\": \"Find the top 3 trending repositories\", \"url\": \"https://github.com/trending\"}\n\nevent: agent:processing\ndata: {\"operation\": \"Creating task plan\", \"hasScreenshot\": false}\n\nevent: browser:navigated\ndata: {\"title\": \"Trending - GitHub\", \"url\": \"https://github.com/trending\"}\n\nevent: agent:extracted\ndata: {\"extractedData\": \"[{\\\"name\\\": \\\"awesome-ai\\\", \\\"stars\\\": \\\"45.2k\\\"}]\"}\n\nevent: task:completed\ndata: {\"success\": true, \"finalAnswer\": \"Top 3 trending repos extracted\"}\n\nevent: complete\ndata: {\"success\": true}\n\nevent: done\ndata: {}\n"