Back to blog

How to Bypass Cloudflare: Methods That Work

Share article:

Cloudflare now sits in front of 24.7% of all websites (W3Techs, August 2026), so learning how to bypass Cloudflare is unavoidable if you collect public web data at any scale. The hard part is that it scores you across four layers at once: TLS handshake, HTTP/2 frames, IP reputation, and in-browser JavaScript. Pass three and fail one, and you still get blocked. This guide covers the methods that survived Cloudflare's 2025-2026 detection updates, the ones that quietly stopped working, and how to tell which you actually need.

How to Bypass Cloudflare

TL;DR

  • To bypass Cloudflare, match a real browser at every layer it inspects. Use a TLS-impersonating HTTP client such as curl_cffi for static pages, a patched stealth browser such as Camoufox or SeleniumBase for JavaScript challenges, route both through rotating residential IPs, and persist the cf_clearance cookie between requests.
  • Cloudflare scores every request across four layers, and a mismatch on any one of them is enough to get you blocked.
  • The current working stack is curl_cffi or curl-impersonate for TLS, Camoufox, SeleniumBase UC mode or nodriver for browser challenges, and rotating residential IPs underneath both.
  • Legacy stealth patches (puppeteer-extra-plugin-stealth, playwright-stealth, undetected-chromedriver) are now detected on most Cloudflare Managed Challenge deployments.
  • Below roughly 1,000 requests/day a DIY stack is realistic; above that, patch maintenance usually costs more than a managed API.
  • Turnstile cannot be reliably solved by scripted interaction, so the goal is to avoid triggering it rather than to solve it.

Cloudflare bypass methods compared

Method

Best for

Effort

Survives Turnstile?

curl_cffi / curl-impersonate

Static pages behind Bot Fight Mode

Low. One dependency, no browser

No. Avoids it on low-difficulty targets

Camoufox / SeleniumBase UC

JS challenges and Managed Challenge

Medium. Real browser overhead

Usually, when paired with clean residential IPs

nodriver

Python teams replacing undetected-chromedriver

Medium. CDP-level control, no Selenium

Sometimes. Depends on target's challenge tier

FlareSolverr

Self-hosted proxy for occasional challenge solving

Medium. Container to run and update

No. Handles JS challenges, not Turnstile

Managed scraping API

Production pipelines above ~1,000 requests/day

Low. No stack to maintain

Yes. Handled provider-side

How Cloudflare detects and blocks automated traffic

Cloudflare assesses your requests across several layers, and getting familiarized with them will help you understand why simple HTTP requests fail instantly. Cloudflare needs microseconds to identify automated traffic as it evaluates every HTTP request via a multi-layered scoring system. 

Pre-connection level: Network and protocol fingerprinting

Your scraper hasn't even sent an HTTP request, but Cloudflare has already started analyzing certain network-level signals. First, it looks at TLS fingerprinting, examining the "Client Hello" message during the SSL/TLS handshake (JA3 or JA4 hashes). Each client type has distinct connection characteristics, so its fingerprint becomes an identifier. This means that, in web scraping and automation, even if you rotate IPs, your TLS stack stays the same. Python Requests' TLS signatures are clearly different from a real browser, and their fingerprints scream "bots." curl-impersonate and Curlium-style HTTP clients exist to spoof browser TLS signatures.

Cloudflare will check HTTP/2 Fingerprinting, looking for differences between standard libraries and real browsers. It will also inspect the IP reputation to verify that the IP isn't associated with data centers or malicious botnets. As Cloudflare's global network feeds IP reputation data, an IP flagged on one site affects requests everywhere.

Therefore, inconsistency becomes the biggest red flag, and consistency becomes key. Your HTTP layer may say "Chrome", but your TLS fingerprint shows Requests. Using Playwright to rely on a real browser TLS stack is a good option in this case. 

Execution level: Browser and device fingerprinting

Browser fingerprinting is an advanced security tool that detects and blocks web scrapers. When Cloudflare-protected pages load in a browser, invisible and lightweight JavaScript starts running to collect hardware and software metrics in great detail. Scrapers that don't execute JS fail immediately.

