API referenceTask typesCloudflare Turnstile
Cloudflare Turnstile
The Cloudflare captcha widget, in all three of its modes. You do not have to say which mode the page is using; we read it off the widget.
Task types
| Type string | Proxy | Use it for |
|---|---|---|
AntiTurnstileTaskProxyLess | None | Every Turnstile widget: managed, non interactive and invisible. |
There is one type on purpose. Turnstile tokens are not bound to the address that minted them, so a proxy buys nothing and the mode is detectable from the widget itself.
Task object
| Field | Type | Required | What it is |
|---|---|---|---|
type | String | Yes | AntiTurnstileTaskProxyLess. |
websiteURL | String | Yes | The page carrying the widget. |
websiteKey | String | Yes | The sitekey on the widget element. It starts 0x. |
metadata.action | String | No | The data-action attribute, if the widget carries one. |
metadata.cdata | String | No | The data-cdata attribute, if the widget carries one. |
Both metadata fields are optional and both are checked when the site sets them. Copy them across if the widget has them; leave metadata out entirely if it does not.
Example
POST/createTask
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AntiTurnstileTaskProxyLess",
"websiteURL": "https://example.com/signup",
"websiteKey": "0x4AAAAAAA...",
"metadata": {
"action": "signup",
"cdata": "0000-1111-2222-3333"
}
}
}JSON
{
"errorId": 0,
"taskId": "c2f6b8e1-3a4d-4f5b-8c2e-0242ac110006",
"status": "ready",
"solution": {
"token": "0.Ky_0bJ...",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ..."
}
}| Solution field | What to do with it |
|---|---|
token | Put it in the cf-turnstile-response field and submit. |
userAgent | Send the form with this user agent. Turnstile checks it. |
Finding the site key
- Search the page source for
cf-turnstile. - The key is the
data-sitekeyattribute on that element. - If the widget is rendered by script, look for
turnstile.renderand read thesitekeyoption.
Live examples of each mode, with the request beside them, are on the Turnstile page.
Last updated 21 September 2026