cloudscraper
A Python module to bypass Cloudflare's anti-bot page.
What it is and what it does
Cloudscraper is a Python wrapper around Requests that automatically detects and solves Cloudflare's anti-bot JavaScript challenges. When you make an HTTP request through a cloudscraper session to a site protected by Cloudflare's "I'm Under Attack Mode" (IUAM), the library intercepts the challenge page, executes the required JavaScript computation, and submits the solution—all transparently. The first request to a Cloudflare-protected site incurs a ~5-second delay while the challenge is solved; subsequent requests use cached tokens and proceed normally.
The package depends on Requests, requests-toolbelt, and pyparsing for core functionality, and it includes a built-in native Python solver for Cloudflare challenges. It can also delegate JavaScript execution to external engines (Node.js, js2py, ChakraCore, V8) if you install them. The API is identical to Requests—you call `scraper.get()`, `scraper.post()`, etc., and treat Cloudflare-protected sites as if they were unprotected.
Use it for:
- Scrape or crawl websites protected by Cloudflare anti-bot without manual browser intervention or solving challenges by hand.
- Automate data collection from sites that use Cloudflare IUAM, such as news sites, e-commerce platforms, or research databases.
- Build web scrapers or bots that need to bypass Cloudflare protection as part of a larger data pipeline.
- Test your own Cloudflare-protected applications by writing automated HTTP clients that can pass the anti-bot checks.
- Fetch content from Cloudflare-protected APIs or endpoints in Python scripts without switching to a headless browser.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Bypasses Cloudflare's anti-bot protection by automatically solving JavaScript challenges, allowing HTTP requests to protected sites to succeed without manual intervention.
Yes, if you need to scrape or access Cloudflare-protected sites and are comfortable with the maintenance risk. The package is stable (Production/Stable status), has no known vulnerabilities, and low install friction. However, maintenance is aging—the last release was in April 2023—so if Cloudflare significantly changes their protection techniques, you may need to wait for updates or switch to an alternative. For one-off or low-stakes scraping, it's a reasonable choice; for mission-critical automation, monitor the repository closely or have a fallback plan.
Install
cloudscraper on PyPI
pip
pip install cloudscraperuv
uv add cloudscraperpoetry
poetry add cloudscraperInstalling cloudscraper
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance is aging—last release was in April 2023 and the last commit in June 2025, so updates are infrequent but the repository remains active and unarchived.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install cloudscraper
import cloudscraper
scraper = cloudscraper.create_scraper()
response = scraper.get('http://example.com')
print(response.text)
Requires a JavaScript interpreter/engine; the package defaults to a native Python solver but also supports Node.js, js2py, ChakraCore, or V8 if you install them separately.
Verify before relying
- Whether the native Python solver is sufficient for current Cloudflare challenge variants or if an external JS engine is required in practice.
- How often Cloudflare's protection techniques change and whether cloudscraper's infrequent updates keep pace with those changes.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — pyparsing, requests, requests-toolbelt |
| Maintenance | aging — 1,207 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,830,393/month — #2,219 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cloudscraper-1.2.71-py2.py3-none-any.whl
Keywords: cloudflare, scraping, ddos, scrape, webscraper, anti-bot, waf, iuam, bypass, challenge
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
wrapper-tls-requestsMakes HTTP requests with browser-like TLS…
permissive · top 15,000 on PyPI
cloakbrowserLaunches a stealth Chromium browser that evades…
permissive · top 15,000 on PyPI
capsolverCapsolver is a Python client library for…
permissive · top 15,000 on PyPI
2captcha-pythonA Python client for the 2Captcha API that…
permissive · top 15,000 on PyPI
anticaptchaofficialSolves CAPTCHAs and related challenges (image…
permissive · top 15,000 on PyPI
undetected-chromedriverPatches Selenium's Chrome WebDriver to avoid…
copyleft · top 5,000 on PyPI
curl-cfficurl_cffi provides Python bindings to libcurl…
permissive · top 1,000 on PyPI
scraplingScrapling is a web scraping and crawling…
permissive · top 5,000 on PyPI
primpHTTP client library that mimics real web…
permissive · top 5,000 on PyPI
pyarmor.cli.coreProvides prebuilt extension modules required by…
unclear · top 15,000 on PyPI