Canvas rendering, WebGL metadata, font enumeration, audio context, and navigator properties create a unique device fingerprint. The mechanism renders a hidden image or a 3D scene to measure how your graphics card, driver, and anti-aliasing process the pixels. It scans the fonts installed on the OS and measures audio output signatures. It also checks the number of logical processor cores and device memory constraints, and evaluates properties like plugins, screen resolution, time zone, and language settings. 

Behavioral analysis

Cloudflare constantly observes your behavior, namely mouse movements, keystrokes, scroll depth, and touch events. 

"Checking your browser" interstitial: runs complex client-side JS challenges and browser fingerprinting instead of traditional cryptographic Proof-of-Work (PoW). These challenges work as a puzzle that a human browser solves in milliseconds, but scrapers fail. 

Turnstile: a CAPTCHA-free alternative introduced in 2022, which verifies actual users via non-interactive background JavaScript challenges instead of making them solve visual puzzles. There are three Turnstile modes: non-interactive (invisible), managed (invisible with a brief check), and interactive (always displays a click-to-proceed prompt).

Cloudflare bypass methods that still work in 2026

The methods below are ordered by cost, cheapest first. Start with the lightest option that clears your target, because every step up adds either latency or maintenance. If you are specifically looking for the cloudflare-scraper Python library rather than bypass methods in general, that is covered separately in our Cloudflare scraper guide.

TLS impersonation with curl_cffi

Most Cloudflare blocks happen before your code sends a single header. Python's requests library has a JA3/JA4 fingerprint that no browser produces, so the handshake alone identifies you. curl_cffi wraps curl-impersonate and replays Chrome's exact cipher suite order, extensions, and HTTP/2 SETTINGS frame. On targets running Bot Fight Mode or low-difficulty Managed Challenge, this one change is often enough, and it costs nothing in latency because there is no browser to launch.

Install it with pip:

pip install curl_cffi

The snippet below requests a Cloudflare-protected page while impersonating Chrome 131, routed through a residential IP. The sandbox website quotes.toscrape.com is a safe place to confirm the client works before pointing it at a harder target.

from curl_cffi import requests
resp = requests.get( "https://quotes.toscrape.com", impersonate="chrome131", proxies={"https": "http://USER:PASS@gate.decodo.com:7000"})
print(resp.status_code)print(resp.text[:200])

If curl_cffi returns a challenge page rather than HTML, the target is running an active JavaScript challenge and no HTTP client will clear it. Move up to a browser.

Bypassing Cloudflare Puppeteer with stealth plugins

To bypass Cloudflare protection with Puppeteer, you'll need to install puppeteer-extra and puppeteer-extra-plugin-stealth. Puppeteer Extra is the base framework, while puppeteer-extra-plugin-stealth is an individual plugin that relies on puppeteer-extra to patch navigator properties, spoof user agents, and hide the window.navigator.webdriver flag. 

Installation:

npm install puppeteer-extra puppeteer-extra-plugin-stealth

Basic Setup:

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
(async () => {
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
await page.goto('https://protected-site.com');
// ... scraping logic
await browser.close();
})();

Here's a simple example showing how developers reduce automated browser detection on publicly accessible websites using these tools. It launches Chrome in headed mode (headless: false), randomizes viewport size and the user agent, visits a public employment portal protected by Cloudflare, and extracts job titles.

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.setViewport({
width: 1200 + Math.floor(Math.random() * 200),
height: 800 + Math.floor(Math.random() * 200)
});
await page.setUserAgent(
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/124 Safari/537.36'
);
await page.goto(
'https://www.usajobs.gov/Search/Results?k=python',
{ waitUntil: 'networkidle2' }
);
await page.waitForSelector('h2.font-normal.mr-2.mt-0 a');
const jobs = await page.$$eval(
'h2.font-normal.mr-2.mt-0 a',
els => els.map(el => el.innerText.trim())
);
console.log(jobs);
await browser.close();
})();

Run the script:

node scraper.js

