Skip to main content
POST
/
v1
/
task
/
run
/
{taskName}
Run Task by Name
curl --request POST \
  --url https://api.anchorbrowser.io/v1/task/run/{taskName} \
  --header 'Content-Type: application/json' \
  --header 'anchor-api-key: <api-key>' \
  --data '{
  "sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "taskSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "overrideBrowserConfiguration": {
    "initial_url": "<string>",
    "recording": {
      "active": true
    },
    "proxy": {
      "active": true,
      "type": "anchor_proxy",
      "country_code": "af",
      "region": "<string>",
      "city": "<string>"
    },
    "timeout": {
      "max_duration": 123,
      "idle_timeout": 123
    },
    "live_view": {
      "read_only": true
    }
  },
  "inputs": {}
}'
{
  "data": {
    "success": true,
    "message": "<string>",
    "taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "executionTime": 123,
    "output": "<string>",
    "error": "<string>"
  }
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Path Parameters

taskName
string
required

The name of the task to run

Example:

"web-scraper"

Body

application/json
sessionId
string<uuid>

Optional existing session ID to use

taskSessionId
string<uuid>

Optional task-specific session ID

overrideBrowserConfiguration
object

Override browser configuration for this execution

inputs
object

Environment variables for task execution (keys must start with ANCHOR_)

Response

Task executed successfully

data
object
I