Botasaurus usually fails on Cloudflare for one of four reasons: it runs with headless=True (its own README says Cloudflare will identify headless mode), it runs headful Chrome on a Linux server without a display, the botasaurus and botasaurus-driver packages are out of sync, or the IP is a datacenter address. Fix them in that order and use driver.google_get(url, bypass_cloudflare=True); if a Turnstile or managed challenge still loops, move only the challenge step to a solver API.
Below are the errors people actually report on the Botasaurus issue tracker, what each one means, the fixes inside Botasaurus itself, and an honest look at when to stop scaling browsers. API names were checked against the README and PyPI on 2026-12-01.
Quick answer: what your Botasaurus error means
Find the message or symptom you are seeing. Most of them trace back to the environment Chrome runs in, not to your scraping code.
- TimeoutError: Response not received
- google_get(..., bypass_cloudflare=True) gave up waiting. Reported in issue #194. Usually Chrome did not start cleanly or the challenge never cleared. Upgrade every Botasaurus package, run the README's minimal example headful, then retry with max_retry.
- Stuck on "Just a moment..." or "Verify you are human" with headless=True
- Headless Chrome was detected. The README warns that headless mode will surely be identified by Cloudflare and Datadome. Remove headless=True and any --headless=new argument.
- Works on Windows or macOS, fails on an Ubuntu server
- The server environment, not your code. Issues #147 and #282 describe exactly this. Run headful under Xvfb with @browser(enable_xvfb_virtual_display=True) and use a residential IP.
- TypeError: Driver.__init__() got an unexpected keyword argument 'enable_xvfb_virtual_display'
- botasaurus and botasaurus-driver do not match. Seen in issue #253 on botasaurus 4.0.87. Upgrade all Botasaurus packages together with the README's pip command.
- @request returns 403 on a challenge page
- The request module cannot run JavaScript. The README says so explicitly. Use @browser with google_get(..., bypass_cloudflare=True) for JavaScript challenges.
- detect_and_bypass_cloudflare() does nothing or never returns
- The widget is hard to reach, or the call hangs. Issue #160 covers widgets inside a shadow DOM; open issue #305 (July 2026) reports a timeout inside the driver's select() during the bypass. Wrap it in your own retry budget.
- Challenge passes, then the next pages are blocked
- Bot-like pacing or a changing IP. Enable human mode, add random sleeps, keep the same driver and proxy, and fetch follow-up pages with driver.requests.get.
- Blocked as soon as an authenticated proxy is added
- The proxy plumbing gives you away. The README warns that authenticated proxies wired through selenium-wire get identified. Pass the proxy to @browser(proxy=...) instead.
What bypass_cloudflare=True actually covers
The Botasaurus README splits Cloudflare into two cases. The connection challenge only needs a browser-like connection with the right headers: visiting through a Google referrer with driver.google_get is enough, and the @request module also works if you allow retries. The JS with Captcha challenge runs JavaScript checks that tell an automated Chrome from a real one and may include a CAPTCHA. For that one the README says to pass bypass_cloudflare=True to google_get, and that @request does not work because it cannot run JavaScript.
The driver also exposes detect_and_bypass_cloudflare() and accepts bypass_cloudflare=True on driver.get. Botasaurus deliberately does not change browser fingerprints by default; the README explains that a spoofed user agent can be caught by tests that compare it with the real browser. That choice works well on a desktop with a real GPU and a normal home connection, and it is exactly why results differ so much on a bare server.
Why Botasaurus fails on Cloudflare: the root causes
- Headless mode. The README's own warning: with headless=True you will surely be identified by services like Cloudflare and Datadome, so use it only on sites without them.
- A server environment. Reporters in issues #147 and #282 see the same code pass on Windows and fail on Ubuntu, in #147 even from the same IP. Headful Chrome on Linux needs a virtual display, and a machine with no GPU looks different to passive browser checks.
- Network reputation. The README's "Why am I getting detected" section lists non-residential proxies first: Cloudflare and Datadome often flag datacenter IPs and VPNs.
- Behaviour. The same section lists clicking without human mode and visiting pages too quickly.
- Package drift. Botasaurus is split across several packages (botasaurus, botasaurus-driver, botasaurus-requests and more). When one lags behind you get errors such as unexpected keyword arguments, and the maintainer's standard reply in issues #137 and #147 is to upgrade all of them.
Fix 1: upgrade every Botasaurus package together
Start here, because it is the maintainer's first answer on Cloudflare issues. Upgrade the whole family in one command, then confirm that botasaurus and botasaurus-driver both moved. On PyPI the latest releases are botasaurus 4.0.97 (January 2026) and botasaurus-driver 4.0.101 (August 2026).
# Upgrade the whole Botasaurus family in one go (command from the README)
python -m pip install --upgrade bota botasaurus botasaurus-api botasaurus-requests \
botasaurus-driver botasaurus-proxy-authentication botasaurus-server botasaurus-humancursor
# Both should be current (PyPI, 2026-12-01: botasaurus 4.0.97, botasaurus-driver 4.0.101)
python -m pip show botasaurus botasaurus-driver | grep -E "Name|Version"Fix 2: run headful and use google_get with bypass_cloudflare
Remove headless=True and any --headless=new passed through add_arguments. Use google_get rather than get so the visit arrives with a Google referrer, as the README recommends, and pass bypass_cloudflare=True only for sites that really show the challenge.
While debugging, add driver.prompt() after the call: it pauses so you can see what the browser sees. If the challenge still loops in a visible browser on your own desktop, the cause is the site's configuration or your IP, not your server setup, and no Linux tweak will change that.
from botasaurus.browser import browser, Driver
@browser(
# headless=True, # remove it: the README says Cloudflare will identify headless mode
max_retry=5,
output=None,
)
def fetch(driver: Driver, link):
# Google referrer + Cloudflare handling, as shown in the README
driver.google_get(link, bypass_cloudflare=True)
# driver.prompt() # uncomment while debugging to pause and look at the browser
return driver.page_html
fetch("https://target-site.com/")Fix 3: Linux servers and Docker
On a VM, the README says a headful browser needs a virtual display and gives the switch: enable_xvfb_virtual_display=True. Combine it with a residential proxy and a persistent tiny profile so cookies survive between runs. For containers, the README points to the botasaurus-starter template, which ships a Dockerfile and docker-compose configuration; start from it rather than writing your own image.
Two more checks from the issue tracker: one Ubuntu user in #147 also passes add_arguments=['--no-sandbox'], and in #141 the maintainer suggests reproducing in the Gitpod starter to rule out the local machine. If the same script passes there and fails on your server, the difference is the environment or the IP.
from botasaurus.browser import browser, Driver
@browser(
enable_xvfb_virtual_display=True, # headful Chrome on a server with no screen
proxy="http://username:password@residential-proxy:port",
remove_default_browser_check_argument=True,
tiny_profile=True,
profile="worker-1", # keeps cookies between runs
)
def fetch(driver: Driver, link):
driver.google_get(link, bypass_cloudflare=True)
driver.short_random_sleep()
return driver.page_htmlFix 4: proxies, pacing and human mode
- Use a residential proxy and pass it as @browser(proxy=...). Authenticated proxies are supported, and a list of proxies rotates automatically.
- Call driver.enable_human_mode() before clicking, and slow down with driver.short_random_sleep() or driver.long_random_sleep().
- Navigate like a person: google_get or get_via_this_page instead of a burst of driver.get calls.
- Set remove_default_browser_check_argument=True; the README says the --no-default-browser-check flag is detectable by systems like Datadome.
- Clear the challenge once, then fetch follow-up pages through the same browser session with driver.requests.get, as the README's production template does.
from botasaurus.browser import browser, Driver
@browser(reuse_driver=True, max_retry=5, output=None)
def scrape(driver: Driver, link):
if driver.config.is_new: # first task in this browser
driver.enable_human_mode()
driver.google_get(link, bypass_cloudflare=True)
response = driver.requests.get(link) # follow-up fetches reuse the cleared session
response.raise_for_status()
return response.textWhen to stop scaling browsers
Botasaurus is a good tool when you need a real browser for navigation and extraction. Where it hurts is the challenge itself at scale: every worker is a full Chrome, every server needs a display and a clean IP, and when Cloudflare loops on a Linux box there is little left to tune except the environment. If the loop shows up on more than a handful of targets, or you are adding servers just to keep Chrome alive, move only the challenge step out of the browser.
A managed solver API returns the cf_clearance cookie and the User-Agent it belongs to, and your code fetches pages with a light HTTP client through the same proxy. The clearance is tied to the User-Agent and fingerprint the solver returns, so replay it with a client that matches them, not inside Botasaurus's desktop Chrome, whose User-Agent and fingerprint differ.
Example: NSLSolver for the challenge, a light client for the pages
Send the target url, the challenge site_key and your proxy to NSLSolver's challenge type. The response contains cookies (with cf_clearance) and a user_agent. The clearance is issued for an iPhone Safari browser, so replay it with that user_agent through the same proxy, using a client with a matching fingerprint; here that is curl_cffi with impersonate="safari_ios".
Challenge solves average about 3.3 seconds and cost $1.00 per 1,000, only successful solves are billed, and sign-ups with Google, Gmail or Proton get free credit. NSLSolver covers Cloudflare Turnstile and Challenge, reCAPTCHA v3, Kasada and Akamai (beta); it does not solve DataDome, hCaptcha, reCAPTCHA v2 or image CAPTCHAs. Only automate sites you own or are authorised to access.
import curl_cffi
TARGET = "https://target-site.com/"
PROXY = "http://user:pass@host:port" # the proxy you will fetch pages through
data = curl_cffi.post(
"https://api.nslsolver.com/solve",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"type": "challenge",
"url": TARGET,
"site_key": "0x4AAAAAAA...", # the challenge widget id
"proxy": PROXY, # required for challenge
},
timeout=120,
).json()
# The clearance is issued for an iPhone Safari browser, so replay it with the
# returned user_agent, an iOS Safari fingerprint and the same proxy.
s = curl_cffi.Session(impersonate="safari_ios")
s.headers["User-Agent"] = data["user_agent"]
s.cookies.update(data["cookies"]) # includes cf_clearance
html = s.get(TARGET, proxy=PROXY).textRelated guides
- Cloudflare Challenge solver API: request fields, solve times and how cf_clearance is returned.
- Pricing per 1,000 solves: pay as you go; failed solves are free.
- curl_cffi Cloudflare 403: replaying cf_clearance with a matching TLS fingerprint.
- FlareSolverr not working in 2026: the self-hosted proxy approach and where it fails.