Note: puppeteer-extra-plugin-stealth still clears Bot Fight Mode and older JavaScript challenges, but it has open, unresolved detection issues against Cloudflare's Managed Challenge. If this script returns an interstitial rather than page content, the fix is a purpose-built stealth browser, not more patches on top of Puppeteer. 

Stealth browsers: Camoufox, SeleniumBase UC mode, and Patchright

When a target executes JavaScript before serving content, you need a browser that does not leak automation artifacts. Stock Playwright and Puppeteer both do, and the long-standing patches on top of them (puppeteer-extra-plugin-stealth, playwright-stealth) have open, unresolved detection issues against Cloudflare. The maintained alternatives are Camoufox, a Firefox build with fingerprint spoofing compiled in rather than patched at runtime, and SeleniumBase's UC mode, which reconnects the driver only after the challenge clears.

Camoufox is the stronger default because its fingerprint surface is set at build time, so there is no injected JavaScript for Cloudflare to detect. SeleniumBase UC mode is the easier migration if your team already runs Selenium. Either way, pair the browser with rotating residential IPs, because a clean fingerprint on a flagged datacenter IP still fails.

Persistent browser contexts matter as much as the stealth layer. Saving cookies, cache, and local storage to disk lets you carry a solved challenge across runs instead of re-triggering it on every request:

from playwright.sync_api import sync_playwright
with sync_playwright() as p:
# Launches browser and saves sessions/cookies in the specified folder
context = p.chromium.launch_persistent_context(
user_data_dir="./playwright_session",
headless=False
)
page = context.new_page()
page.goto("https://example.com/login")
# Do your manual login here.
context.close()

nodriver (Python)

nodriver is a Python library for browser automation and web scraping built as the successor to Undetected ChromeDriver. Instead of relying on Selenium and a separate ChromeDriver binary, it communicates directly with Chrome and uses an asynchronous API. This reduces common WebDriver automation signals while keeping the setup relatively lightweight for Python workflows.

To get started, install the package via pip:

pip install nodriver

This basic script will initialize a protected session:

import nodriver as uc
async def main():
browser = await uc.start()
page = await browser.get("https://nowsecure.nl")
# Continue interacting with the page here
browser.stop()
if __name__ == "__main__":
uc.loop().run_until_complete(main())

nodriver can reduce browser-level automation signals, but it doesn't hide your IP address. For scraping at scale, you'll still need proxy rotation to reduce IP-based rate limits and blocks.

Proxy rotation

Using residential proxies is a must when bypassing Cloudflare protection. They utilize IP addresses assigned to real household devices so that your traffic looks like a real human user, granting them high trust scores. High reputation and rotating IPs are vital for bypassing IP reputation checks. Decodo residential proxies offer 115M+ ethically-sourced IPs in 195+ locations. Users can select IPs from specific countries to bypass geo-fencing or region-specific Cloudflare firewall rules. Datacenter proxies, while cheaper, are not a good idea in this scenario, because they're easily detected, flagged, and blocked. 

Proxy rotation allows bots to harvest data from sites with strict anti-bot protections without triggering CAPTCHAs or IP bans. Rotate IPs per request for general scraping to avoid rate limits, or use sticky sessions (keeping the same IP for 10-30 minutes) for multi-page flows like logins. Decodo rotating proxies give your project fresh IPs for every single request, enabling you to bypass blocks, CAPTCHAs, and geo-limits.

Also, match your proxy's IP location to the target site's primary audience to avoid geographic mismatches. If a site's primary audience is in the United States, your proxy must route through a US residential IP address.

To rotate per request, configure your HTTP client (like Python Requests) with a backconnect proxy string, and to use sticky sessions, append the sticky argument (e.g., sessionId=12345) to your proxy username so that the backconnect server holds the same exit node. Alternatively, you can set the port to 7000 so that the proxy rotates on every request without any need for manual configuration. Decodo provides you with both rotating and sticky session options.

Cloudflare handled for you

Decodo's Web Data API bypasses Cloudflare's bot detection, JS challenges, and CAPTCHAs automatically. Your code makes one request and gets clean HTML back.

