logo
bars
Pay per solve · API

Cloudflare Turnstile Solver

Managed, non-interactive and invisible widgets are handled without manual solving — you send the page URL and site key, and receive a ready token for your form.

Last updated:

Test it free: $0.10 test balance ↓
API response time
≤ 2 s*
Success rate
up to 99%*
per 1000 tokens
$1.30

Cloudflare Turnstile Solver Pricing

CAPTCHA
Price (USD)
$ 1.30
1000 tokens
Choosing a solution for Cloudflare Turnstile

Cloudflare Turnstile vs Cloudflare Challenge

A Cloudflare Challenge and a Turnstile widget can look the same. A Challenge is not always a separate “Just a moment…” page: it can be styled, embedded into the site or made to look like a regular Turnstile widget, so you cannot tell them apart by appearance.

Cloudflare Turnstile

widget
Where you see it
A widget inside a page or form
What it returns
A token in cf-turnstile-response
CapMonster page
This page: Cloudflare Turnstile Solver
TurnstileTask → solution.token

Cloudflare Challenge

403 · challenge-form
Where you see it
An interstitial page or a styled check embedded into the site; identified by a 403 on the first request and a challenge-form with __cf_chl_f_tk=
What it returns
A token or a cf_clearance cookie
CapMonster page
Cloudflare Challenge solver
→ token · cf_clearance

Cloudflare Turnstile Solvers Compared

The table lists price, time to solve and solving success rate for four Cloudflare Turnstile solving services.

ParameterCapMonster Cloud2CaptchaAnti-CaptchaDeathByCaptcha
Price per 1000 solves (from)
$ 1.30$1.45$2.00$2.89
Time to solve
6.24 s*16.9 s20.33 s~13 s
Solving success rate
99%*96%96%96%

2Captcha, Anti-Captcha, and DeathByCaptcha are trademarks of their respective owners. CapMonster Cloud is not affiliated with these entities. Performance metrics and pricing comparisons are based on publicly available data and internal benchmarking as of 02.10.2026.

Test It Free

Solve Cloudflare Turnstile in seconds

Test the stability on your own target sites right now. We do not guarantee a 100% success rate: CAPTCHA types and target-site configuration may change at any time.

$0.10

New users get $0.10 in test balance to try CapMonster Cloud.

  1. 1. Register at CapMonster Cloud.

  2. 2. Message support via live chat or support@capmonster.cloud with the email tied to your account.

No credit card · Ready-made SDKs for Python, Node.js, C#

What teams use a Cloudflare Turnstile solver for

QA and end-to-end testing

Run sign-up, checkout and form flows in CI/CD with Playwright, Puppeteer or Selenium on pages you own or are allowed to test.

Monitoring

Check that protected forms and endpoints keep working after releases and widget changes.

Publicly available data

Collect publicly available data from open pages that use Cloudflare Turnstile.

Accessibility

Support automated assistive workflows on sites that rely on invisible bot checks.

AI agents

Let an agent request a token through MCP when a workflow reaches a captcha.

Legitimate use only

Use CapMonster Cloud for publicly available data and on sites you own or are authorized to test. Collecting third-party data behind a login or paywall without permission is prohibited.

How Cloudflare Turnstile works

What is Cloudflare Turnstile

Cloudflare Turnstile verifies visitors through client-side browser signals and risk assessment instead of image puzzles. It ships in three widget modes: Managed (recommended), Non-Interactive and Invisible. CapMonster Cloud handles all of them automatically — you never specify the mode in the task.

Sources: Cloudflare documentation — Widget types · Get started · Turnstile in Cloudflare challenges

Managed

Turnstile automatically chooses between a non-interactive check and a checkbox based on the visitor's risk level. No images or text to decipher.

Non-interactive

A visible widget with a loading spinner. The check runs without any visitor interaction.

Invisible

The check runs completely in the background: no widget and no loading indicator are shown.

