curl --request POST \
--url https://api.anchorbrowser.io/v1/task/run \
--header 'Content-Type: application/json' \
--header 'anchor-api-key: <api-key>' \
--data '
{
"taskId": "550e8400-e29b-41d4-a716-446655440000",
"version": "1",
"inputs": {
"ANCHOR_TARGET_URL": "https://example.com",
"ANCHOR_MAX_PAGES": "10"
}
}
'{
"data": {
"success": true,
"async": true,
"message": "<string>",
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionTime": 123,
"output": "<string>",
"error": "<string>",
"executionResultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Executes a task in a browser session. The task can be run with a specific version or the latest version. Optionally, you can provide an existing session ID or let the system create a new one.
curl --request POST \
--url https://api.anchorbrowser.io/v1/task/run \
--header 'Content-Type: application/json' \
--header 'anchor-api-key: <api-key>' \
--data '
{
"taskId": "550e8400-e29b-41d4-a716-446655440000",
"version": "1",
"inputs": {
"ANCHOR_TARGET_URL": "https://example.com",
"ANCHOR_MAX_PAGES": "10"
}
}
'{
"data": {
"success": true,
"async": true,
"message": "<string>",
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionTime": 123,
"output": "<string>",
"error": "<string>",
"executionResultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}API key passed in the header
Task identifier
Version to run (draft, latest, or version number)
Whether to run the task asynchronously.
Override browser configuration for this execution
Show child attributes
The URL to navigate to when the browser session starts. If not provided, the browser will load an empty page.
Proxy Documentation available at Proxy Documentation
Show child attributes
On change make sure to update the country_code.
Create a session with a residential proxy to access websites as if you're browsing from a computer in that country.
anchor_proxy, anchor_residential, anchor_mobile, anchor_gov Supported country codes ISO 2 lowercase
On change make sure to update the Proxy type.
af, al, dz, ad, ao, as, ag, ar, am, aw, au, at, az, bs, bh, bb, by, be, bz, bj, bm, bo, ba, br, bg, bf, cm, ca, cv, td, cl, co, cg, cr, ci, hr, cu, cy, cz, dk, dm, do, ec, eg, sv, ee, et, fo, fi, fr, gf, pf, ga, gm, ge, de, gh, gi, gr, gd, gp, gt, gg, gn, gw, gy, ht, hn, hu, is, in, ir, iq, ie, il, it, jm, jp, jo, kz, kw, kg, lv, lb, ly, li, lt, lu, mk, ml, mt, mq, mr, mx, md, mc, me, ma, nl, nz, ni, ng, no, pk, pa, py, pe, ph, pl, pt, pr, qa, ro, lc, sm, sa, sn, rs, sc, sl, sk, si, so, za, kr, es, sr, se, ch, sy, st, tw, tj, tg, tt, tn, tr, tc, ua, ae, us, uy, uz, ve, ye Region code for more specific geographic targeting. The city parameter can only be used when region is also provided.
City name for precise geographic targeting. Supported for anchor_proxy only. Can only be used when region is also provided.
Timeout configurations for the browser session.
Show child attributes
Maximum amount of time (in minutes) for the browser to run before terminating. Defaults to 20.
The amount of time (in minutes) the browser session waits for new connections after all others are closed before stopping. Defaults to 5.
Task executed successfully
Show child attributes
Whether the task executed successfully
Whether the task was executed asynchronously
Execution result message
Task identifier
Execution duration in milliseconds (only present in sync mode)
Task execution output (only present in sync mode)
Error message if execution failed (only present in sync mode)
Execution result identifier for tracking and polling (present in async mode)
Was this page helpful?