Handling CAPTCHAs, JavaScript challenges, and Turnstile

Bypassing Cloudflare's interactive anti-bot barriers is tricky. You can choose to go with one of the DIY methods or leave it all to a specialized API. Keep in mind that DIY methods are a good choice for small-scale work, but ultimately come with a massive maintenance burden.  

Handling CAPTCHAs and challenges manually (aka DIY) requires creating automated requests that can't be distinguished from humans. Methods include: 

  • Impersonating a real browser's TLS fingerprint
  • JavaScript and challenge handling
  • Sending requests directly to the server's origin IP instead of the domain name
  • Using fortified headless browsers (e.g., Puppeteer with stealth plugins)

JavaScript challenge pages

Cloudflare's "Checking your browser" screen is an automated validation sequence you'll commonly see when automating with headless browsers like Playwright. During the spinner phase, a hidden script checks for hardware acceleration, rendering speeds, and tests if drawing to an HTML5 canvas produces a unique, device-specific fingerprint. It validates native APIs, looking for inconsistencies that typically reveal headless automation frameworks like Puppeteer. Moreover, it validates TLS/SSL handshakes, HTTP/2 signatures, and browser headers.

To handle this hurdle:

  • Avoid page.waitForNavigation() alone, as it often times out/fails
  • Use page.waitForSelector('.main-content') or page.waitForFunction() to detect when the site content appears
  • Use a randomized interval if using a delay (3-5 seconds)

Once you have a cf_clearance cookie, reuse it to maintain session persistence and avoid repeated Cloudflare challenges across the following requests. But be careful: Cloudflare will easily notice any mismatch and will invalidate the token immediately, returning you to the "checking your browser" screen. To avoid this, make sure the IP address, user-agent, and TLS fingerprinting align completely.

cf_clearance is the token Cloudflare issues once a challenge is solved, and reusing it correctly is the single cheapest optimization available: it turns one expensive browser session into hundreds of cheap HTTP requests. The cookie is bound to three things at once, and breaking any of them invalidates it instantly.

The cookie is bound to the exact IP that solved the challenge, so it must be replayed through the same sticky session, not a rotating endpoint

It's bound to the User-Agent string, so the header set must match the browser that solved it, character for character. It's also bound to the TLS fingerprint, which is why replaying a browser-issued cookie from plain requests fails while replaying it from curl_cffi works.

In practice, solve once in Camoufox or nodriver on a sticky residential session, export cf_clearance and __cf_bm along with the User-Agent, then replay both from curl_cffi on that same session until Cloudflare expires them (typically 30 minutes to a few hours, set per site).

Cloudflare Turnstile challenges

Cloudflare Turnstile replaced traditional CAPTCHAs with non-interactive JavaScript challenges and only occasionally prompts users with a simple checkbox to proceed. It analyzes web APIs and browser characteristics and runs lightweight PoW tests in the background. To detect a Cloudflare Turnstile widget, you can evaluate the webpage DOM for the specific cf-turnstile class or look for iframes pointing to Cloudflare's challenge infrastructure.

Here are the specific selectors to target:

1. iframe src attribute.

Scan for iframes with URLs hosted on the Cloudflare challenges domain:

iframe[src*="challenges.cloudflare.com"]

2. Turnstile class names (the primary and most important class name is cf-turnstile).

Scan for the primary container class used by Cloudflare for rendering the widget:

.cf-turnstile

You can programmatically detect these elements using standard web scraping or automation tools. Here are some detection implementation examples.

JavaScript/Puppeteer:

async function isTurnstilePresent(page) {
const isTurnstile = await page.$('iframe[src*="challenges.cloudflare.com"], .cf-turnstile');
return isTurnstile !== null;
}

Python/Playwright:

def check_for_turnstile(page):
element = page.query_selector("iframe[src*='challenges.cloudflare.com'], .cf-turnstile")
return element is not None

However, DIY solving is impractical. Turnstile requires behavioral signals that scripted interactions simply can't reliably produce.

When DIY fails: CAPTCHA solving services

