GET /task/result/:id — Get Result
Poll for the result of a submitted task.
Endpoint
Section titled “Endpoint”GET https://api.ucaptcha.net/task/result/:task_idReplace :task_id with the task_id returned by POST /task/submit.
Authentication
Section titled “Authentication”Pass your API key via:
x-api-keyheader (recommended)?token=query parameter
Responses
Section titled “Responses”Queued
Section titled “Queued”{ "status": "QUEUED"}Processing
Section titled “Processing”{ "status": "RUNNING"}Solved
Section titled “Solved”{ "status": "SUCCESS", "result": { "token": "ct=abc123xyz..." }}The result object contains the solution. The exact fields depend on the task type — most return a token field.
Failed
Section titled “Failed”{ "status": "FAILED", "error": "Task failed"}Not Found
Section titled “Not Found”{ "status": "NOT_FOUND"}Status Values
Section titled “Status Values”| Status | Description |
|---|---|
QUEUED | Task created, waiting to be picked up |
RUNNING | Task is actively being solved |
SUCCESS | Solution available in result |
FAILED | Task could not be solved |
NOT_FOUND | Task ID not found |
Examples
Section titled “Examples”curl https://api.ucaptcha.net/task/result/550e8400-e29b-41d4-a716-446655440000 \ -H "x-api-key: YOUR_API_KEY"Python Polling Loop
Section titled “Python Polling Loop”import requestsimport time
task_id = "550e8400-e29b-41d4-a716-446655440000"API_KEY = "YOUR_API_KEY"
while True: result = requests.get( f"https://api.ucaptcha.net/task/result/{task_id}", headers={"x-api-key": API_KEY} ).json()
if result["status"] == "SUCCESS": print("Token:", result["result"]["token"]) break elif result["status"] in ("FAILED", "NOT_FOUND"): print("Failed:", result.get("error")) break
time.sleep(2)JavaScript Polling Loop
Section titled “JavaScript Polling Loop”const API_KEY = "YOUR_API_KEY";const taskId = "550e8400-e29b-41d4-a716-446655440000";
while (true) { const result = await fetch(`https://api.ucaptcha.net/task/result/${taskId}`, { headers: { "x-api-key": API_KEY } }).then(r => r.json());
if (result.status === "SUCCESS") { console.log("Token:", result.result.token); break; } else if (result.status === "FAILED" || result.status === "NOT_FOUND") { console.error("Failed:", result.error); break; } await new Promise(r => setTimeout(r, 2000));}