How to Bypass Cloudflare When Scraping
To get past Cloudflare when scraping, make every request consistent with what it claims to be: a real browser, or an HTTP client with a real browser's TLS fingerprint, at a sensible rate, with cookies kept for the session and an IP with a good reputation, because Cloudflare scores all of these and not only the IP. Libraries built to defeat its challenges, such as cloudscraper and FlareSolverr, break whenever Cloudflare changes, and Turnstile needs a real browser or a solver; on many sites the simplest route is an official API or the site's own JSON endpoints. ProxyField's residential proxies cover the IP part, with 412M+ IPs and sticky sessions up to 36 h from $1.95/GB; start with the Easy Trial: 1 GB for $2.95.
- residential IPs
- 412M+
- from, traffic never expires
- $1.95/GB
- Easy Trial
- 1 GB for $2.95
On this page 8 sections
How Cloudflare blocks scrapers
Cloudflare checks a request in layers, and a scraper can fail at any of them:
| Layer | What it checks | What you see when it fires |
|---|---|---|
| IP and network rules | IP reputation, the network (ASN), the country | A block page or a challenge for some IPs only |
| Rate limiting | Requests per IP or session in a time window | Error 1015 or 429 after a burst |
| WAF custom rules | Paths, headers, countries, fingerprints the site owner chose | Error 1020 "Access denied" |
| Bot score | A score from 1 (automated) to 99 (human) from heuristics, machine learning and JavaScript detections | A challenge or block on low scores |
| TLS fingerprint | JA3 and JA4 of the client, available to Enterprise Bot Management | Blocks that follow the client, not the IP |
| Challenges | Managed and JavaScript challenges, Turnstile widgets | "Just a moment..." or "Verify you are human" |
The bot score row follows Cloudflare's bot score documentation, which lists heuristics, machine learning and JavaScript detections ("identifies headless browsers and other automation tools") among the engines; the TLS row follows its JA3/JA4 page. How each signal works is in why Cloudflare thinks you are a bot. If you already have an error code, start from Cloudflare 403 Forbidden or Cloudflare Access Denied errors.
What works in 2026, method by method
No single trick gets past Cloudflare; each method fixes some layers and not others.
| Method | Fixes | Does not fix | Upkeep |
|---|---|---|---|
| Official API, data feed or the owner's permission | Everything: no challenge | Nothing, if the data is there | Low |
| The site's own JSON endpoints | Heavy pages, some challenges | Endpoints behind the same rules | Medium: endpoints change |
| Real browser (Playwright, Puppeteer, Selenium) with a sticky residential IP | JavaScript challenges, TLS and HTTP/2 fingerprints, cookies | Automation traces, rate limits | Medium |
| Stealth patches for automated browsers | Some automation traces | Detection that changes faster than the patches | High |
HTTP client with a browser TLS fingerprint (curl_cffi) | TLS and HTTP/2 fingerprint mismatches | JavaScript challenges | Low to medium |
| cloudscraper | Older JavaScript challenges | Turnstile without a solver; current detection | High |
| FlareSolverr | Challenge pages, through a real Chrome | CAPTCHAs: "none of the captcha solvers work" | High; heavy on memory |
| Residential or mobile IPs | IP reputation, data center network rules, per-IP rate limits | Fingerprints, JavaScript, behavior | Low |
| A scraping API | Running the fetch yourself | Sites that block automated access outright | Low |
1. Use an API or ask for access
If the site offers an API, a data export or a partner feed, use it. Many sites behind Cloudflare also load their data from JSON endpoints you can see in the browser's network tab; calling those directly is lighter than rendering pages, though the same Cloudflare rules can protect them.
2. Drive a real browser, on one sticky IP per session
A real browser runs the challenge scripts, sends a genuine TLS handshake and HTTP/2 settings, and keeps the cf_clearance cookie that records a passed challenge (Cloudflare cookies). Keep one IP and one browser context for the whole session, so the clearance stays valid, and rotate between sessions. Setup: Playwright, Puppeteer, Selenium.
3. Patch the automation traces, and expect upkeep
Headless browsers and WebDriver leave traces that Cloudflare's JavaScript detections look for. Stealth plugins and patched drivers hide some of them, but detection changes faster than the patches, so a setup that works this month can fail the next. Headed mode on a desktop-like machine leaves fewer traces than default headless mode, at a higher cost per page.
4. Match the TLS fingerprint for plain HTTP requests
For pages that show no JavaScript challenge, an HTTP client that impersonates a browser's TLS and HTTP/2 fingerprint avoids the cost of a browser. curl_cffi does this in Python (lexiforest/curl_cffi); see TLS and TCP fingerprinting for what the fingerprint contains.
5. Know what cloudscraper and FlareSolverr can do today
- cloudscraper is a Python module, built on Requests, that solves Cloudflare's JavaScript challenges with a JavaScript interpreter. Its README claims support for all challenge types, but its Turnstile path "requires external configuration (proxies/API keys)" and its example uses a paid CAPTCHA solver (VeNoMouS/cloudscraper, MIT).
- FlareSolverr is a proxy server you run yourself: for each request it starts Chrome through Selenium and undetected-chromedriver, waits for the challenge to clear, and returns the HTML and cookies. Its README says "at this time none of the captcha solvers work", and each request starts a browser, so memory use is high (FlareSolverr, MIT).
Both can help on sites with light protection. Neither is a durable answer, and both depend on how quickly their maintainers follow Cloudflare's changes.
6. Change the IP type
If one IP passes where another fails, or you see blocks on data center IPs only, the rule is about IP reputation or the network. Move to residential proxies, mobile proxies or static residential (ISP) proxies, and spread requests so no single IP hits a rate limit. A new IP does not change your client, so methods 2 to 4 still apply.
7. Consider a scraping API
Some scraping APIs run the browser and the IPs for you, so you send a URL and get the page back. None is a guaranteed way past Cloudflare: test one on your own target before you rely on it, and the same rules on access and terms apply.
ProxyField's Web Scraping API fetches any URL as plain HTTP or with JavaScript rendering, billed on successful results only; contact sales.
Python: requests, curl_cffi or a browser?
Plain Python requests fails on most Cloudflare-protected pages: its TLS handshake identifies it as Python whatever User-Agent you send, and it runs no JavaScript. Use curl_cffi where there is no JavaScript challenge, and a browser where there is. This script tries the light client first and reports when a browser is needed. Replace <login> and <password>.
from curl_cffi import requests
PROXY = "http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000"
def fetch(url):
r = requests.get(url, impersonate="chrome",
proxies={"http": PROXY, "https": PROXY}, timeout=30)
if r.headers.get("cf-mitigated") == "challenge":
return None, "challenge page: load this URL in a real browser"
if r.status_code in (403, 429):
return None, f"blocked ({r.status_code}): slow down, check the IP and the client"
return r.text, "ok"
html, status = fetch("https://example.com/")
print(status)Cloudflare marks challenge responses with the cf-mitigated: challenge header (Detect a Challenge Page response), so the check above is reliable. For a session that must keep one IP, use a sticky session (30 s to 36 h): -region-<region>, -session-<id> and -ttl-<seconds> (30 to 129,600 seconds, 20 minutes by default) after the location, as in <login>-country-us-region-new_york-city-new_york-session-he9f2qga-ttl-600. More on the gateway in Python: Python requests with proxies.
Scrapy, Puppeteer and Selenium
- Scrapy. Scrapy's default downloader has its own TLS fingerprint and runs no JavaScript. For Cloudflare pages, render them through a browser with the scrapy-playwright download handler, or send them through a scraping API, and keep Scrapy for the parsing and the crawl logic.
- Puppeteer. Launch Chrome with
--proxy-server=http://gate.proxyfield.io:7000, authenticate withpage.authenticate(), keep one browser context per session, and wait for the challenge to clear before you read the page. See Puppeteer with proxies. - Selenium. Plain ChromeDriver exposes WebDriver traces that challenges look for; expect more challenges than with Playwright or Puppeteer in headed mode. See Selenium with proxies.
Cloudflare Turnstile
Turnstile is Cloudflare's CAPTCHA alternative: a widget that runs "non-interactive JavaScript challenges" such as proof-of-work and browser checks, with managed, non-interactive and invisible modes, and it can sit on any site, not only sites behind Cloudflare (Cloudflare: Turnstile). It returns a token the site checks on its server. That leaves two ways through: a real, consistent browser that passes the checks, or a solver service that returns a valid token, which your script then submits. HTTP-only tools cannot run the widget. Solver options and their limits are in CAPTCHA solver services compared.
Why a working Cloudflare setup suddenly stops
Cloudflare updates its detections continuously, and the tools that get past them follow with a delay. When a setup that worked starts failing, check in this order: a new browser or library version that changed your fingerprint, a stealth plugin that no longer hides what it used to, a rotation setting that now changes the IP inside a session, a higher request rate, and a change on the site itself, such as a new WAF rule. Keep a small test that loads one protected page per run, so you notice the day it breaks.
When to stop
If every IP and client you try is blocked, the site does not want automated access, and getting past a barrier the owner set up on purpose can raise legal risk. Read the terms, check robots.txt, and ask the owner for access: is web scraping legal covers the rules.
Residential IPs for the IP layer. ProxyField residential proxies: 412M+ IPs in 195+ countries, per-request rotation or sticky sessions up to 36 h, a 99.6% success rate according to our service data. From $1.95/GB, no subscription; start with the Easy Trial (1 GB). Traffic never expires, and all purchases are final.
How to Bypass Cloudflare When Scraping FAQ
How do I bypass Cloudflare when scraping?
ProxyField's 412M+ residential IPs, from $1.95/GB on a sticky session, cover the IP front; to get past Cloudflare when scraping, make each request consistent on all 4 fronts: a real browser or a browser-like TLS fingerprint, a moderate rate, cookies kept per session, and an IP with a good reputation. Use an official API or the site's JSON endpoints where they exist, and stop if the site blocks automated access on purpose.
Does Cloudflare prevent scraping?
It can, if the site owner turns on bot protection: rate limits, WAF rules, bot scores and challenges stop many scrapers, especially plain HTTP clients on data center IPs. Sites with default settings stop far less, and each site's owner decides how strict to be.
How do I get around a Cloudflare block?
Find which layer blocked you (the error code, a challenge page or a block on some IPs only), then fix that layer: slow down for rate limits, use a real browser for challenges, match the TLS fingerprint, or change the IP type for reputation rules. If the block follows you across every IP and client, the site doesn't want automated access.
Can I bypass Cloudflare with Python requests?
Rarely. Requests has a recognizable Python TLS fingerprint and runs no JavaScript, so it fails on challenge pages and on sites that filter by fingerprint; use curl_cffi with impersonate="chrome" for pages without a challenge, and a browser for the rest.
Is cloudscraper good for bypassing Cloudflare?
Only on lightly protected sites. It solves older JavaScript challenges inside Python, but its Turnstile support needs an external CAPTCHA solver, and it breaks when Cloudflare changes its challenges.
What is FlareSolverr?
An open-source proxy server you run yourself: for each request it opens Chrome through Selenium and undetected-chromedriver, waits for the Cloudflare challenge to clear and returns the HTML and cookies. Its README says none of its CAPTCHA solvers currently work, and each request starts a browser, so it is heavy at volume.
Does curl_cffi bypass Cloudflare?
It gets past checks that look at the TLS and HTTP/2 fingerprint, because it impersonates a real browser's handshake. It runs no JavaScript, so it can't pass a challenge page or a Turnstile widget.
What is Cloudflare Turnstile?
Cloudflare's CAPTCHA alternative: a widget a site embeds that runs small JavaScript challenges in the browser and usually shows no puzzle, returning a token the site verifies. It works on any site, not only sites behind Cloudflare.
How do I get a Cloudflare Turnstile check to pass when scraping?
Either pass it with a real, consistent browser on a clean IP, or get a token from a CAPTCHA solver service and submit it as the page would. HTTP-only clients can't run the widget at all.
How do I bypass Cloudflare with Puppeteer?
Run Chrome through a residential proxy with one sticky IP per browser context, wait for the challenge to clear before reading the page, and keep the context's cookies for later pages. Default headless mode and automation traces still raise the bot score, so expect some challenges.
Show 3 more questionsShow fewer questions
How do I bypass Cloudflare in Scrapy?
Scrapy's own downloader can't run challenges, so render protected pages through a browser with the scrapy-playwright download handler and keep Scrapy for crawling and parsing. Pages without a JavaScript challenge may pass with a browser-like TLS client and a moderate rate.
Why did my Cloudflare bypass suddenly stop working?
Usually because Cloudflare updated its detection, or something on your side changed: a browser or library update changed your fingerprint, a stealth patch stopped hiding what it used to, the IP started rotating inside sessions, or the rate went up. A small daily test on one protected page shows the day it breaks.
Is there a way to bypass Cloudflare without a browser?
For pages without a JavaScript challenge, yes: an HTTP client with a browser TLS fingerprint, a good IP and a moderate rate often passes. Pages with a challenge or Turnstile need a browser, a solver token or a scraping API.
Related pages
Easy Trial: 1 GB for $2.95.
Try for the price of 1 GB, no subscription, traffic never expires.