Skip to content
StatusConsole

Task types

Cloudflare Turnstile

IllustrationTurnstile sits inside a form. Most of the time it verifies on its own and shows a tick; the page does not navigate away.

A Cloudflare Turnstile task returns a token (token) that you submit to the target site to pass the check. TurnstileTaskProxyless costs 25 points (≈ $3.75 / 1k) per task and is asynchronous: createTask, then getTaskResult every 5 seconds. Failed and timed-out tasks are refunded automatically.

POSThttps://api.yescaptcha.com/createTaskGlobal endpoint
POSThttps://cn.yescaptcha.com/createTaskChina endpoint

The request body is JSON authenticated with your clientKey. Query results on the same endpoint you created the task on.

A Cloudflare verification widget (“Verify you are human”) is embedded in a form on the page, and the page loads a script from challenges.cloudflare.com/turnstile.

If the whole page is replaced by Cloudflare’s “Just a moment…” / “Checking your browser” screen, that is the challenge page, not Turnstile; use Cloudflare challenge page. See Identify the captcha type.

Task typePriceModeNotes
TurnstileTaskProxyless$3.75 / 1k; 25 points/task · ¥25 / 1kAsync
TurnstileTaskProxylessM1$4.50 / 1k; 30 points/task · ¥30 / 1kAsync
TurnstileTaskProxylessLite$1.65 / 1k; 11 points/task · ¥11 / 1kAsyncThe lowest-priced Turnstile type (economy route); failed tasks are not retried on another route, and it is slower than TurnstileTaskProxyless (typically 6–7 seconds, occasionally failing after about 60 seconds)
TurnstileTask$3.75 / 1k; 25 points/task · ¥25 / 1kAsyncOwn proxy

US dollar prices are estimates at US$1 ≈ ¥6.67; tasks are charged in points.

  • TurnstileTaskProxyless and TurnstileTaskProxylessM1 take the same parameters on different routes; use either as a fallback for the other.
  • TurnstileTaskProxylessLite takes the same parameters and costs 11 points (≈ $1.65 / 1k) per task. It is the lowest-priced Turnstile type (an economy route), but success rate and speed are not guaranteed: a failed task is not retried on another route, it usually takes 6–7 seconds, which is slower than TurnstileTaskProxyless, and occasionally it returns a failure only after about 60 seconds. Failed tasks are refunded automatically, as with the other types. It suits high-volume use where you can handle retries yourself and timing is not critical. It only supports the Turnstile widget embedded in a page, not the Cloudflare challenge page (cf_clearance). It does not support proxies: proxy fields, userAgent and other extra fields are ignored without an error.
  • TurnstileTask loads the captcha through your own proxy and needs the proxy fields.
  • In most cases, use TurnstileTaskProxyless; use TurnstileTaskProxylessM1 when you want a fallback route.
  • For high volume where price matters most and you can handle failures yourself, use TurnstileTaskProxylessLite. After a failure (errorId is not 0), you can create a new task with the same parameters using TurnstileTaskProxyless.
  • If the site also checks the IP that submits the token, use TurnstileTask and submit through the same proxy.
FieldTypeRequiredDescription
typestringYesTask type; see "Task types and pricing" on this page
websiteURLstringYesFull URL of the page that shows the captcha. Use the site you see the captcha on, not the captcha vendor's domain
websiteKeystringYesThe Turnstile site key (sitekey), usually starting with 0x
pageActionstringNoThe action the page passes to Turnstile (a turnstile.render option, or data-action on the widget element), e.g. login. Not needed in most cases; add it only when tasks keep failing
datastringNoThe cData the page passes to Turnstile (a turnstile.render option, or data-cdata on the widget element), e.g. c0bd4b36-7419-4e18-83c6-378699f2a9a2. Not needed in most cases; add it only when tasks keep failing
proxyTypestringSome typesProxy protocol: http, https, socks4 or socks5 (Required for TurnstileTask)
proxyAddressstringSome typesProxy IP address or hostname. Local or private addresses such as 127.0.0.1 or 192.168.x.x will not work because our servers cannot reach them (Required for TurnstileTask)
proxyPortintegerSome typesProxy port (Required for TurnstileTask)
proxyLoginstringNoProxy username, if the proxy requires authentication (TurnstileTask only)
proxyPasswordstringNoProxy password, if the proxy requires authentication (TurnstileTask only)
userAgentstringNoBrowser User-Agent. If the result contains a userAgent, use that value when you submit the token (TurnstileTask only)

