# Get the answer of a job

> Fetch the answer of a job. Poll about once per second until the job is ready.

`GET https://api.solvecha.com/v1/recognition/{type}`


Returns the answer of a job that you created before. Use the same captcha type in the path as when you created the job. While the job is not ready, the response is error `14` (HTTP 409): wait one second and ask again.

## Authorization

Send your API key as `Authorization: Bearer YOUR_API_KEY`. Other ways are the `key` field of the body and the `key` query parameter. See [Authentication](https://solvecha.com/docs/authentication.md).

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `type` | string | Yes | The captcha type of the job. One of `recaptcha`, `textcaptcha`, `geetest`, `funcaptcha`, `funcaptcha_match`. |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes | The job id from the create response. Up to 64 characters. |
| `key` | string | No | Your API key, if you do not send it in the `Authorization` header. |

## Example request


**cURL**

```bash
curl "https://api.solvecha.com/v1/recognition/recaptcha?id=1234567" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Python**

```python
import requests

response = requests.get(
    "https://api.solvecha.com/v1/recognition/recaptcha?id=1234567",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(response.status_code, response.json())
```

**Node.js**

```js
const response = await fetch("https://api.solvecha.com/v1/recognition/recaptcha?id=1234567", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
console.log(response.status, await response.json());
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest("GET", "https://api.solvecha.com/v1/recognition/recaptcha?id=1234567", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.StatusCode, string(out))
}
```


## Response

### 200 OK

The job is ready. The shape of `data` depends on the captcha type. Each type page shows it.

```json
{"data": [false, true, false, true, true, false, false, false, false]}
```

### Errors

An error has the HTTP status of its code and this body:

```json
{"error": 15, "code": 15, "message": "Invalid key", "type": null}
```

| Code | HTTP status | When |
|---|---|---|
| `14` Incomplete job | 409 | The job is not ready yet. Poll again in one second. |
| `10` Invalid request | 400 | The id is missing or unknown, or the job has another captcha type than the path. |
| `11` Rate limit reached | 429 | Your key is above the poll requests per minute of its plan (20 times the create limit). |
| `15` Invalid key | 401 | The key is missing, malformed or unknown. |
| `9` Unknown error | 500 | Server error. Retry after a few seconds. |

All codes are on the [Errors](https://solvecha.com/docs/errors.md) page.

## Notes

A job is charged once, when the first poll returns the answer. Polling the same job again never charges twice. Only answers count against your quota.
