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/jsonRequest fields
| Field | Type | Required | Description |
|---|---|---|---|
clientKey | string | yes | Your API key. |
taskId | string | yes | The id returned by createTask. Must belong to the same key. |
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
errorId | number | always | 0 when the call succeeded, 1 when it did not. Branch on this, not on the HTTP status. |
errorCode | string | on error | Machine-readable code from the error reference. |
errorDescription | string | on error | Human-readable explanation. Log it; do not parse it. |
status | string | usually | processing, ready or failed. |
solution.token | string | when ready | The CAPTCHA token, for every family except the Cloudflare challenge. |
solution.cookies | object | when ready | Cookie name to value, for Cloudflare challenge tasks. Contains cf_clearance. |
solution.userAgent | string | when ready | The exact User-Agent that produced the solution. Replay with it. |
cost | string | when ready | What this solve cost you in USD, after your volume discount. |
createTime | number | when ready | Unix seconds when the task was created. |
endTime | number | when ready | Unix seconds when the task resolved. |
{
"errorId": 0,
"status": "processing"
}{
"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
}{
"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
}{
"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.