SolveHub

CAPTCHA types · akamai

Akamai Bot Manager API | Browser Session Testing

Obtain Akamai Bot Manager browser session cookies (_abck, bm_sz) with the SolveHub API. Request fields, proxy requirements, cURL example, result format and error codes.

For authorized QA automation and browser integration. Use only on websites and workflows you have permission to test.

Create this task type by sending the JSON below to POST /v1/tasks with Authorization: Bearer <API_KEY>, Content-Type: application/json and an Idempotency-Key. Check availability in live prices first; see the quick start for the full create-and-poll flow.

Requires the Akamai-protected page websiteURL and an HTTP proxy. The optional ApiURL (note the casing) is the POST target within the solving session and must be a full HTTP(S) URL; this type does not accept a custom useragent field.

Browser selection

Optional useragent selects browser family, platform and major version for Chrome/Chromium or Firefox. An unavailable version causes a task failure. Omit it to use the default browser. Replay cookies with the same proxy and the actual solution.useragent, rather than assuming the requested string is the returned identity.

Request fields

The top-level type and task are required; all task.* paths below are inside the task object. Field names are case-sensitive. Length limits are measured in UTF-8 bytes.

Field Type Required Limits Description
type String Yes Always akamai Platform task type.
task JSON object Yes ≤ 7 MiB Task parameters for this type.
task.type String No Must be akamai if provided Kept for compatibility with the legacy request format; can be omitted in new integrations.
task.websiteURL HTTP(S) URL Yes ≤ 2048 bytes Full URL of the target page to solve, without credentials.
task.ApiURL HTTP(S) URL No ≤ 2048 bytes POST target to request within the browser session; the field name is case-sensitive, and the response body is not returned as the solve result.
task.useragent String No ≤ 512 bytes Browser selector; replay cookies with the returned solution.useragent.
task.proxyType String Yes http only Proxy protocol; must be http when provided.
task.proxyAddress String Yes ≤ 256 bytes Proxy IP or hostname; must be provided together with proxyPort.
task.proxyPort String Yes 1–5 bytes, value 1–65535 Proxy port; must be a quoted numeric string.
task.proxyLogin String No ≤ 256 bytes Username, if the proxy requires authentication; must not be provided without the address and port.
task.proxyPassword String No ≤ 256 bytes Password, if the proxy requires authentication; must not be provided without the address and port.

Create request example

{
  "type": "akamai",
  "task": {
    "websiteURL": "https://example.com/protected",
    "proxyType": "http",
    "proxyAddress": "203.0.113.10",
    "proxyPort": "8080"
  }
}

cURL call

Replace the key, site details, and proxy in the example with your actual values; keep the Idempotency-Key unchanged for the same business request.

curl -sS -X POST 'https://www.tiam.codes/v1/tasks' \
  -H 'Authorization: Bearer sh_REPLACE_ME' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: example-akamai-0001' \
  --data-binary @- <<'JSON'
{
  "type": "akamai",
  "task": {
    "websiteURL": "https://example.com/protected",
    "proxyType": "http",
    "proxyAddress": "203.0.113.10",
    "proxyPort": "8080"
  }
}
JSON

Create response and polling

A successful create returns HTTP 202, and status is usually queued initially. Save the taskId and call GET /v1/tasks/{taskId} about every 2–3 seconds. The soft processing time limit for this type is 180 seconds; after the soft limit the task may enter uncertain, and the results of accepted tasks can still be verified. Clients should not blindly recreate the task with a new Idempotency-Key.

Result fields

Read solution only when status=completed; the table below lists common fields, and the actual fields are determined by the task response.

Field Type How to read
solution.cookies Object Target site session cookies, such as _abck, ak_bmsc, bm_sz.
solution.headers Object or null, optional Browser headers to reuse in subsequent requests; may be null.
solution.useragent String User-Agent to use for subsequent requests.

The result usually contains solution.cookies and solution.useragent, and may contain solution.headers (which may also be null). Cookies may include _abck, ak_bmsc, bm_sz; the actual result is authoritative. Example result: {"cookies":{"_abck":"EXAMPLE_COOKIE"},"headers":null,"useragent":"Mozilla/5.0 ..."}. When using the result, keep the same proxy and the returned User-Agent.

Failures and troubleshooting

ApiURL and websiteURL serve different purposes, and field names are case-sensitive; the result's headers may be null, so your code should check its type first.

Common errors for create requests are 400 INVALID_TASK, 402 INSUFFICIENT_BALANCE, 429 TASK_LIMIT_EXCEEDED, and 503 TYPE_UNAVAILABLE. When a created task fails, the public error code is TASK_FAILED or TASK_TIMEOUT; uncertain corresponds to TASK_UNCERTAIN. See the Platform API reference for details.

The processing window starts after task creation is confirmed; queue waiting does not consume it. The current node timeout is approximately 75 seconds; the platform allows a 180-second soft window for transport and result polling.

Supported User Agents

Related documentation

Start with cURLCreate account

Last updated: