API Documentation

Complete reference for the rcap.sh API

Getting Started

rcap.sh provides a simple REST API for solving Cloudflare Turnstile and Challenge captchas. The API uses a task-based flow: create a task, then poll for the result.

Base URL:
https://api.rcap.sh

Authentication

All API requests require your clientKey in the request body. Get your key from the dashboard after signing up.

createTask

POST /createTask

Create a new captcha solving task.

Parameters

clientKeystringrequiredYour API key
task.typestringrequiredAntiTurnstileTaskProxyLess, AntiTurnstileTask, or AntiCloudflareTask
task.websiteURLstringrequiredTarget page URL
task.websiteKeystringTurnstile site key (required for turnstile)
task.proxystringProxy for challenge: protocol://user:pass@host:port
task.userAgentstringCustom user agent (challenge only)
task.actionstringTurnstile action parameter (if site sets data-action)
task.cdatastringTurnstile cdata parameter (if site sets data-cdata)
python
import requests

response = requests.post("https://api.rcap.sh/createTask", json={
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "AntiTurnstileTaskProxyLess",
        "websiteURL": "https://example.com",
        "websiteKey": "0x4AAAAAAB..."
    }
})

print(response.json())
# {"errorId": 0, "taskId": "uuid-here", "status": "processing"}
curl
curl -X POST https://api.rcap.sh/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "AntiTurnstileTaskProxyLess",
      "websiteURL": "https://example.com",
      "websiteKey": "0x4AAAAAAB..."
    }
  }'

getTaskResult

POST /getTaskResult

Poll for a task result. Keep polling until status is "ready" or "failed".

clientKeystringrequiredYour API key
taskIdstringrequiredTask ID from createTask
python
import time

while True:
    result = requests.post("https://api.rcap.sh/getTaskResult", json={
        "clientKey": "YOUR_API_KEY",
        "taskId": task_id
    }).json()

    if result["status"] == "ready":
        token = result["solution"]["token"]
        break
    elif result["status"] == "failed":
        print("Failed:", result.get("errorDescription"))
        break

    time.sleep(1)

Response

json
// Success
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "token": "0.abc123..."
  },
  "solveTime": 842
}

// Processing
{"errorId": 0, "status": "processing"}

// Failed
{
  "errorId": 1,
  "status": "failed",
  "errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
  "errorDescription": "solve failed"
}

getBalance

POST /getBalance

clientKeystringrequiredYour API key
python
response = requests.post("https://api.rcap.sh/getBalance", json={
    "clientKey": "YOUR_API_KEY"
}).json()

print("Balance:", response["balance"])

solve (sync)

POST /solve

Single-request solve. Blocks until the captcha is solved and returns the result directly — no polling needed. Ideal for latency-sensitive workflows.

Parameters

clientKeystringrequiredYour API key
task.typestringrequiredAntiTurnstileTaskProxyLess, AntiTurnstileTask, or AntiCloudflareTask
task.websiteURLstringrequiredTarget page URL
task.websiteKeystringTurnstile site key (required for turnstile)
task.proxystringProxy for challenge: protocol://user:pass@host:port
task.userAgentstringCustom user agent (challenge only)
task.actionstringTurnstile action (if site sets data-action)
task.cdatastringTurnstile cdata (if site sets data-cdata)
python
import requests

# Single request — no polling needed
response = requests.post("https://api.rcap.sh/solve", json={
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "AntiTurnstileTaskProxyLess",
        "websiteURL": "https://example.com",
        "websiteKey": "0x4AAAAAAB..."
    }
}, timeout=30).json()

token = response["solution"]["token"]
print(f"Solved in {response['solveTime']}ms")
curl
curl -X POST https://api.rcap.sh/solve \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "AntiTurnstileTaskProxyLess",
      "websiteURL": "https://example.com",
      "websiteKey": "0x4AAAAAAB..."
    }
  }'

Response

json
// Success
{
  "errorId": 0,
  "status": "ready",
  "solution": {"token": "0.abc123..."},
  "solveTime": 306
}

// Failed
{
  "errorId": 1,
  "status": "failed",
  "errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
  "errorDescription": "solve failed"
}

Use a timeout of at least 30 seconds. Typical solve time is ~300ms for Turnstile and 1-5s for Challenge. Same body format as createTask.

Cloudflare Turnstile

Solve Cloudflare Turnstile captchas. Proxy optional — use AntiTurnstileTaskProxyLess without proxy, or AntiTurnstileTask with proxy.

Avg Solve Time
< 2 seconds
Without Proxy
AntiTurnstileTaskProxyLess
With Proxy
AntiTurnstileTask
task.typestringrequiredAntiTurnstileTaskProxyLess (no proxy) or AntiTurnstileTask (with proxy)
task.websiteURLstringrequiredPage URL with turnstile
task.websiteKeystringrequiredTurnstile sitekey (data-sitekey)
task.proxystringOptional proxy: protocol://user:pass@host:port
task.userAgentstringMatch the UA you use on the form submission
task.actionstringPass if site sets data-action on the widget
task.cdatastringPass if site sets data-cdata on the widget
python
# Without proxy
response = requests.post("https://api.rcap.sh/createTask", json={
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "AntiTurnstileTaskProxyLess",
        "websiteURL": "https://example.com/login",
        "websiteKey": "0x4AAAAAAB..."
    }
})

# With proxy
response = requests.post("https://api.rcap.sh/createTask", json={
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "AntiTurnstileTask",
        "websiteURL": "https://example.com/login",
        "websiteKey": "0x4AAAAAAB...",
        "proxy": "http://user:pass@host:port"
    }
})

Cloudflare Challenge

Solve Cloudflare Challenge pages ("Checking your browser..."). Requires a proxy. Returns cf_clearance cookies and the user agent used.

Avg Solve Time
< 5 seconds
Task Type
AntiCloudflareTask
task.typestringrequiredAntiCloudflareTask
task.websiteURLstringrequiredChallenge page URL
task.proxystringrequiredprotocol://user:pass@host:port
task.userAgentstringCustom user agent (should match your browser)
python
response = requests.post("https://api.rcap.sh/createTask", json={
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "AntiCloudflareTask",
        "websiteURL": "https://example.com/protected",
        "proxy": "http://user:pass@proxy.example.com:8080",
        "userAgent": "Mozilla/5.0 ..."
    }
})

# Result contains cookies and user_agent
# {"solution": {"cookies": {"cf_clearance": "..."}, "user_agent": "..."}}

Error Codes

ERROR_KEY_DOES_NOT_EXISTInvalid API key
ERROR_ZERO_BALANCEInsufficient balance
ERROR_TASK_NOT_SUPPORTEDTask type not supported or disabled
ERROR_NO_SUCH_CAPCHA_IDTask not found
ERROR_CAPTCHA_UNSOLVABLESolve failed (auto-refunded)
ERROR_RATE_LIMITToo many requests, slow down
ERROR_BAD_REQUESTInvalid request parameters