Services like 2Captcha, CapMonster, Anti-Captcha, and CapSolver follow a specific token-based model for challenges like reCAPTCHA, hCaptcha, and Cloudflare Turnstile. You provide the sitekey and URL, their solvers (human workers or ML algorithms) process the challenge, and they return a long alphanumeric string. This token must then be injected into the target webpage or request to bypass the challenge.

CAPTCHA solving adds 5-30 seconds per request and $2-$3 per 1,000 solves. Therefore, manual or brute-force CAPTCHA solving is a bottleneck and is not viable at scale.

Common pitfalls when bypassing Cloudflare and how to avoid them

This section will provide the typical mistakes you're likely to encounter when bypassing Cloudflare while web scraping, as well as fixes for each. 

Pitfall 1: Using default HTTP client headers

Issue: Default headers don't have the metadata and complexity of real browsers. Standard libraries like Python's requests, Node.js' axios, or basic curl commands send distinct default headers, triggering instant detection.

Fix: Your client must accurately mimic a legitimate browser environment. Replace default strings with a real browser User-Agent, and use tools like curl-impersonate to help match a browser's TLS signature. Add Accept, Accept-Language, Accept-Encoding, and Referer headers to match what a real user would send during a session. Additionally, use automated bypass tools, such as Playwright. 

Go further: Ensure header order matches real browsers. Chromium sends headers in a specific sequence (e.g. :authority, :method, :path, :scheme, accept, accept-encoding, accept-language, user-agent, sec-ch-ua, etc.), so any deviation will raise a flag.

Pitfall 2: Ignoring TLS fingerprint mismatches

Issue: Ignoring or misconfiguring handshake flags your requests immediately – for example, your headers say "Chrome 120" but your TLS handshake says "Python 3.11." This leads to blocks or 403 errors.

Fix: Use curl-impersonate and libraries that allow you to spoof the TLS fingerprints of legitimate browsers (curl_cffi or tls-client for Python, and tls-client for Node.js). Use httpx with custom SSL contexts, or delegate to a browser/API that handles TLS correctly. 

Go further: Rotate your IP addresses. Instead of sending raw HTTP requests, use browser automation tools with stealth patches.

Pitfall 3: Sending requests too fast

Issue: Cloudflare flags you with a "429 Too Many Requests" error or forces a verification challenge, because it identified your request volume, speed, and/or HTTP fingerprint as bot behavior. 100 requests/second from one IP triggers rate limiting before any fingerprint analysis happens.

Fix: Implement exponential backoff and increase your wait time exponentially after each failure (e.g., 1s, 2s, 4s, 8s, 16s). Add "jitter", meaning include random delays (2-8 seconds between requests). Spread traffic across the IP pool.

Go further: Respect the "retry-after" header. If you pass a Cloudflare challenge, capture the cf_clearance cookie to continue the session. 

Pitfall 4: Not persisting session cookies

Issue: Cloudflare relies on two cookies to remember a solved challenge: cf_clearance and __cf_bm:. If you forget to persist session cookies (preserving the right session tokens), you will be flagged as a new visitor on every subsequent request, triggering a new challenge.

Fix: Store and reuse cookies across requests. In Playwright / Puppeteer, store them in local JSON, and reload them for subsequent script runs. Use page.cookies() to export and page.setCookie() to import. 

