What is Cloudflare Turnstile?
Cloudflare Turnstile is a smart captcha that replaces reCAPTCHA on millions of websites. It runs invisible behavioral checks in the background and either auto-passes or shows a simple checkbox challenge. Turnstile is embedded as a widget in forms (login, signup, checkout) and produces a token that the site validates server-side. Turnstile is used by over 25 million websites and is one of the most common captchas you'll encounter.
How it works
Send Task
POST your AntiTurnstileTaskProxyLess with the target URL and sitekey to our API. We'll queue it instantly.
We Solve
Capzy's proprietary solver returns valid Turnstile tokens for authorized testing and automation. Most solves complete in 2-3 seconds.
Get Token
Poll getTaskResult — when status is 'ready', the solution contains the token to inject into the target page.
Quick integration
import requests, time
API = "https://api.capzy.ai"
KEY = "capzy_your_key_here"
# Step 1: Create task
task = requests.post(f"{API}/createTask", json={
"clientKey": KEY,
"task": {
"type": "AntiTurnstileTaskProxyLess",
"websiteKey": "0x4AAAAAAADnPIDROrmt1Wwj",
"websiteURL": "https://example.com/login"
}
}).json()
task_id = task["taskId"]
print(f"Task created: {task_id}")
# Step 2: Poll for result
while True:
result = requests.post(f"{API}/getTaskResult", json={
"clientKey": KEY,
"taskId": task_id
}).json()
if result["status"] == "ready":
print("Solved!", result["solution"])
break
elif result["status"] == "failed":
print("Failed:", result.get("errorDescription"))
break
time.sleep(1)
# Step 3: Use the result — paste the token into the site's captcha form field
token = result["solution"]["token"]
# Browser side: set the textarea value or the hidden input. Then submit.
# Server-to-server: post the token alongside the form fields you normally send.
resp = requests.post("https://target.example.com/submit", data={
"username": "...",
"captcha_response": token, # <-- replace with the field name your site uses
})
print(resp.status_code)Using your own proxy
Use AntiTurnstileTask instead of AntiTurnstileTaskProxyLess to route the solve through your own proxy. This is useful when the target site checks the IP that solved the captcha matches the IP submitting the form.
import requests, time
API = "https://api.capzy.ai"
KEY = "capzy_your_key_here"
# Step 1: Create task
task = requests.post(f"{API}/createTask", json={
"clientKey": KEY,
"task": {
"type": "AntiTurnstileTask",
"proxyPort": "8080",
"proxyType": "http",
"proxyLogin": "user",
"websiteKey": "0x4AAAAAAADnPIDROrmt1Wwj",
"websiteURL": "https://example.com/login",
"proxyAddress": "123.45.67.89",
"proxyPassword": "pass"
}
}).json()
task_id = task["taskId"]
print(f"Task created: {task_id}")
# Step 2: Poll for result
while True:
result = requests.post(f"{API}/getTaskResult", json={
"clientKey": KEY,
"taskId": task_id
}).json()
if result["status"] == "ready":
print("Solved!", result["solution"])
break
elif result["status"] == "failed":
print("Failed:", result.get("errorDescription"))
break
time.sleep(1)
# Step 3: Use the result — paste the token into the site's captcha form field
token = result["solution"]["token"]
# Browser side: set the textarea value or the hidden input. Then submit.
# Server-to-server: post the token alongside the form fields you normally send.
resp = requests.post("https://target.example.com/submit", data={
"username": "...",
"captcha_response": token, # <-- replace with the field name your site uses
})
print(resp.status_code)additional proxy parameters
proxyTypetypestringreqyesProxy protocol: http or httpsproxyAddresstypestringreqyesProxy IP address or hostnameproxyPorttypenumberreqyesProxy port numberproxyLogintypestringreqnoProxy username (if auth required)proxyPasswordtypestringreqnoProxy password (if auth required)userAgenttypestringreqnoUser-Agent string to use. Must match the UA you use when submitting the tokenTask parameters
typetypestringreqyesAntiTurnstileTaskProxyLess or AntiTurnstileTaskwebsiteURLtypestringreqyesThe page URL where Turnstile is loadedwebsiteKeytypestringreqyesThe sitekey (starts with 0x...). Found in data-sitekey attribute or JS sourceSolution response
tokentypestringThe solved Turnstile token. Submit in cf-turnstile-response fieldExample response
Full getTaskResult response shape. The fields in the table above describe what's inside solution — the outer envelope (errorId, status) is identical for every captcha type.
{
"errorId": 0,
"status": "ready",
"solution": {
"token": "0.AbCdEfGh1234567890_xyzqwerty.kxJ..."
}
}Error response
Failures use the same envelope with errorId: 1 plus errorCode + errorDescription. See the error-code reference for the full list.
{
"errorId": 1,
"errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
"errorDescription": "Solver gave up — automatically refunded."
}Pending response
While the solver is still working, getTaskResult returns status: "processing". Poll every 1–2 seconds until ready or failed.
{
"errorId": 0,
"status": "processing"
}Features
task types
proxyless: AntiTurnstileTaskProxyLess
with proxy: AntiTurnstileTask