Automate
AI 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
post/automate
Request body
Example request
{
"geo_target": {
"country": "US"
},
"guardrails": "browse and extract data only, don't star or fork repositories",
"maxIterations": 50,
"maxValidationAttempts": 3,
"task": "Find the top 3 trending repositories on GitHub and extract their names, descriptions, and star counts",
"url": "https://github.com/trending"
}Response
Task executed successfully (always streaming)
Streaming Response using Server-Sent Events: All responses from the automate endpoint are streamed using Server-Sent Events.
Event Format:
- Each event starts with event: <type> followed by data: <JSON>
- Empty lines separate events
Event Types:
Task Events:
- start: Task initialization
- task:setup: Task configuration
- task:started: Task execution begins
- task:completed: Task finished successfully
- task:aborted: Task was terminated
- task:validated: Task completion validation
- task:validation_error: Validation failed
Agent Events:
- agent:processing: Agent thinking/planning
- agent:status: Status updates and plans
- agent:step: Processing step iterations
- agent:action: Actions being performed
- agent:reasoned: Agent reasoning output
- agent:extracted: Data extraction results
- agent:waiting: Agent waiting for operations
Browser Events:
- browser:navigated: Page navigation events
- browser:action_started: Browser action initiated
- browser:action_completed: Browser action finished
- browser:screenshot_captured: Screenshot taken
System Events:
- system:debug_compression: Debug compression info
- system:debug_message: Debug messages
Stream Control:
- complete: End of stream with results
- done: Stream termination
- error: Error occurred