The three decorators
Botasaurus organises code around the unit you are scraping with — not the framework abstractions other tools impose:
@browser— wraps a function so it runs inside an automated Chromium with stealth patches and humanization applied. Use when the target needs a real browser.@request— wraps a function so it runs as a lightweight HTTP request with browser-like headers and connection behaviour. Use when the target does not need JS.@task— generic execution wrapper for non-scraping work (parsing, API calls, ML inference) that should share Botasaurus's parallelism and caching infrastructure.
A single project can mix all three: @request hits an XHR endpoint for the listing page, @browser opens detail pages that need JS, @task runs the LLM extraction step.
Why the mouse physics matter
DataDome runs a 35+ signal behavioural model that profiles mouse trajectories, scroll velocity, typing cadence, and click coordinates in real time. A scraper that calls page.mouse.move(x, y) with Playwright's default linear interpolation creates a trajectory that is statistically impossible for a human hand. DataDome catches this regardless of how perfect the TLS, IP, or canvas fingerprint is.
Botasaurus ships Humancursor, a separate library by Flori Batusha and Ambri, which generates Bezier-curve paths with Gaussian-jittered velocity and Fitts's Law deceleration (the curve slows as it approaches the target, slightly overshoots, then corrects). Pair that with page.click_human(selector) and the trajectory matches the distributions DataDome trained on.
What Botasaurus does not replace
Botasaurus is a framework, not a complete stealth stack. It still needs:
- Residential or mobile proxies for IP reputation — datacenter IPs fail at the network layer regardless of mouse physics.
- A patched browser binary (CloakBrowser / Camoufox) for the hardest targets where Function.toString() detection or Akamai's 60-extension probe matters. Botasaurus's stealth is JS-layer on top of vanilla Chromium.
- curl_cffi or tls-client for HTTP-only flows where you need explicit TLS impersonation. Botasaurus's
@requestuses browser-like defaults but does not ship a curl_cffi-grade JA4 replacement.
In a production stack, Botasaurus is the orchestration and behavioural layer; you compose it with the right network and binary layers underneath.
