/res.php — Get Result
Retrieve task results, check balance, and report solution quality using the 2captcha-compatible format.
https://2captcha.com/res.phphttps://api.ucaptcha.net/res.phpEndpoint
Section titled “Endpoint”GET|POST https://api.ucaptcha.net/res.phpAuthentication
Section titled “Authentication”Pass your uCaptcha API key as the key parameter.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Your uCaptcha API key |
action | string | Yes | Operation: get, getbalance, reportbad, reportgood |
id | string | For get/report* | Task ID returned by /in.php |
json | 0 | 1 | No | Return JSON (1) or plain text (0, default) |
header_acao | 0 | 1 | No | Add CORS header |
action=get — Poll Task Result
Section titled “action=get — Poll Task Result”GET https://api.ucaptcha.net/res.php?key=YOUR_API_KEY&action=get&id=TASK_IDPlain text responses
Section titled “Plain text responses”Still processing:
CAPCHA_NOT_READYSolution ready:
OK|03AGdBq24PBCbwiDRkh3FOcMZ1Xi5sEKH...Failed:
ERROR_CAPTCHA_UNSOLVABLEJSON responses (json=1)
Section titled “JSON responses (json=1)”Still processing:
{ "status": 0, "request": "CAPCHA_NOT_READY"}Solution ready:
{ "status": 1, "request": "03AGdBq24PBCbwiDRkh3FOcMZ1Xi5sEKH..."}Failed:
{ "status": 0, "request": "ERROR_CAPTCHA_UNSOLVABLE"}action=getbalance — Get Balance
Section titled “action=getbalance — Get Balance”GET https://api.ucaptcha.net/res.php?key=YOUR_API_KEY&action=getbalancePlain text response
Section titled “Plain text response”50.2500JSON response (json=1)
Section titled “JSON response (json=1)”{ "status": 1, "request": "50.2500"}Balance is returned in USD.
action=reportbad — Report Bad Solution
Section titled “action=reportbad — Report Bad Solution”Report that a solution was rejected by the target site. This records negative feedback in the routing engine’s reliability scores.
GET https://api.ucaptcha.net/res.php?key=YOUR_API_KEY&action=reportbad&id=TASK_IDResponse
Section titled “Response”Plain text:
OK_REPORT_RECORDEDJSON (json=1):
{ "status": 1, "request": "OK_REPORT_RECORDED"}action=reportgood — Report Good Solution
Section titled “action=reportgood — Report Good Solution”Confirm that a solution was accepted by the target site.
GET https://api.ucaptcha.net/res.php?key=YOUR_API_KEY&action=reportgood&id=TASK_IDResponse
Section titled “Response”Plain text:
OK_REPORT_RECORDEDJSON (json=1):
{ "status": 1, "request": "OK_REPORT_RECORDED"}Full Flow Example (cURL)
Section titled “Full Flow Example (cURL)”# 1. Submit taskRESPONSE=$(curl -s "https://api.ucaptcha.net/in.php?key=YOUR_API_KEY&method=userrecaptcha&googlekey=SITE_KEY&pageurl=https://example.com&json=1")TASK_ID=$(echo "$RESPONSE" | jq -r '.request')
# 2. Poll for resultwhile true; do RESULT=$(curl -s "https://api.ucaptcha.net/res.php?key=YOUR_API_KEY&action=get&id=$TASK_ID&json=1") STATUS=$(echo "$RESULT" | jq -r '.status')
if [ "$STATUS" = "1" ]; then echo "Solution: $(echo "$RESULT" | jq -r '.request')" break fi
REQUEST=$(echo "$RESULT" | jq -r '.request') if [ "$REQUEST" != "CAPCHA_NOT_READY" ]; then echo "Error: $REQUEST" break fi
sleep 5done
# 3. Report result qualitycurl -s "https://api.ucaptcha.net/res.php?key=YOUR_API_KEY&action=reportgood&id=$TASK_ID"