UNLOCK API
getTaskResult

getTaskResult

Returns the state of a task. While it is being solved, status is processing. When it is done, status is ready and solution holds the answer. A failed task returns errorId 1 with the reason, and its charge is already back on the balance.
POSThttps://unlock-api.com/getTaskResult
Wait about 5 seconds after creating the task, then check every 5 seconds. A task not solved within 5 minutes fails with ERROR_CAPTCHA_UNSOLVABLE.

Request parameters

clientKey
StringRequired
Your API key, 32 characters, from the account page.
taskId
IntegerRequired
The id returned by createTask.

Request

POST /getTaskResult
{
  "clientKey": "YOUR_API_KEY",
  "taskId": 1001
}

Response

{
  "errorId": 0,
  "status": "processing",
  "taskId": 1001
}

Response fields

errorId
Integer
0 when the request worked, 1 when it did not.
taskId
Integer
Task id.
status
String
processing while the task is being solved, ready when it is done.
solution
Object
The answer. Its fields depend on the task type.
cost
String
Price of this task in US dollars.
createTime
Integer
Unix time when the task was created.
endTime
Integer
Unix time when the task was solved.
solveCount
Integer
How many times the task was solved. Always 1.
errorCode
String
Error name when errorId is 1.
errorDescription
String
Short explanation of the error in English.

Code samples

curl -s https://unlock-api.com/getTaskResult \
  -H "Content-Type: application/json" \
  -d '{"clientKey":"YOUR_API_KEY","taskId":1001}'

Errors this method can return