Skip to content

Turnstile

Cloudflare Turnstile is a user-friendly CAPTCHA alternative designed as a drop-in replacement for reCAPTCHA. It runs automatically in the background without requiring users to solve visual puzzles. Turnstile is increasingly adopted across Cloudflare-protected sites and is also available as a standalone widget for any website.

TypeProxyDescription
TurnstileTokenProxyLessNoStandard (recommended)
TurnstileTokenYesWith proxy
ParameterTypeRequiredDescription
typestringYesTask type from the table above
websiteURLstringYesURL of the page with the Turnstile widget
websiteKeystringYesTurnstile site key
actionstringNoCustom action parameter
cDatastringNoCustom data parameter

Required when using the TurnstileToken proxy task type.

ParameterTypeRequiredDescription
proxyTypestringYeshttp, socks4, or socks5
proxyAddressstringYesProxy IP or hostname
proxyPortintegerYesProxy port
proxyLoginstringNoProxy username
proxyPasswordstringNoProxy password
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TurnstileTokenProxyLess",
"websiteURL": "https://example.com/login",
"websiteKey": "0x4AAAAAAABS7vwvV6VFfMcD"
}
}
{
"errorId": 0,
"taskId": "abc-123-def"
}
{
"token": "0.erxJjsRkUHZCAQ..."
}
FieldTypeDescription
tokenstringTurnstile response token

Submit the token as the cf-turnstile-response form field value. Depending on the site implementation, you may also need to set the g-recaptcha-response field (some sites use this name for backward compatibility).

  1. Form submission — Set the hidden cf-turnstile-response input field and submit the form.
  2. JavaScript callback — Pass the token to the Turnstile callback function registered during widget rendering.
  3. API request — Include the token in the request payload if the site validates Turnstile server-side via an API call.
import requests
import time
API_KEY = "YOUR_API_KEY"
# Create task
response = requests.post("https://api.ucaptcha.net/createTask", json={
"clientKey": API_KEY,
"task": {
"type": "TurnstileTokenProxyLess",
"websiteURL": "https://example.com/login",
"websiteKey": "0x4AAAAAAABS7vwvV6VFfMcD"
}
})
task_id = response.json()["taskId"]
# Poll for result
while True:
result = requests.post("https://api.ucaptcha.net/getTaskResult", json={
"clientKey": API_KEY,
"taskId": task_id
}).json()
if result["status"] == "ready":
token = result["solution"]["token"]
print("Token:", token)
break
elif result["status"] == "failed":
print("Error:", result.get("errorDescription"))
break
time.sleep(5)
const API_KEY = "YOUR_API_KEY";
const { taskId } = await fetch("https://api.ucaptcha.net/createTask", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
clientKey: API_KEY,
task: {
type: "TurnstileTokenProxyLess",
websiteURL: "https://example.com/login",
websiteKey: "0x4AAAAAAABS7vwvV6VFfMcD"
}
})
}).then(r => r.json());
while (true) {
const result = await fetch("https://api.ucaptcha.net/getTaskResult", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ clientKey: API_KEY, taskId })
}).then(r => r.json());
if (result.status === "ready") {
console.log("Token:", result.solution.token);
break;
} else if (result.status === "failed") {
console.error("Error:", result.errorDescription);
break;
}
await new Promise(r => setTimeout(r, 5000));
}
Terminal window
# Create task
curl -X POST https://api.ucaptcha.net/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TurnstileTokenProxyLess",
"websiteURL": "https://example.com/login",
"websiteKey": "0x4AAAAAAABS7vwvV6VFfMcD"
}
}'
# Poll for result (replace TASK_ID with the taskId from above)
curl -X POST https://api.ucaptcha.net/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"taskId": "TASK_ID"
}'
  • 2Captcha
  • CapSolver
  • Anti-Captcha
  • CapMonster
  • DeathByCaptcha
  • RiskByPass
  • 2Crawler
  • Multibot

The following legacy type names are also accepted for backward compatibility:

  • AntiTurnstileTask
  • AntiTurnstileTaskProxyLess
  • TurnstileTask
  • TurnstileTaskProxyless