Cloudflare

Cloudflare ships two things you may hit: the Turnstile widget (a token) and the full challenge interstitial (a cf_clearance cookie). Pick the task that matches what the page shows.

Turnstile vs. Challenge

Turnstile is the checkbox-style widget embedded in a form; you get a token and submit it with the form. The Challenge is the full-page “Just a moment…” interstitial that gates the whole site; clearing it returns a cf_clearance cookie you attach to subsequent requests.

Cloudflare Turnstile

proxy optional

Solves the Turnstile widget and returns a token you submit as cf-turnstile-response. Use the proxy variant when the site binds the token to the solving IP.

type (proxyless / proxy)
AntiTurnstileTaskProxyLessAntiTurnstileTask
Task parameters
websiteURL*The page the Turnstile widget is on.
websiteKey*The widget sitekey (starts with 0x).
Returns

solution.token — submit as the cf-turnstile-response value.

Cloudflare Challenge

proxy required

Clears the full interstitial ("Just a moment…" / Managed Challenge) and returns the cf_clearance cookie plus the User-Agent it was issued to. Always IP-bound, so a proxy is required.

type
AntiCloudflareTask
Task parameters
websiteURL*The protected URL you want to reach.
userAgent*The exact User-Agent to pair with the clearance cookie.
proxyType*http, https, socks4, or socks5.
proxyAddress*Proxy host or IP.
proxyPort*Proxy port.
Returns

solution.cookies (including cf_clearance) and solution.userAgent. Send both with your own request from the same proxy IP.

cf_clearance is only valid from the same IP and User-Agent it was minted with. Reuse the returned userAgent and keep requesting through the same proxy exit.

Example

A minimal Turnstile task body:

turnstile-task.json
{
  "clientKey": "capzy_YOUR_KEY",
  "task": {
    "type": "AntiTurnstileTaskProxyLess",
    "websiteURL": "https://example.com/login",
    "websiteKey": "0x4AAAAAAADnPIDROrmt1Wwj"
  }
}
Finding the sitekey
The Turnstile sitekey is the data-sitekey attribute on the widget <div>, or the sitekey passed to turnstile.render(). It always starts with 0x.

See Using proxies for the proxy fields, and Getting the result for the polling loop that returns solution.