Go further: Sync TLS and network fingerprints, because any mismatch and change (in request's User-Agent, Accept headers, or TLS signatures), the session cookie will be invalidated. 

Pitfall 5: Using free or blacklisted proxies

Issue: Free or blacklisted proxies have a poor reputation and a lack of rotation, leading to blocks and persistent CAPTCHAs. Free proxy lists are harvested and overused, so those IPs are already flagged in Cloudflare's database.

Fix: Use residential or ISP proxies from reputable providers with ethically sourced IP pools.

Go further: Use a Decodo residential proxy network with automatic IP rotation. It offers a pool of 115M+ ethically-sourced residential IPs across 195+ locations worldwide, and the best response time in the market. Decodo residential proxies also integrate with any Java HTTP client.

To set up Decodo residential proxies with rotating IPs, follow these steps:

  1. Register or log in to the Decodo dashboard.
  2. Navigate to find residential proxies, choose a subscription, or start a 3-day free trial.
  3. Go to Proxy setup.
  4. Select a location or choose Random.
  5. Set the rotating session type and choose a protocol (HTTP(S) or SOCKS5).
  6. Choose the authentication type.
  7. Download the generated endpoint and credentials or copy them into your scraper, browser, or software.

When bypass techniques fail: Troubleshooting and fallbacks

DIY methods are hard work and are bound to hit walls, encountering common failure signals. You'll need to get familiarized with specific error codes and how to solve them.

403 Forbidden 

Meaning: IP blocked or fingerprint rejected.

Solution: Try different proxies and check TLS fingerprints. You may need to fix a misconfiguration or solve a bot challenge. If a specific bot or user is being blocked, add their IP to the IP Access Rules in your Cloudflare dashboard and set the action to Allow.

429 Too Many Requests

Meaning: Rate limit triggered.

Solution: Slow down, rotate IPs, and implement backoff. Manage the rate limit thresholds on and make sure your code respects the Retry-After header. Switch networks to get a new IP address, and use rotating residential proxies combined with HTTP header rotation to mask your browsing fingerprints. 

503 Service Unavailable

Meaning: Cloudflare can't reach the origin because your request failed server-level checks, the origin server is temporarily overloaded, or is down for maintenance.

Solution: Mimic human behavior by setting a realistic User-Agent, introducing random delays, and using specialized libraries. Products like Decodo Web Data API automatically manage proxies, headers, and headless browsing to bypass 503 errors on your behalf.

1010 Access Denied 

Meaning: Your headless browser is detected, and your access is blocked based on your browser's signature. Cloudflare Error 1010 often happens when using automation tools (Puppeteer, Selenium, or Playwright) because they lack the fingerprints of human-operated browsers.

Solution: Use stealth plugins to patch the specific fingerprints Cloudflare looks for. Simulate human behavior by including random mouse movements, delays between actions, and scrolling.

Endless "Checking your browser" loop

Meaning: JavaScript challenge never resolves, meaning that the browser fingerprint is failing. Cloudflare has flagged your automated request because it's showing missing/irregular browser fingerprints or is originating from a known datacenter IP address.

Solution: Use Puppeteer with stealth plugins, route your requests through residential proxies, and once a Cloudflare challenge is solved, extract and cache the cf_clearance cookie issued by the server to reuse it.

Fallback solutions

  • Switch browser engine. If Chromium is flagged, try Firefox via Playwright. Combine the Firefox engine with dedicated or residential proxy pools. Before starting, first ensure the Playwright Firefox browser binary is downloaded.
npx playwright install firefox
# or via python
playwright install firefox
  • Upgrade proxy quality. Move from datacenter to residential or ISP proxies. Use proxy rotation so that repeated requests appear to come from different, real-world internet connections.
  • Delegate to a managed API. When DIY maintenance exceeds the value of the data, offload to a web scraping API. For Java developers who focus on data extraction rather than infrastructure, Decodo Web Data API is the recommended solution for complex targets.

Bypassing Cloudflare at scale with a managed API

DIY stacks fail on economics before they fail on capability. Every Cloudflare detection update means re-testing your stealth patches, re-pinning browser versions, and re-checking which of your proxy subnets got flagged. Decodo's Web Data API absorbs that maintenance: TLS impersonation, JavaScript rendering, fingerprint management, proxy rotation, and retries happen server-side, so a blocked request becomes the provider's problem rather than a sprint ticket.

This service features advanced anti-bot evasion, a vast proxy network, and AI-optimized data output, supports complex, dynamic content rendering, and provides pre-built templates for major platforms.

Why APIs beat DIY at scale

Building a DIY scraping stack for Cloudflare-protected websites is complicated and difficult to maintain, because developers need to do everything on their own. They have to combine headless browsers like Puppeteer or Playwright with stealth plugins, proxy rotation systems, CAPTCHA solvers, session persistence, and retry logic – all this just to have operational scrapers. Maintaining all this and working to beat the constantly evolving anti-bot systems becomes a full-time job, turning developers' focus on infrastructure instead of the actual scraping. Any DIY setup requires continuous monitoring, debugging, and patching to stay functional.

A web scraping API is often much simpler than maintaining your own browser automation stack. It reduces this operational burden by handling the infrastructure automatically, as the provider maintains all the systems for you so you can focus on extracting and processing data. It features automatic JavaScript rendering, handles advanced browser impersonation techniques behind the scenes, and provides built-in residential proxy rotation with geotargeting support. 

In the example below, the API handles JavaScript rendering, browser fingerprinting, proxy rotation, and anti-bot protection automatically while you scrape a public travel comparison page (US geotargeting and anti-bot bypass mode enabled). 

Before running the script, install Requests (Python library) on your own computer using your system terminal (Command Prompt, PowerShell, or Terminal app).

pip install requests

This downloads the Requests library from Python's package repository (PyPI) and installs it on your computer.

Full Python script:

import requests
API_TOKEN = "YOUR_API_TOKEN"
payload = {
"url": "https://www.skyscanner.jp/",
"render": True
}
response = requests.post(
"https://scraper-api.decodo.com/v2/scrape",
headers={
"Authorization": f"Basic {API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json"
},
json=payload
)
print("Status:", response.status_code)
print("Response length:", len(response.content))

Run the script from the terminal and press enter.

python scrape_travel_site.py

The output appears directly inside the terminal window.

Status: 200
Response length: 842317

A successful HTTP 200 response combined with a large HTML response size usually confirms that the request returned the real rendered page instead of a Cloudflare challenge page or CAPTCHA screen.

When to choose API vs. DIY

Key factors

Choose DIY Scraping

Choose a Web Data API

Best for

Learning projects and experimentation

Production systems and business use

Request volume

Low-volume scraping

Medium to large workloads

Target protection

Basic anti-bot protection

Cloudflare/CAPTCHA-heavy sites

Technical complexity

More hands-on setup

Faster deployment, less effort

Infrastructure management

You manage proxies, browsers, and retries

Provider handles infrastructure

Maintenance effort

Very high

Very low

Cost structure

Lower upfront cost, more time investment

Usage-based pricing

Reliability

Can become unstable at scale

Built for scalability and reliability

Common tools

Playwright, Puppeteer, SeleniumBase

Web Data APIs

Main advantage

Customization and learning value

Simplicity and operational stability

Final thoughts

Bypassing the super-sensitive Cloudflare protection requires understanding how modern anti-bot systems analyze traffic across different detection layers: TLS fingerprints, browser behavior, JavaScript execution, and session consistency. All of these must align, or the request gets flagged. 

DIY approaches using Puppeteer, Playwright, stealth plugins, and residential proxies work well for learning and smaller scraping workloads, but maintaining them at scale quickly turns time-consuming and operationally expensive. For production pipelines and heavily protected targets, managed solutions, specifically dedicated APIs, are the more practical choice, allowing developers to focus on extracting data rather than maintaining anti-bot infrastructure.

Stop reverse-engineering Cloudflare

Challenge tokens change, fingerprint checks evolve, and your workaround breaks again next week. Decodo stays ahead of Cloudflare, so you don't have to.

Share article:

About the author

Vilius Sakutis

Performance Marketing Team Lead

Vilius leads performance marketing initiatives with expertize rooted in affiliates and SaaS marketing strategies. Armed with a Master's in International Marketing and Management, he combines academic insight with hands-on experience to drive measurable results in digital marketing campaigns.

Connect with Vilius via LinkedIn

All information on Decodo Blog is provided on an as is basis and for informational purposes only. We make no representation and disclaim all liability with respect to your use of any information contained on Decodo Blog or any third-party websites that may belinked therein.

Frequently asked questions

What is the fastest way to bypass Cloudflare?

For static pages, a TLS-impersonating HTTP client such as curl_cffi, because it adds no browser overhead. If the target runs an active JavaScript challenge, no HTTP client will clear it and you need a stealth browser. Test in that order: the cheap option first, then escalate only when it fails.

Why does my scraper get blocked even with stealth mode enabled?

Stealth patches only fix browser-level tells. They do nothing about your TLS fingerprint or IP reputation, and Cloudflare scores all three together. The most common cause is a clean browser fingerprint on a datacenter IP. The second most common is a User-Agent that no longer matches the browser build actually running.

Is it legal to bypass Cloudflare for web scraping?

Scraping public data is legal in most jurisdictions, but bypassing technical measures may violate ToS. This significantly increases legal risk, as it can be interpreted as unauthorized access. Consult legal counsel for high-risk use cases.

What's the best proxy type for bypassing Cloudflare?

The most effective proxy type for bypassing Cloudflare is residential proxies. They use real IP addresses assigned by ISPs to home devices, so they appear as legitimate human traffic. Datacenter IPs aren't a good option as they often carry low reputation scores and trigger immediate challenges.

Can you bypass Cloudflare Turnstile?

Not reliably by script. Turnstile scores behavioral signals that programmatic interaction cannot reproduce convincingly. CAPTCHA-solving services return valid tokens but add 5 to 30 seconds and roughly $2 to $3 per 1,000 solves, which is untenable at volume. The workable strategy is to avoid triggering Turnstile at all by keeping your fingerprint, IP reputation, and request rate below the threshold that summons it.

Does Cloudflare block all web scraping?

No. Cloudflare applies detection according to each site owner's configuration, which ranges from Bot Fight Mode to a strictly enforced Managed Challenge. Many Cloudflare-fronted sites serve plain HTTP clients without any challenge at all, which is why the first diagnostic step is always to check what your target actually enforces rather than assuming the worst.

A circle with a diagonal line, surrounded by a second circle that overlaps the top of a mouse pointer, all within an incomplete outer circle with three connecting lines.

How to Bypass CAPTCHAs: The Ultimate Guide 2026

CAPTCHAs love to show up right when your scraper's getting somewhere. They exist to sort humans from bots, and if you're seeing them constantly, it's usually triggered by a mix of strict website security policies and a drop in your IP's trust score. That's why CAPTCHA bypass only works long-term if you treat it as a trust fix, not a workaround.

Playwright logo and title 'Playwright' showing subtitle 'Web Scraping Tutorial' on a dark dotted background

Playwright Web Scraping: A Practical Tutorial

Web scraping can feel like directing a play without a script – unpredictable and chaotic. That’s where Playwright steps in: a powerful, headless browser automation tool that makes scraping modern, dynamic websites smoother than ever. In this practical tutorial, you’ll learn how to use Playwright to reliably extract data from any web page.

Magnifying glass highlighting a robot face icon over a browser window on a dark background

Navigating Anti-Bot Systems: Pro Tips For 2026

With the rapid improvements in artificial intelligence technologies, it seems that 2026 will present some new challenges for web scraping enthusiasts and professionals. Over the years, anti-bot systems have become increasingly sophisticated, which makes extracting valuable data from websites a true challenge. As businesses intensify their efforts to protect against automated bots, traditional web scraping methods are being put to the test. The surge in anti-bot measures is not only due to heightened cybersecurity awareness but also signifies a shift in the digital ecosystem and growing competition. As a result, those who want to leverage publicly available data need to recalibrate their strategies to navigate and circumvent anti-bot systems.

If CAPTCHAs and IP bans were not on your bingo card for 2026, our comprehensive guide is a must-read. We’ve sat down with our scraping gurus and discussed the best practices, gathered all the pro tips, and summarized what’s coming next for anti-bot systems and scrapers. As 2026 approaches, it demands a proactive approach to understanding, outsmarting, and ultimately thriving in the face of escalating anti-bot measures, so grab a cup of coffee and dive into our guide.

If you can't access the whole article, make sure you have disabled your ad blocker

© 2018-2026 decodo.com (formerly smartproxy.com). All Rights Reserved