Automate

Run Browser Automation Task

POST
/automate

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
AuthorizationBearer <token>

Bearer token for API authentication

In: header

Request Body

application/json

Request body with optional geotargeting

data?

JSON data to provide context for form filling or complex tasks

geo_target?

Optional geotargeting parameters for proxy requests

guardrails?string

Safety constraints for execution

interactive?boolean

Enable interactive mode to allow human-in-the-loop input during task execution

Defaultfalse
maxIterations?integer

Maximum task iterations

Range1 <= value <= 100
Default50
maxValidationAttempts?integer

Maximum validation attempts

Range1 <= value <= 10
Default3
task*string

The task description in natural language

trusted_hostnames?array<string>

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.

unsafe_mode?boolean

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.

Defaultfalse
url?string

Starting URL for the task

Formaturi

Response 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"