Skip to content
CaptchAPI
API reference

getTaskResult

Poll a task until it is ready, then read the token or cookies.

Returns the current state of a task. Call it repeatedly until status is ready or the response carries an error. It is free at any frequency inside the rate limit, and polling never affects the solve.

POST https://api.captchapi.com/getTaskResult
content-type: application/json

Request fields

FieldTypeRequiredDescription
clientKeystringyesYour API key.
taskIdstringyesThe id returned by createTask. Must belong to the same key.

Response fields

FieldTypeRequiredDescription
errorIdnumberalways0 when the call succeeded, 1 when it did not. Branch on this, not on the HTTP status.
errorCodestringon errorMachine-readable code from the error reference.
errorDescriptionstringon errorHuman-readable explanation. Log it; do not parse it.
statusstringusuallyprocessing, ready or failed.
solution.tokenstringwhen readyThe CAPTCHA token, for every family except the Cloudflare challenge.
solution.cookiesobjectwhen readyCookie name to value, for Cloudflare challenge tasks. Contains cf_clearance.
solution.userAgentstringwhen readyThe exact User-Agent that produced the solution. Replay with it.
coststringwhen readyWhat this solve cost you in USD, after your volume discount.
createTimenumberwhen readyUnix seconds when the task was created.
endTimenumberwhen readyUnix seconds when the task resolved.
Still solving
{
  "errorId": 0,
  "status": "processing"
}
Solved — token families
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "token": "0.f3KdXk9v…",
    "type": "turnstile",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
  },
  "cost": "0.0006",
  "createTime": 1767225600,
  "endTime": 1767225604
}
Solved — Cloudflare challenge returns cookies, not a token
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "type": "cloudflare_challenge",
    "cookies": {
      "cf_clearance": "kL9x…-1767225604-1.2.1.1-Wm…"
    },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
  },
  "cost": "0.0012",
  "createTime": 1767225600,
  "endTime": 1767225605
}
Failed and refunded
{
  "errorId": 1,
  "errorCode": "ERROR_TIMEOUT",
  "errorDescription": "The solver did not produce a token within 120s. You have been refunded.",
  "status": "failed"
}

Results are kept for 5 minutes after a task resolves, then discarded. Read the solution and store it yourself if you need it longer — we do not retain solved tokens.