# getTaskResult

> POST /getTaskResult returns the result of an asynchronous task. Poll every 5 seconds, keep waiting on processing, read solution on ready, stop on errors; tasks run up to about 110 seconds, results are kept about 10 minutes, queries are free.

Source: https://docs.yescaptcha.com/en/api/get-task-result/ · Last verified: 2026-10-15

`getTaskResult` returns the result of an asynchronous task. Call it every 5 seconds after creating the task: keep waiting on `processing`, read `solution` on `ready`, and stop on an error. Queries are free no matter how many you make.

- POST `https://api.yescaptcha.com/getTaskResult` (Global endpoint)
- POST `https://cn.yescaptcha.com/getTaskResult` (China endpoint)

## Request fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `clientKey` | string | Yes | Your account key, the same one that created the task |
| `taskId` | string | Yes | The task ID returned by [`createTask`](https://docs.yescaptcha.com/en/api/create-task/) |

```json
{ "clientKey": "YOUR_CLIENT_KEY", "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006" }
```

## Response

| Situation | Response | What to do |
| --- | --- | --- |
| In progress | `{"errorId": 0, "status": "processing"}` | Check again in 5 seconds |
| Done | `{"errorId": 0, "status": "ready", "solution": {...}}` | Read `solution`; its fields are on each task type page |
| Not solved | `{"errorId": 1, "errorCode": "ERROR_CAPTCHA_UNSOLVABLE", ...}` | Already refunded; you can create a new task |
| Timed out | `{"errorId": 1, "errorCode": "ERROR_TASK_TIMEOUT", ...}` | Already refunded; you can create a new task |
| Unknown or expired task | `{"errorId": 1, "errorCode": "ERROR_TASKID_INVALID", ...}` | Stop querying this `taskId` |

A finished task (reCAPTCHA v2):

```json
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "03AGdBq25SxXT-pmSeBXjzScW-EiocHwwpwqtk1QXlJnGnU..."
  }
}
```

## Rules

-   **Poll every 5 seconds.** Repeated queries for the same `taskId` within 5 seconds return `processing` right away.
-   **A task runs for at most about 110 seconds** (180 to 220 seconds for a few types); then it returns `ERROR_TASK_TIMEOUT` and is refunded. Give up waiting in your code after about 3 minutes.
-   **Results are kept for about 10 minutes**, after which the `taskId` returns `ERROR_TASKID_INVALID`. Use results promptly: tokens expire sooner (about 120 seconds for reCAPTCHA).
-   **Stop on errors.** After `errorId: 1`, querying the same `taskId` again returns the same result; from the third query of a finished task, `errorDescription` ends with a hint to stop polling. `ERROR_TASKID_INVALID` counts toward the [automatic pause](https://docs.yescaptcha.com/en/api/rate-limits/) (only the first time per ID).
-   Query on the same endpoint you created the task on.
-   `getTaskResult` is not affected by automatic pauses: tasks created before a pause can still be queried.