Cloudflare Turnstile Workflow

  1. 1. Initialization

    The page loads the widget init code; Cloudflare returns the required JS, and the widget renders.

  2. 2. Challenge or not

    Based on the widget mode and Cloudflare's risk signals, the widget decides whether to show an interactive challenge.

  3. 3. Callback

    The client-side callback receives a token — single-use, valid for 300 seconds. If the widget is inside a <form>, the token is also added automatically as the hidden field cf-turnstile-response.

  4. 4. Token → Backend

    The page sends the token to the backend with the form data.

  5. 5. Verification

    Your server calls Cloudflare's Siteverify API to confirm the token.

Sources: Cloudflare documentation — Embed the widget · Validate the token

What is the Cloudflare Turnstile token (cf-turnstile-response)?

A Turnstile token is the string the widget generates after it verifies a visitor. The widget stores it in a hidden form field named cf-turnstile-response and also passes it to the widget's callback. The site's server then sends the token to Cloudflare's Siteverify API to confirm it.

Properties of the token, according to Cloudflare's documentation:

Lifetime

Valid for 300 seconds (5 minutes) after generation.

Validation

Single-use: validating it a second time returns the timeout-or-duplicate error.

Maximum length

Up to 2048 characters long.

Validated on the server through the Siteverify API.

For developers using CapMonster Cloud to get Turnstile tokens

How to solve Cloudflare Turnstile via CapMonster Cloud

CapMonster Cloud accepts captcha parameters, processes them on its servers, and returns a ready-to-use token. Insert this token into the form to pass the check without user interaction.

Your scriptCapMonster Cloud APITarget site

Creating a task

At this stage, you send your API key, captcha type, and its parameters. The service returns a unique taskId which you can use later to get the result.

Sending an API request

Required parameters

ParameterDescription
typeTurnstileTask
websiteURLThe URL of the page where the captcha is solved
websiteKeyTurnstile site key. Format: 0x4AAAAAAABUYP0XeMJF0xoy

Optional parameters

ParameterDescription
userAgentBrowser User-Agent. Recommended: pass the current value supported by CapMonster Cloud. You can get the latest value at https://capmonster.cloud/api/useragent/actual
pageActionThe action field found in the callback function when the captcha is loaded
dataThe value of the data field, taken from the cData parameter
proxyTypehttp — regular HTTP/HTTPS proxy; https — try this if http does not work (required for some custom proxies); socks4 — SOCKS4 proxy; socks5 — SOCKS5 proxy
proxyAddressIP address of the proxy (IPv4/IPv6). Transparent proxies and proxies on local machines are not allowed
proxyPortProxy port
proxyLoginProxy username
proxyPasswordProxy password

The same TurnstileTask type is used with and without a proxy.

Endpoint:

javascript
https://api.capmonster.cloud/createTask

Request:

json
{
  "clientKey": "API_KEY",
  "task": {
    "type": "TurnstileTask",
    "websiteURL": "https://yourwebsite.com/page-with-turnstile",
    "websiteKey": "your-website-key"
  }
}

Response:

json
{
  "errorId": 0,
  "taskId": 407533072
}

Receiving the result

After creating the task, poll the solution status.

Endpoint:

javascript
https://api.capmonster.cloud/getTaskResult

Request:

json
{
  "clientKey": "API_KEY",
  "taskId": 407533072
}

Response:

json
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36",
    "token": "0.iGX3xsyFCkbGePM3jP4P4khLo6TrLukt8ZzBvwuQOvbC...f61f3082"
  }
}
PropertyTypeDescription
tokenStringUse the token in an input field or when calling a callback function.

Placing the token on the page

Insert the returned token into the cf-turnstile-response field or pass it to the widget's callback, then submit the form within five minutes: Cloudflare tokens expire after 300 seconds and can be validated only once. Code examples for Playwright, Puppeteer and Selenium are in the FAQ below.

How to find the sitekey and pageAction

To create a Turnstile task you need two values from the page where the widget runs: the site key (websiteKey) and, if the page sets it, the action name (pageAction).

<div class="cf-turnstile" data-sitekey="SITE_KEY"← websiteKey
     data-action="ACTION"></div>← pageAction
  1. Open the site with the captcha.

  2. Right-click the captcha element and choose Inspect.

  3. Find the site key. In the Elements tab it is the data-sitekey attribute (websiteKey). A Turnstile site key looks like 0x4AAAAAAABUYP0XeMJF0xoy.

  4. Find the action: in the widget render call (the callback function that runs when the captcha loads) or in the data-action attribute. The sitekey can also be found in that callback function. If the page does not set an action, leave the parameter out.

  5. To collect the values automatically, load the page in a headless browser such as Playwright and read them from the rendered widget. Ready examples in JavaScript, Python and C# are in the CapMonster Cloud documentation.

