**POST** `https://api.captchasonic.com/getTaskResult`

Also available as `GET /getTaskResult` and `GET /getResponse`.

## Request body

| Field | Type | Description |
|---|---|---|
| `apiKey` | `string` | Your API key from the [dashboard](https://captchasonic.com/app). |
| `taskId` | `string` | The `taskId` returned by [`createTask`](/docs/start/create-task). |

```json
{
  "apiKey": "sonic_xxxxxxxxxxxxxxxxxxxxxxxx",
  "taskId": "FgIcYXBtKR6E"
}
```

## Response

While the task is still being solved you get the task back with its current `status`:

```json
{
  "errorId": 0,
  "status": "idle",
  "taskId": "FgIcYXBtKR6E"
}
```

Keep polling every 1–2 seconds. When the task is finished, the response carries the solution for that captcha type, see the captcha-specific pages for the exact fields.

## Example

  
**cURL**

```bash
curl -s https://api.captchasonic.com/getTaskResult \
  -H 'content-type: application/json' \
  -d '{"apiKey":"sonic_xxx","taskId":"FgIcYXBtKR6E"}'
```
  
  
**JavaScript**

```js
const res = await fetch("https://api.captchasonic.com/getTaskResult", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ apiKey: "sonic_xxx", taskId }),
});
const result = await res.json();
```
  
  
**Python**

```python
r = requests.post("https://api.captchasonic.com/getTaskResult",
                  json={"apiKey": "sonic_xxx", "taskId": task_id})
result = r.json()
```
