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 的任務。
任務未能按時完成辨識。費用已退回餘額。