Botasaurus: setup, proxies and hCaptcha.

Botasaurus is a Python web scraping framework built around two decorators, @browser and @request. How to install it, run its quick starts, set a proxy, what it claims about bot detection, and what to do when a site shows hCaptcha.

What Botasaurus is

Botasaurus wraps your scraping function in a decorator and handles the rest: launching a browser or an HTTP client, proxies, running items in parallel, caching, retries, and writing results to output/. Its README calls it “The All in One Framework to Build Undefeatable Scrapers”, and lists three decorators:

  • @browser: “For scraping web pages using a humane browser.” It drives your installed Chrome through its own driver, not Selenium or Playwright.
  • @request: “For scraping web pages using lightweight and humane HTTP requests.” No browser, no JavaScript.
  • @task: for anything else, including scrapers you write with Playwright or Selenium.
Botasaurus at a glance (read from PyPI and GitHub on 2 November 2026)
PackageMaintainerLatest versionLicence and requirements
botasaurus on PyPIChetan Jain, under the omkarcloud account on GitHub4.0.97, released 6 January 2026MIT. Python 3.7 or newer, plus Google Chrome

The project also ships a scraper UI that runs your functions from a web page, and a toolkit for packaging a scraper as a desktop app. This page sticks to the Python framework.

Is it still maintained?

Yes. The repository had about 5,800 stars and commits from 31 October 2026 when we looked, though the most recent ones touch its JavaScript desktop packages. The Python framework on PyPI was last released as 4.0.97 on 6 January 2026, and its browser driver, botasaurus-driver, as 4.0.101 on 10 August 2026. The project publishes no GitHub releases; PyPI is where versions show up. Issues are open on GitHub.

Install it

Shell · pip
python -m pip install --upgrade botasaurus

On 2 November 2026, in a fresh Python 3.12 environment, this installed botasaurus 4.0.97, botasaurus-driver 4.0.101 and botasaurus-requests 4.0.38. No browser comes with it: @browser looks for Google Chrome (or Chromium) where your system installs it and stops with an error if there is none.

“Could not connect to GitHub” on first use of @request

The first time a script imports botasaurus.request, it downloads a native library from the releases of daijro/hrequests, which botasaurus-requests is based on. It asks GitHub’s API for the file without logging in, and that API allows only so many such calls per IP address each hour. On a shared office or server address that has used them up, the import fails:

@request · first import
Downloading @request dependencies...
ConnectionError: Could not connect to GitHub: {"message":"API rate
limit exceeded for 203.0.113.7. ..."}

That happened to us. Waiting for the limit to reset fixes it, or download the hrequests-cgo-2.x file for your system from the hrequests releases yourself and put it in the bin folder of the installed botasaurus_requests package. After that, @request worked without going back to GitHub.

Quick start

This is the README’s first example, with its comments removed:

Python · @browser
from botasaurus.browser import browser, Driver

@browser
def scrape_heading_task(driver: Driver, data):
    driver.get("https://www.omkar.cloud/")
    heading = driver.get_text("h1")
    return {"heading": heading}

scrape_heading_task()

Run it with python main.py. It opens Chrome, reads the page’s h1 and writes the result to output/scrape_heading_task.json. The second argument, data, is the input: call the function with a list and Botasaurus runs it once per item. The same scrape without a browser:

Python · @request
from botasaurus.request import request, Request
from botasaurus.soupify import soupify

@request
def scrape_heading_task(request: Request, data):
    response = request.get("https://www.omkar.cloud/")
    heading = soupify(response).find("h1").get_text()
    return {"heading": heading}

scrape_heading_task()

We ran both on 2 November 2026 with Chrome 156 on macOS, adding headless=True to the browser version. Each returned the heading and wrote the JSON file. In the headless browser, navigator.webdriver read false and the user agent was an ordinary Chrome 156 one, without HeadlessChrome.

@request picks a browser profile for each request, and the default is Firefox: two calls in a row sent two different Firefox user agents. Pass browser="chrome" to a request for Chrome headers instead, or user_agent= to set the exact string.

Headless, proxies and other options

Options go on the decorator:

Python · @browser options
from botasaurus.browser import browser, Driver

@browser(
    headless=True,
    proxy="http://user:pass@your-proxy:8000",
    block_images=True,
    close_on_crash=True,
)
def scrape(driver: Driver, link):
    driver.get(link)
    return driver.title

scrape(["https://example.com/", "https://example.org/"])
  • headless: off by default. The README warns that “if you use headless mode, you will surely be identified by services like Cloudflare and Datadome.”
  • proxy: a URL, or a list of them that Botasaurus rotates.
  • block_images (or block_images_and_css) cuts the bandwidth a page costs, which matters on a proxy billed by the gigabyte.
  • close_on_crash: by default a failed task beeps, pauses and waits for you to press Enter. On a headless run, the 4.0.97 code also opens the browser’s DevTools in your default browser to help you debug. Set it to True for anything that runs unattended, so the run moves on past a failed item. Either way, a failed item saves its error log, page HTML and a screenshot under error_logs/, unless you turn off create_error_logs.

Proxies with a username and password

Chrome’s --proxy-server flag has no place for a password, so for a proxy URL with user:pass@ in it, @browser starts a local forwarding proxy that adds the login. That part is the Node package proxy-chain, which Botasaurus installed with npm the first time we passed such a proxy, so Node.js and npm have to be on the machine. @request takes the same argument:

Python · @request proxy
from botasaurus.request import request, Request

@request(proxy="http://user:pass@your-proxy:8000")
def scrape(request: Request, link):
    return request.get(link).status_code

We checked both against a local test proxy that required a login: every request reached it with the right credentials. The browser also sent Chrome’s own background traffic through it, such as update and Google account checks, so a metered proxy bills for those too.

What its README claims about bot detection and Cloudflare

The README’s claims are broad. It says Botasaurus lets you “Easily pass every (Yes, E-V-E-R-Y) bot test, and build undetected scrapers”, and that with its driver “You will not, and I repeat NOT, have any issues accessing any website.” A video in the README is introduced with “watch as we bypass some of the best bot detection systems”, listing Cloudflare’s WAF, BrowserScan, Fingerprint, Datadome and Cloudflare Turnstile, and the test script is in the repository.

For Cloudflare it describes two cases. A “Connection Challenge”, which it says @request or a visit through a Google referrer (driver.google_get()) gets past, and a “JS with Captcha Challenge”, where it says @request “cannot run JavaScript to solve the challenge” and the browser needs bypass_cloudflare=True:

Python · README Cloudflare example
@browser
def scrape_heading_task(driver: Driver, data):
    driver.google_get(
        "https://nopecha.com/demo/cloudflare",
        bypass_cloudflare=True,
    )

These are the project’s claims. We did not test them against Cloudflare, Datadome or any other vendor.

For CAPTCHAs in general, the README says “Encountering captchas is common in web scraping” and points to capsolver_extension_python, which loads the CapSolver browser extension with your CapSolver API key. Its examples use a reCAPTCHA demo page. hCaptcha is not mentioned anywhere in the README or in the code of the Botasaurus packages pip installed, and a search of the project’s GitHub issues for “hcaptcha” returned nothing on 2 November 2026.

What it does when a site shows hCaptcha

Botasaurus has no hCaptcha step. How often a challenge appears at all depends on several signals, starting with the reputation of your IP address; why am I getting hCaptcha covers them. Once it does appear, the site accepts the form only with a valid token in the h-captcha-response field, a P1_ string its server checks with hCaptcha before it lets the request through. Invisible hCaptcha needs that token too, even when no puzzle is shown. Botasaurus does not produce one, in either decorator.

What it does give you is easy access to the page: the sitekey in the widget’s data-sitekey attribute, the page URL, and a way to fill the response field or post it yourself. A token from a solver fits into that.

Get an hCaptcha token into a Botasaurus task

NoneCap is an hCaptcha solving API. You send the page’s sitekey and url, and get a P1_ token back. With the Python SDK (pip install nonecap), nc.solve() waits for the result, so there is no polling loop.

In a @browser task

Set up the client and a small script that puts the token where the hCaptcha widget would: the h-captcha-response and g-recaptcha-response fields, then the page’s data-callback function if it set one. Botasaurus passes the second argument of run_js to the script as args:

Python · client and fill script
import os

from botasaurus.browser import browser, Driver
from nonecap import NoneCap

nc = NoneCap(api_key=os.environ["NONECAP_KEY"])

FILL_TOKEN = """
const token = args.token;
for (const name of ["h-captcha-response", "g-recaptcha-response"]) {
    document.querySelectorAll(`textarea[name="${name}"]`)
        .forEach((el) => { el.value = token; });
}
const cb = document.querySelector("[data-callback]")
    ?.getAttribute("data-callback");
if (cb && typeof window[cb] === "function") window[cb](token);
"""

Then read the sitekey, get a token, fill it in and submit:

Python · @browser with a token
@browser(close_on_crash=True)
def signup(driver: Driver, data):
    driver.get("https://your-site.example/signup")
    solve = nc.solve(
        type="hcaptcha",
        sitekey=driver.get_attribute("[data-sitekey]", "data-sitekey"),
        url=driver.current_url,
        user_agent=driver.user_agent,
    )
    driver.run_js(FILL_TOKEN, {"token": solve.token})
    driver.click("button[type=submit]")
    return driver.current_url

signup()

We tested the reading, filling and submitting headless on 2 November 2026, against a local test page with an hCaptcha-style form, a fake P1_ token and the SDK call replaced by a stub. The script read the sitekey and user agent, the page’s callback received the token, and the form posted it in both fields.

In a @request task, no browser

Without a browser, read the sitekey from the HTML and post the token with the form fields:

Python · client and proxy
import os

from botasaurus.request import request, Request
from botasaurus.soupify import soupify
from nonecap import NoneCap

nc = NoneCap(api_key=os.environ["NONECAP_KEY"])
PROXY = "http://user:pass@your-proxy:8000"
URL = "https://your-site.example/signup"

Then the task fetches the page, solves its sitekey and posts the form:

Python · @request with a token
@request(proxy=PROXY, close_on_crash=True)
def signup(request: Request, name):
    page = soupify(request.get(URL))
    sitekey = page.select_one("[data-sitekey]")["data-sitekey"]
    solve = nc.solve(type="hcaptcha", sitekey=sitekey, url=URL, proxy=PROXY)
    response = request.post(
        URL,
        data={
            "name": name,
            "h-captcha-response": solve.token,
            "g-recaptcha-response": solve.token,
        },
        browser="chrome",
        user_agent=solve.user_agent,
    )
    return response.status_code

signup("Ada")

The API reference says what matters here: the solve returns user_agent, the browser user agent it presented while it earned the token, and some sites reject a token submitted by a different browser version. So send the form with that string as your User-Agent, as above. browser="chrome" switches @request from its default Firefox headers; pick the profile that matches the browser in solve.user_agent. Botasaurus has only Chrome and Firefox profiles, so when the solve returns a Safari user agent, none matches: keep sending that string as the User-Agent header, as the example does.

If you pass a proxy, send the form from the same IP address; on Enterprise sitekeys many deployments reject a token submitted from a different address. Passing the same sticky-session proxy URL (one that keeps one exit IP) to the solve and to @request covers both; a rotating proxy can change the address between the two. The proxy must be reachable from the internet, not localhost.

In our run against the local test page, the post carried the token in both fields and the User-Agent we passed, exactly. Post to whatever URL the form’s action points to; in the example it is the page itself. Failed, cancelled and expired solves are never charged.

The Python guide covers Enterprise (rqdata) sitekeys and the errors the SDK raises, the sitekey guide covers sitekeys that are not in the HTML, and the web scraping guide walks through the same detect, solve and submit loop with plain requests. NoneCap solves hCaptcha only; it does not help with reCAPTCHA, Turnstile or other CAPTCHAs.

Solve hCaptcha in Python →

Last updated November 2026.

Frequently asked

What is Botasaurus?
An open-source Python web scraping framework. You write a function and put a decorator on it: @browser hands the function a Chrome it drives, @request hands it an HTTP client that sends browser-like requests, and @task runs anything else. Around those it adds proxies, parallel runs, caching, output files, and a UI or desktop app for your scraper. It is MIT-licensed and written by Chetan Jain under the omkarcloud GitHub account.
How do I install Botasaurus?
python -m pip install --upgrade botasaurus. That installs the framework, its driver and its request library. It does not install a browser: @browser uses the Google Chrome on your machine. A proxy with a username and password also needs Node.js and npm.
What is the latest Botasaurus version?
On 2 November 2026 the latest botasaurus on PyPI was 4.0.97, released 6 January 2026. Its browser driver, botasaurus-driver, was at 4.0.101 from 10 August 2026. The GitHub repository had commits from 31 October 2026, in its JavaScript desktop packages.
How do I use a proxy with Botasaurus?
Pass it to the decorator: @browser(proxy="http://user:pass@host:port"), and the same proxy argument on @request. A list of proxies is rotated. In our test, both decorators sent their traffic through a local proxy that required a login, with the right credentials. For the browser, the first run with a login installed the Node package proxy-chain through npm.
Does Botasaurus run headless?
Yes, with @browser(headless=True). Its README warns that “if you use headless mode, you will surely be identified by services like Cloudflare and Datadome.” For an unattended run, also set close_on_crash=True: the default pauses a failed task and waits for you to press Enter.
Why does @request fail with “Could not connect to GitHub”?
The first time a script imports botasaurus.request, botasaurus-requests downloads a native library from the daijro/hrequests releases on GitHub, through GitHub’s API without a login. If your IP address has used up that API’s hourly limit, the download fails with this error. Wait for the limit to reset, or download the matching hrequests-cgo-2.x file from that repository’s releases into the package’s bin folder yourself.
Does Botasaurus solve hCaptcha?
No. Its README claims it can “pass every (Yes, E-V-E-R-Y) bot test” and lists Cloudflare Turnstile among the checks it passes, but hCaptcha is not mentioned in the README, the package code or its issue tracker. For captchas the README points to the CapSolver extension. When a site shows hCaptcha, the form still needs a valid token in h-captcha-response, and Botasaurus does not produce one. NoneCap returns that token.
Is it allowed to scrape a site with Botasaurus and a solver?
That depends on the site and on what you do there. Scrape where you are allowed to: your own sites, your tests, and services whose terms permit it. NoneCap’s terms rule out fraud, credential stuffing, spam and unauthorised access. This is not legal advice.

Start solving hCaptcha in minutes.

1,300 free credits on signup. Pay per solve, credits never expire, failed solves never charged.