NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

CAPTCHA solving

How do automation scripts get past Cloudflare checks?

By first working out which Cloudflare check they face: a Turnstile widget inside a form needs a token, while a full screen challenge page needs a clearance cookie.

Two different checks behind one brand

Cloudflare protects sites in two visible ways. Turnstile is a widget embedded in a form, much like a checkbox CAPTCHA, and it produces a token the form sends with the POST. The challenge page is a full screen interstitial ("Just a moment..." or "Verify you are human") that stands in front of the whole site, and passing it sets a cf_clearance cookie. Scripts handle the first with a Turnstile task and the second with a Cloudflare Challenge task.

Telling them apart

  • Turnstile: the page loads normally, and a small box sits inside a form. The HTML has a cf-turnstile element with a data-sitekey that starts with 0x4.
  • Challenge page: your request returns HTTP 403 or 503 with a Cloudflare interstitial instead of the content you wanted, and the real page appears only after the check.
  • Hard block: error pages such as 1020 mean a firewall rule refused you outright. No CAPTCHA answer fixes that; the guide to error 1020 explains why.

The article on identifying Cloudflare protection has more signals, including response headers.

Handling a Turnstile widget

Read the site key and the page URL, create an AntiTurnstileTaskProxyLess task, and place the returned token in the cf-turnstile-response field or pass it to the widget's callback. Widgets that carry their own data-action or data-cdata attributes expect those values back, so copy both into the task's metadata object. A typical solve finishes under 3 seconds.

Handling a challenge page

The challenge task needs your proxy, because the cookie it earns is only honored from that IP. You send the URL that shows the interstitial and the proxy; the answer carries the cookie and the user agent to pair with it.

import requests

job = {
    "type": "AntiCloudflareTask",
    "websiteURL": "https://catalog.example.com/products",
    "proxy": "http://cf_pool7:Rq83vLm@198.51.100.7:8000",
}
# ...create the task, poll, then:
def session_from(solution, proxy_url):
    s = requests.Session()
    s.proxies = {"http": proxy_url, "https": proxy_url}
    s.headers["User-Agent"] = solution["userAgent"]
    s.cookies.set("cf_clearance", solution["cookies"]["cf_clearance"])
    return s

Keep using that session for later requests. When the interstitial comes back, solve again. A plain HTTP client may still look unusual to Cloudflare because of its TLS fingerprint, so if the cookie is refused while proxy and user agent match, try a client that imitates a browser handshake.

Reducing how often you see checks

Cloudflare raises checks when traffic looks automated: high request rates, IPs with a poor record, or headers that do not match the claimed browser. Pacing requests, keeping one proxy per session, and sending consistent headers cuts the number of solves you need. The guide to scraping without getting blocked lists the main habits.

Browser or plain HTTP client?

Both work. In a browser driven by Playwright or Puppeteer, you inject the Turnstile token into the page, or add the clearance cookie to the browser context before you navigate, and let the page carry on as usual. With a plain HTTP client you send the token in the form body, or attach the cookie and user agent to every request. The browser route copes better with pages that run extra scripts after the check; the HTTP route is lighter and faster once you know which requests matter. Many teams solve and explore with a browser, then move the stable parts to plain requests.

Use this for public data collection, monitoring, testing your own sites and similar work. Cloudflare checks often guard login and signup forms; automate those only for accounts and sites you are entitled to use.

Common questions

Does a Turnstile token also clear the challenge page?

No. The widget token is for one form submit, while the challenge page needs its own clearance cookie.

Can I use cf_clearance from a different IP?

Generally no. Cloudflare checks the cookie against the IP and user agent that earned it.

Why does my request still get 403 with a valid cookie?

Often the user agent or TLS fingerprint differs from the solve, or a firewall rule blocks the request regardless of the cookie.

Which GateSolver type handles the "Just a moment" screen?

AntiCloudflareTask, which needs the page URL and your proxy and returns cf_clearance plus a user agent.

Can Cloudflare error 1020 be solved with a task?

No. 1020 is an access rule block, not a challenge, so there is nothing to solve.

Keep reading