Pull a captcha task status previously created using the createTask method
Address: https://api.ocrdatasolutions.com/getTaskResult
Method: POST
Content-type: application-json
Request properties
Property | Type | Required | Purpose |
---|---|---|---|
clientKey | String | Yes | Client account key |
taskId | Integer | Yes | An identifier obtained in the createTask method |
Request example
curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
"clientKey":"YOUR_API_KEY",
"taskId":12345
}' https://api.ocrdatasolutions.com/getTaskResult
Response structure
Property | Type | Purpose |
---|---|---|
errorId | Integer | Error identifier. 0 – no errors, operation completed successfully. >1 – error identifier. Error code and short description transferred in errorCode and errorDescription properties. |
errorCode | String | An error code, won’t be included in the output if request produced no errors. See errors list for reference. |
errorDescription | String | Short description of the error |
status | String | processing – the task is not ready yet ready – the task is complete; you’ll find a solution in the solution property |
solution | Object | Task result data. Different for each type of task. |
cost | Double | Cost of the task in USD. |
ip | String | IP from which the task was created. |
createTime | Integer | UNIX timestamp date of task creation. |
endTime | Integer | UNIX timestamp date of task completion. |
solveCount | Integer | Number of workers who tried to complete your task |
Response example
JSON with no errors
{
"errorId":0,
"status":"ready",
"solution":
{
"text":"deditur",
"url":"http:\/\/61.39.233.233\/1\/147220556452507.jpg"
},
"cost":"0.000700",
"ip":"46.98.54.221",
"createTime":1472205564,
"endTime":1472205570,
"solveCount":"0"
}
JSON with an error
{
"errorId": 1,
"errorCode": "ERROR_KEY_DOES_NOT_EXIST",
"errorDescription": "Account authorization key not found in the system"
}