getTaskResult
JSON 方法
令牌任务
- reCAPTCHA v2
- reCAPTCHA v2 Enterprise
- reCAPTCHA v3
- Cloudflare Turnstile
- GeeTest v3 / v4
- FunCaptcha (Arkose Labs)
- Amazon AWS WAF
- MTCaptcha
- Friendly Captcha
- Lemin Cropped Captcha
- DataDome
- KeyCaptcha
- Capy Puzzle
- Cloudflare Challenge 验证页
- Cutcaptcha
- CyberSiARA
- atbCAPTCHA
- Tencent Captcha
- Prosopo Procaptcha
- CaptchaFox
- Altcha
- NetEase Yidun
- Yandex SmartCaptcha
- VK Captcha
- Binance Captcha
- 自定义任务(Imperva、Temu 等)
getTaskResult
返回任务状态。识别过程中 status 为 processing。完成后 status 为 ready,solution 中是答案。失败的任务返回 errorId 1 和原因,费用已退回余额。
POSThttps://unlock-api.com/getTaskResult
创建任务后等待约 5 秒,然后每 5 秒查询一次。5 分钟内未完成识别的任务会以 ERROR_CAPTCHA_UNSOLVABLE 失败。
请求参数
clientKeyString必填
你的 API 密钥,32 个字符,在账户页面上。
taskIdInteger必填
createTask 返回的 ID。
请求
POST /getTaskResult
{
"clientKey": "YOUR_API_KEY",
"taskId": 1001
}响应
{
"errorId": 0,
"status": "processing",
"taskId": 1001
}{
"errorId": 0,
"taskId": 1001,
"status": "ready",
"solution": {
"token": "0.zrSnRHO7h0HwSjSCU8oyzbjEtD8p..."
},
"cost": "0.00055",
"createTime": 1791640000,
"endTime": 1791640011,
"solveCount": 1
}{
"errorId": 1,
"errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
"errorDescription": "The task could not be solved. Its cost was returned to your balance.",
"taskId": 1001
}响应字段
errorIdInteger
请求成功为 0,失败为 1。
taskIdInteger
任务 ID。
statusString
识别中为 processing,完成后为 ready。
solutionObject
答案。其字段取决于任务类型。
costString
此任务的价格,单位为美元。
createTimeInteger
任务创建时的 Unix 时间。
endTimeInteger
任务完成识别时的 Unix 时间。
solveCountInteger
任务被识别的次数。始终为 1。
errorCodeString
errorId 为 1 时的错误名称。
errorDescriptionString
错误的简短英文说明。
代码示例
curl -s https://unlock-api.com/getTaskResult \
-H "Content-Type: application/json" \
-d '{"clientKey":"YOUR_API_KEY","taskId":1001}'import requests
r = requests.post("https://unlock-api.com/getTaskResult", json={
"clientKey": "YOUR_API_KEY",
"taskId": 1001
}).json()
print(r)const r = await fetch("https://unlock-api.com/getTaskResult", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"clientKey": "YOUR_API_KEY",
"taskId": 1001
}),
}).then((res) => res.json());
console.log(r);此方法可能返回的错误
密钥错误。请从账户页面重新复制。(in.php 和 res.php:ERROR_WRONG_USER_KEY)
请求来自不在账户白名单中的 IP。请在账户页面添加该 IP。
该账户已被封禁。请从账户页面联系客服。
请求过多。请把结果查询放慢到每 5 秒一次。
你的账户中没有该 ID 的任务。
任务未能按时完成识别。费用已退回余额。