Some values change every time the page loads, so solve the task right after you collect them.

Cloudflare Turnstile Solver with Official SDK

CapMonster Cloud provides ready-made libraries for convenient work in Python, JavaScript (Node.js), and C#.
Below are code examples showing how to create a CAPTCHA-solving task with createTask and retrieve the result with getTaskResult using our client libraries.
Cloudflare Turnstile Solver with Official SDK
python
import asyncio
from capmonstercloudclient import CapMonsterClient, ClientOptions
from capmonstercloudclient.requests import TurnstileRequest
# Import ProxyInfo if you plan to use your own proxy
from capmonstercloudclient.requests.proxy_info import ProxyInfo
API_KEY = "YOUR_API_KEY"  # Specify your CapMonster Cloud API key
async def solve_turnstile():
    client = CapMonsterClient(options=ClientOptions(api_key=API_KEY))
    # Basic example without proxy; CapMonster Cloud automatically uses its own proxies
    turnstile_request = TurnstileRequest(
        websiteURL="https://yourwebsite.com/page-with-turnstile",
        websiteKey="your-website-key",
    )
    # Example using your proxy: uncomment this block if you want to use your own proxy
    """
    proxy = ProxyInfo(proxyType="https", proxyAddress="123.45.67.89", proxyPort=8080, proxyLogin="username", proxyPassword="password")
    turnstile_request = TurnstileRequest(
        websiteURL="https://yourwebsite.com/page-with-turnstile",
        websiteKey="your-website-key",
        proxy=proxy,
        userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36",
    )
    """
    # You can check your balance if necessary
    balance = await client.get_balance()
    print("Balance:", balance)
    result = await client.solve_captcha(turnstile_request)
    print("Solution:", result)
asyncio.run(solve_turnstile())
javascript
const { CapMonsterCloudClientFactory, ClientOptions, TurnstileRequest } = require("@zennolab_com/capmonstercloud-client");
const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key
async function solveTurnstile() {
  const client = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: API_KEY }));
  // Basic example without proxy; CapMonster Cloud automatically uses its own proxies
  let turnstileRequest = new TurnstileRequest({
    websiteURL: "https://yourwebsite.com/page-with-turnstile",
    websiteKey: "your-website-key",
  });
  // Example using your proxy: uncomment this block if you want to use your own proxy
  /*
  const proxy = { proxyType: "https", proxyAddress: "123.45.67.89", proxyPort: 8080, proxyLogin: "username", proxyPassword: "password" };
  turnstileRequest = new TurnstileRequest({
    websiteURL: "https://yourwebsite.com/page-with-turnstile",
    websiteKey: "your-website-key",
    proxy,
  });
  */
  // You can check your balance if necessary
  const balance = await client.getBalance();
  console.log("Balance:", balance);
  const result = await client.Solve(turnstileRequest);
  console.log("Solution:", result.solution);
}
solveTurnstile().catch(console.error);
csharp
using System;
using System.Threading.Tasks;
using Zennolab.CapMonsterCloud;
using Zennolab.CapMonsterCloud.Requests;
class Program
{
    static async Task Main(string[] args)
    {
        // Specify your CapMonster Cloud API key
        var clientOptions = new ClientOptions { ClientKey = "YOUR_API_KEY" };
        var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions);
        // Basic example without proxy; CapMonster Cloud automatically uses its own proxies
        var turnstileRequest = new TurnstileRequest
        {
            WebsiteUrl = "https://yourwebsite.com/page-with-turnstile",
            WebsiteKey = "your-website-key"
        };
        // Example using your proxy: uncomment this block if you want to use your own proxy
        /*
        turnstileRequest = new TurnstileRequest
        {
            WebsiteUrl = "https://yourwebsite.com/page-with-turnstile",
            WebsiteKey = "your-website-key",
            Proxy = new ProxyContainer("123.45.67.89", 8080, ProxyType.Http, "username", "password")
        };
        */
        // You can check your balance if necessary
        var balance = await cmCloudClient.GetBalanceAsync();
        Console.WriteLine("Balance: " + balance);
        var turnstileResult = await cmCloudClient.SolveAsync(turnstileRequest);
        Console.WriteLine("Solution: " + turnstileResult.Solution.Value);
    }
}

