Before you start
Use the CAPTCHA setup example to start a browser withanti_captcha.enabled: true and create a page-level cdp session. The snippets below use an async Playwright or Puppeteer session after navigating to your target.
The internal solver does not require an external provider key. To test it without another solver acting on the same challenge, start with disable_external_providers: true.
Turnstile signals include browser-level checks like TLS fingerprint and Client Hints, not just the visible widget. A page can still block a request that never shows a challenge at all — the invisible check is not the same as “no protection.”
Manual captcha solving
Wait for the challenge to appear, then send:Automatic captcha solving
Include"turnstile" in anti_captcha.auto_captcha_types at startup. Attach solve event listeners, then start detection before navigating:
status: "started" confirms the background loop started. Observe failures and use a bounded wait for your page result. Keep the CDP session connected until the job completes.
Reducing challenges
Most Turnstile checks run invisibly and never surface a challenge for a clean session — a widget only appears once the risk signal is high enough. If detection consistently fails to find the challenge, inspect the page for a Turnstile iframe and wait for it to load; the page may have already passed the invisible check, or it may be blocked before a challenge ever renders.Verify bypass worked
status: "success" confirms the challenge widget accepted the interaction, not that the target page unblocked the protected content. Wait for a selector or response that identifies that content before treating the job as done.
Check solver configuration, inspect one attempt in DevTools, and record the result or error before retrying. Stop the browser when the job ends.
Turnstile bypass FAQ
Does Turnstile always show a visible challenge?
Does Turnstile always show a visible challenge?
No — most visitors pass invisibly. Cloudflare only surfaces a Managed, Non-Interactive, or Interactive widget when the risk signal from behavior and browser fingerprint is high enough.
Do I need an external provider key for Turnstile?
Do I need an external provider key for Turnstile?
No. The internal solver handles it without one. Use
disable_external_providers: true if you want to confirm the internal solver alone is doing the work.Why does detection fail to find a Turnstile challenge?
Why does detection fail to find a Turnstile challenge?
The page may have already passed the invisible check with no widget shown, or it may be blocking the request before any challenge renders. Inspect for a Turnstile iframe and wait for it to load before assuming detection is broken.
A solve reports success but the page is still blocked — why?
A solve reports success but the page is still blocked — why?
A success status confirms the widget accepted the interaction, not that the site’s own check passed. Wait for the protected content or a successful response before assuming the job is done.