Web Scraping APIs

What Is Botasaurus?

By the Scrappey Research Team

What Is Botasaurus? — conceptual illustration
On this page

Botasaurus is a free, open-source (MIT-licensed) Python framework for building web scrapers. You wrap your scraping functions with one of three decorators — @browser, @request, @task — and it can generate curved, human-like mouse movements (Bezier curves) instead of the mechanical straight lines default automation produces. It is maintained by Omkar Cloud, which lists compatibility with sites protected by Cloudflare WAF, BrowserScan, Fingerprint, DataDome, and Cloudflare Turnstile. Its mouse-physics module (Humancursor, contributed by Flori Batusha and Ambri) draws realistic-looking cursor paths with slightly randomised speed, instead of the dead-straight lines that Playwright produces by default. As with any automation framework, it should only be pointed at sites and data you own, control, or are permitted to access.

Quick facts

LicenseMIT
MaintainerOmkar Cloud (github.com/omkarcloud)
GitHub stars4K+
Decorators@browser, @request, @task
Listed compatibilityCloudflare WAF, Cloudflare Turnstile, DataDome, BrowserScan, Fingerprint Bot Detection

The three decorators

A decorator is just a tag you put above a Python function to change how it runs. Botasaurus gives you three, each matching a different way of fetching data:

  • @browser — runs your function inside a real automated Chromium browser, with consistent browser configuration and human-like behaviour already applied. Use it when the page needs a full browser to load.
  • @request — runs your function as a plain HTTP request (faster, no browser) with browser-consistent headers. Use it when the page works without JavaScript.
  • @task — a general wrapper for work that is not scraping at all (parsing, API calls, machine-learning steps), so that work can still use Botasaurus's parallelism and caching.

You can mix all three in one project: @request grabs a listing page from an XHR endpoint, @browser opens detail pages that need JavaScript, and @task runs the LLM extraction step.

How the mouse physics work

Behavioural anti-bot systems such as DataDome observe a wide range of interaction signals — the path a mouse takes, scroll speed, typing rhythm, click location — and score them in real time. Default automation that moves the cursor with page.mouse.move(x, y) produces a perfectly straight path, a pattern unlike anything a human hand creates. This is one of the simplest behavioural signals such systems use.

Botasaurus ships Humancursor, a separate library by Flori Batusha and Ambri, that draws Bezier-curve paths (smooth curves rather than straight lines) with randomised speed and Fitts's Law deceleration — meaning the cursor slows as it nears the target, slightly overshoots, then corrects, just like a person. The page.click_human(selector) helper exposes this through a single call. The library exists because realistic input simulation is a recurring requirement in legitimate UI testing and automation, not only in scraping.

What Botasaurus does not replace

Botasaurus is a framework, not a complete stack on its own. A production setup typically also involves:

  • Residential or mobile proxies for a stable IP — datacenter IPs are often blocked at the network layer regardless of behaviour.
  • A patched browser binary (CloakBrowser / Camoufox) on sites that inspect things like Function.toString() output or run Akamai's 60-extension probe. Botasaurus operates at the JavaScript layer on top of a stock Chromium.
  • curl_cffi or tls-client for HTTP-only work where a browser-consistent TLS handshake matters. Botasaurus's @request uses browser-like defaults but does not reproduce a curl_cffi-grade JA4 TLS fingerprint.

In a production setup, Botasaurus is the orchestration and behaviour layer; you pair it with the right network and browser-binary layers underneath for content you are permitted to access.

Code example

python
# Botasaurus with humanized mouse movement (use only on sites you are
# permitted to access). Illustrates the Humancursor behaviour layer.
from botasaurus.browser import browser, Driver

@browser(
    proxy="http://user:pass@residential:port",
    humanize=True,    # enables Humancursor Bezier-curve movements
)
def scrape(driver: Driver, data):
    driver.get("https://your-authorized-site.example.com/")
    driver.click_human(".product-link")         # Bezier path, not teleport
    driver.scroll_human(amount=600)             # variable-velocity scroll
    return driver.page_html

result = scrape("ignored")

Related terms

Concept map

How Botasaurus connects

The terms most directly tied to this one. Hover a node to see its neighbours, click to preview, drag to rearrange.

0 terms · 0 connections
You are here · Web Scraping APIs
Building map…

Frequently asked questions

Is Botasaurus a replacement for Playwright?

No — it builds on top of Chromium automation (using primitives similar to Playwright) and adds the decorator API, the humanization layer, parallel execution, caching, and the ability to package scrapers as desktop apps or web UIs. For the lowest-level browser control you still talk to Chromium APIs directly; Botasaurus is the convenience layer above that.

Does Botasaurus work with Cloudflare Turnstile?

The project lists compatibility with sites using Cloudflare Turnstile, plus Cloudflare WAF, DataDome, BrowserScan, and Fingerprint Bot Detection. How well it works in practice depends on the specific site, your proxy quality, and how recently the site updated its configuration. Always test on a target you are authorized to access before scaling up.

How is Botasaurus different from undetected-chromedriver?

undetected-chromedriver does one narrow thing: it adjusts the navigator.webdriver flag that distinguishes Selenium-driven Chrome. Botasaurus is a full framework — decorators, humanization, caching, parallelism, packaging — built on the idea that browser automation involves many surfaces beyond that single flag. The two solve problems of very different size.

Can I run Botasaurus headless?

Yes — the @browser decorator accepts a headless=True argument. Be aware that headless Chromium renders its canvas in software (SwiftShader, device ID 0x0000C0DE), which Akamai blocklists. For Akamai-protected targets, run Botasaurus with headless=False inside Xvfb (a virtual display), or switch the browser layer to CloakBrowser.

Last updated: 2026-05-31 · Facts last verified: 2026-06-16