For low-code workflows, use the official CapMonster Cloud n8n node.

Background

Cloudflare Turnstile errors and how to fix them

Most Turnstile task errors come from a site key or URL taken from a different page render, a timeout that is too short, or a token that was not passed to the page. Each card below names the error and the fix.
Bug Icon

Incorrect site key or URL

The task fails or the token is rejected. Take websiteURL and websiteKey from the same render of the page.
Bug Icon

Solving timeout

The result was not received before your timeout expired. Increase the timeout value and retry the task.
Bug Icon

Empty token

The token was not passed to the page. Check that getTaskResult returned the ready status and that you took solution.token before inserting it.

Errors returned by Cloudflare Siteverify (timeout-or-duplicate, invalid-input-secret and others) concern site owners — see “Siteverify error codes” below.

Verifying a Turnstile token on your own site

If you run the website protected by Turnstile: verify tokens and test your setup

text
POST https://challenges.cloudflare.com/turnstile/v0/siteverify

secret=YOUR_SECRET_KEY
response=TOKEN
success: truehostname: = expectedaction: = expected

If you run the site, your server validates every Turnstile token by sending a POST request to https://challenges.cloudflare.com/turnstile/v0/siteverify. The endpoint accepts application/x-www-form-urlencoded and JSON and always returns JSON. Required parameters: secret (your widget's secret key) and response (the token). Optional: remoteip and idempotency_key. Check success and, if you set them, also action and hostname in the response.

A token is valid for 300 seconds and can be validated only once. Read more in Cloudflare's validation guide.

Turnstile test: dummy sitekeys and secret keys

Cloudflare provides dummy sitekeys and secret keys so you can test a Turnstile implementation without triggering real challenges. Test sitekeys work on any domain, including localhost, and generate the dummy token XXXX.DUMMY.TOKEN.XXXX. Dummy tokens are accepted only by dummy secret keys, and production secret keys reject them.

1x… always passes2x… always fails3x… interactive / spentXXXX.DUMMY.TOKEN.XXXX

Dummy sitekeys

cf-turnstile · dummy sitekey
<div class="cf-turnstile"
  data-sitekey="1x…AA">
</div>

cf-turnstile-response:
  "XXXX.DUMMY.TOKEN.XXXX"
Works on any domain, including localhost
PassesFailsInteractive
Passesvisible

1x00000000000000000000AA

Always passes

Failsvisible

2x00000000000000000000AB

Always fails

Passesinvisible

1x00000000000000000000BB

Always passes

Failsinvisible

2x00000000000000000000BB

Always fails

Interactivevisible

3x00000000000000000000FF

Forces an interactive challenge

Dummy secret keys

Passessecret

1x0000000000000000000000000000000AA

Always passes validation

Failssecret

2x0000000000000000000000000000000AA

Always fails validation

Spentsecret

3x0000000000000000000000000000000AA

Returns the "token already spent" error (timeout-or-duplicate)

Cloudflare's full reference: Turnstile testing.

Cloudflare Siteverify error codes

When validation fails, Cloudflare's Siteverify API returns an error-codes array. The table below lists each code and what it means.

siteverify · response
{
  "success": false,
  "error-codes": [
    "timeout-or-duplicate"
  ]
}
Check the error-codes array in every Siteverify response
SecretTokenRequest
Secreterror-codes

missing-input-secret

The secret parameter was not provided

Secreterror-codes

invalid-input-secret

The secret key is invalid or expired

Tokenerror-codes

missing-input-response

The response parameter (token) was not provided

Tokenerror-codes

invalid-input-response

The token is invalid, malformed or expired

Requesterror-codes

bad-request

The request is malformed

Tokenerror-codes

timeout-or-duplicate

The token has already been validated or has expired

Requesterror-codes

internal-error

An internal error occurred; retry the request

Siteverify can return success: true and your server should still reject the token if hostname or action do not match what you expect.

