skillfed

cloudscraper

A Python module to bypass Cloudflare's anti-bot page.

cloudscraper v1.2.71 4.8M downloads/30d#2,219 on PyPI6,701
Permissive license AGING released

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 cloudscraper

uv

uv add cloudscraper

poetry

poetry add cloudscraper

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules

Tags

cloudflare bypassanti-bot scrapingcloudflare challenge solverweb scraping cloudflareiuam bypasscloudflare javascript challengerequests cloudflare protection
web-scrapingcloudflare-bypassanti-bot

More Python Modules packages

Further reading