API referenceEndpointsgetTaskResult
getTaskResult
Asks whether a task has finished. Answers in one of three states: queued, working, or done with the answer attached.
Request
POST/getTaskResult
POST /getTaskResult HTTP/1.1
Host: api.jevcha.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}| Field | Type | Required | What it is |
|---|---|---|---|
clientKey | String | Yes | Your account key. |
taskId | String | Yes | The id returned by /createTask. |
Response
Still working:
JSON
{
"errorId": 0,
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006",
"status": "processing"
}Done:
JSON
{
"errorId": 0,
"errorCode": "",
"errorDescription": "",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006",
"status": "ready",
"solution": {
"gRecaptchaResponse": "3AHJ...",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...",
"expireTime": 1671615324290
}
}| Field | Type | What it means |
|---|---|---|
errorId | Integer | 0 while all is well, 1 once it is not. |
errorCode | String | Set only when errorId is 1. |
errorDescription | String | One sentence saying what went wrong. |
status | String | idle queued, processing working, ready done. |
solution | Object | Present only at ready. Its fields depend on the type. |
How to poll
- Wait a full second before the first ask. A task cannot finish sooner and an immediate poll only spends one of your 120.
- Once a second after that. 120 asks at that rate is exactly the 120 second solve deadline, so the two limits run out together.
- 120 asks per task, then the id stops answering.
- Results are kept 5 minutes. After that the id reads as invalid, which is the same answer as a wrong id.
import time, requests
def wait_for(task_id, key):
for _ in range(120):
time.sleep(1)
r = requests.post("https://api.jevcha.com/getTaskResult",
json={"clientKey": key, "taskId": task_id}).json()
if r["errorId"]:
raise RuntimeError(r["errorCode"] + ": " + r["errorDescription"])
if r["status"] == "ready":
return r["solution"]
raise TimeoutError("no answer inside 120 seconds")
async function waitFor(taskId, key) {
for (let i = 0; i < 120; i++) {
await new Promise((r) => setTimeout(r, 1000));
const res = await fetch("https://api.jevcha.com/getTaskResult", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ clientKey: key, taskId }),
}).then((r) => r.json());
if (res.errorId) throw new Error(`${res.errorCode}: ${res.errorDescription}`);
if (res.status === "ready") return res.solution;
}
throw new Error("no answer inside 120 seconds");
}
Last updated 21 September 2026