Frequently Asked Questions about Cloudflare Turnstile

Short answers about solving Cloudflare Turnstile with CapMonster Cloud: modes, proxies, tokens, testing and Siteverify errors.

What is Cloudflare Turnstile and what modes does it have?

Cloudflare Turnstile is a CAPTCHA alternative from Cloudflare that verifies visitors through browser signals and risk assessment instead of image puzzles. It has three widget modes. Managed (recommended): Cloudflare chooses between a non-interactive check and a checkbox based on visitor risk. Non-interactive: a visible widget with a loading spinner that never requires interaction. Invisible: no widget at all. CapMonster Cloud handles all three automatically, so you do not specify the mode in the task.

Do I need a proxy to solve Cloudflare Turnstile?

No. TurnstileTask works without a proxy, and the proxy fields (proxyType, proxyAddress, proxyPort, proxyLogin, proxyPassword) are optional. A proxy that matches the geography of the target site can improve results on geo-sensitive pages, so it is worth testing both configurations. Transparent proxies and proxies on local machines are not allowed. Without your own proxy, CapMonster Cloud solves the task through its built-in proxies (IP address 65.21.190.34).

Where can I find the websiteKey and pageAction parameters?

Open DevTools, find the element with the data-sitekey attribute (and data-action, if the page sets an action) and copy the values; a Turnstile site key looks like 0x4AAAAAAABUYP0XeMJF0xoy. Some values change every time the page loads, so extract them right before creating the task. Step-by-step instructions are in the section above.

What is the cf-turnstile-response token and how long is it valid?

cf-turnstile-response is the hidden form field that holds the Turnstile token. The token is valid for 300 seconds (5 minutes) and can be validated only once; after that Siteverify returns the timeout-or-duplicate error. Submit the token you received from CapMonster Cloud right away and request a new one for every submission.

How to insert a Turnstile token with Playwright, Puppeteer, or Selenium?

To insert a Turnstile token, find the hidden response field (an input named cf-turnstile-response) and set it to the token retrieved from CapMonster Cloud. Here is how to do it across the three automation frameworks.

Playwright / Puppeteer (Node.js):

javascript
const token = "YOUR_TOKEN";
await page.evaluate((t) => {
  document.querySelector('[name="cf-turnstile-response"]').value = t;
}, token);
await page.click('#submit-btn');

Selenium (Python):

javascript
token = "YOUR_TOKEN"
driver.execute_script("document.querySelector('[name=\"cf-turnstile-response\"]').value = arguments[0];", token)
driver.find_element("id", "submit-btn").click()

If the form validates the token through a callback function (the data-callback attribute of the widget), call that function with the token instead.

How can I test Cloudflare Turnstile?

Use Cloudflare's dummy keys. On the client, set the sitekey to 1x00000000000000000000AA (always passes), 2x00000000000000000000AB (always fails) or 3x00000000000000000000FF (forces an interactive challenge); on the server, use a dummy secret key such as 1x0000000000000000000000000000000AA. Dummy sitekeys work on any domain, including localhost, and produce the token XXXX.DUMMY.TOKEN.XXXX, which only dummy secret keys accept. The full list is in the test section above.

Why does Siteverify reject my Turnstile token?

Siteverify returns success: false when the token is older than 300 seconds, has already been validated, or the secret key is wrong, and your server may also reject it if the returned hostname or action does not match what you expect. Check the error-codes array in the response and see the Siteverify error code table. Request a new token for every submission and send it right after you receive it.

CapMonster Cloud

* We do not guarantee a 100% success rate: CAPTCHA types and target-site configuration may change at any time. CapMonster Cloud delivers a high success rate for Cloudflare Turnstile solving. Based on CapMonster Cloud Team's internal monthly benchmarking. Actual solving speed and success rate vary depending on the target site, server load, and network conditions.

Cloudflare and Turnstile are trademarks of Cloudflare, Inc. CapMonster Cloud is not affiliated with or endorsed by Cloudflare. The Service is intended for publicly available data, testing your own or authorized websites, image recognition and accessibility. Collecting third-party data behind a login or paywall without permission is prohibited; your own accounts are not affected. You determine the legal status of your data before starting work.