websiteKey usually starts with 0x. How to find it: Find Turnstile parameters.

If tasks keep failing: pageAction and data

Section titled “If tasks keep failing: pageAction and data”

In most cases websiteURL and websiteKey are all you need, and you don’t need these two parameters. If you are sure websiteURL and websiteKey are correct and tasks still fail, check whether the page passes action and cData to Turnstile (turnstile.render options, or data-action and data-cdata on the widget element). If it does, pass them as they are:

  • pageAction: the page’s action, e.g. login
  • data: the page’s cData, e.g. c0bd4b36-7419-4e18-83c6-378699f2a9a2
POST https://api.yescaptcha.com/createTask
{
"clientKey": "YOUR_CLIENT_KEY",
"task": {
"type": "TurnstileTaskProxyless",
"websiteURL": "https://example.com/login",
"websiteKey": "0x4AAAAAAA_SITE_KEY",
"pageAction": "login",
"data": "c0bd4b36-7419-4e18-83c6-378699f2a9a2"
}
}
POST https://api.yescaptcha.com/createTask
{
"clientKey": "YOUR_CLIENT_KEY",
"task": {
"type": "TurnstileTaskProxyless",
"websiteURL": "https://example.com/login",
"websiteKey": "0x4AAAAAAA_SITE_KEY"
}
}
curl -s https://api.yescaptcha.com/createTask \
-H 'Content-Type: application/json' \
-d '{
"clientKey": "YOUR_CLIENT_KEY",
"task": {
"type": "TurnstileTaskProxyless",
"websiteURL": "https://example.com/login",
"websiteKey": "0x4AAAAAAA_SITE_KEY"
}
}'
# Returns {"errorId":0,"taskId":"..."}; then poll every 5 seconds:
curl -s https://api.yescaptcha.com/getTaskResult \
-H 'Content-Type: application/json' \
-d '{"clientKey": "YOUR_CLIENT_KEY", "taskId": "TASK_ID"}'

Replace websiteURL and websiteKey with the target site’s values.

{
"errorId": 0,
"status": "ready",
"solution": {
"token": "0.ufq5RgSVZd11DPSX1brdrxnEs28KcVlKj2ORchqxSy2q9yAW6ciq3hriXDF4x...",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36"
}
}
FieldTypeDescription
tokenstringThe token to submit to the target site. Single use; submit it as soon as possible
userAgentstringThe User-Agent to use when you submit the token, even if it differs from the one you sent. For TurnstileTaskProxylessLite it is a fixed, recommended Chrome User-Agent

Put the token in the page’s cf-turnstile-response field (or the field the site’s API expects) and submit, using the returned userAgent as the User-Agent. For TurnstileTaskProxylessLite, the returned userAgent is a fixed Chrome User-Agent recommended for submitting.

While in progress you get {"errorId": 0, "status": "processing"}; check again 5 seconds later. Handle errors by errorCode as described in Error codes.

TurnstileTaskProxylessLite failures and time limit

Section titled “TurnstileTaskProxylessLite failures and time limit”
  • Not solved: ERROR_CAPTCHA_UNSOLVABLE.
  • Route error (timeout, busy and so on): ERROR_SERVICE_UNAVALIABLE (that is how the code is spelled). When the route is unavailable as a whole, createTask returns ERROR_SERVICE_UNAVALIABLE straight away and nothing is charged; you can switch to TurnstileTaskProxyless.
  • The time limit is 120 seconds, and a result normally comes within about 70 seconds; after the limit you get ERROR_TASK_TIMEOUT.

Only successful tasks are charged; all of the failures above are refunded automatically.

Single use. Submit it as soon as possible; Turnstile tokens usually expire within a few minutes (Cloudflare decides).

TurnstileTaskProxylessLite fails often. What can I do?

Section titled “TurnstileTaskProxylessLite fails often. What can I do?”

TurnstileTaskProxylessLite is cheaper, but its success rate is not guaranteed, and a failed task is not retried on another route for you. Failed tasks are refunded automatically. If you need a higher success rate, switch to TurnstileTaskProxyless or TurnstileTaskProxylessM1, or try TurnstileTaskProxylessLite first and fall back to them when it fails.

Check that websiteURL is the page with the widget and websiteKey is correct, and submit with the returned userAgent. If the page passes action and cData, add them as pageAction and data; see If tasks keep failing. If the site also checks the IP, use TurnstileTask and submit through the same proxy.