Skip to main content

PyPI Python Build Docs License

crawlix

One API. Any backend. Full browser automation to lightweight scraping.

crawlix is a Python browser automation and web scraping library with a unified API across multiple backends. Write your code once — switch between lightweight HTTP scraping and full browser automation without changing a single line.

from crawlix import Browser

# Zero-setup scraping — auto-detects best backend
with Browser() as b:
    page = b.open("https://example.com")
    print(page.find("h1").text)

# Full browser automation — same exact API
with Browser(backend="playwright") as b:
    page = b.open("https://example.com")
    page.type("#email", "user@example.com")
    page.click("[type=submit]")
    page.wait_for(".dashboard")
    page.screenshot("result.png")

Install

pip install crawlix                    # core (requests + BeautifulSoup)
pip install crawlix[playwright]        # full browser via Playwright
pip install crawlix[selenium]          # full browser via Selenium
pip install crawlix[async]             # async support via httpx
pip install crawlix[full]              # everything above
pip install crawlix[termux]            # Termux/Android (no Playwright)
crawlix setup playwright   # install Playwright + Chromium
crawlix setup selenium     # install Selenium (drivers auto-managed)
crawlix setup all          # install everything
crawlix doctor             # check system and diagnose issues

Features

Feature Details
Unified API Same code for HTTP scraping and browser automation. Change backend=, not your code.
Auto-detect Picks the best available backend: playwright → selenium → httpx → requests. No config needed.
Zero hard deps Core depends only on requests + beautifulsoup4. Backends are optional extras.
Stealth by default Realistic headers, user-agent rotation, no bot fingerprinting out of the box.
Context manager Resources cleaned up automatically. Works with with or async context managers.
Helpful errors BackendError tells you exactly what to install. No silent failures, no traceback soup.
CLI tools crawlix setup installs backends. crawlix doctor diagnoses your environment.
Termux ready Works on Android via Termux. Use pip install crawlix[termux].

Quick start

from crawlix import Browser

# Detect backends lazily
with Browser() as b:
    page = b.open("https://news.ycombinator.com")
    for item in page.find_all(".titleline > a"):
        print(item.text, item.attr("href"))
from crawlix import get, fetch

data = get("https://api.github.com/users/keyreyla").json()
html = fetch("https://example.com")
import asyncio
from crawlix.async_api import AsyncBrowser

async def main():
    async with AsyncBrowser() as b:
        page = await b.open("https://example.com")
        print(page.title)

asyncio.run(main())

API at a glance

Browser

Browser(
    backend="auto",   # "playwright" | "selenium" | "requests" | "httpx"
    headless=True,
    stealth=True,
    timeout=30,
    proxy=None,       # "http://user:pass@host:port"
    locale="en-US",
)

b.open(url)          # -> Page
b.new_page()         # -> Page
b.close()
b.backend_name       # -> str
b.supports_js        # -> bool

Page

All interaction methods return self for chaining:

page.find(selector)           # -> Element | None
page.find_all(selector)       # -> list[Element]
page.click(selector)          # -> Page (chainable)
page.type(selector, text)     # -> Page (chainable)
page.wait_for(selector)       # -> Page (chainable)
page.screenshot(path=None)    # -> bytes
page.html                     # -> str
page.text                     # -> str
page.json()                   # -> dict
page.links()                  # -> list[str]
page.tables()                 # -> list[list[list[str]]]
page.evaluate("document.title")  # -> any (browser backends)

Element

el.text               # -> str
el.attr(name)         # -> str
el.attrs              # -> dict
el.find(selector)     # -> Element | None
el.click()            # -> Element (chainable)
el.is_visible()       # -> bool
el.bounding_box()     # -> dict
if el:                # always True — natural presence checks
    ...

Exceptions

from crawlix.exceptions import CrawlixError, BackendError, TimeoutError

Backend feature matrix

Feature requests httpx selenium playwright
JS execution yes yes
Click / type / hover yes yes
Screenshot / PDF yes yes
Network intercept yes
Async support yes yes
Wait / retry yes yes
File upload yes yes
Proxy support yes yes yes yes

Get help

Metadata

Release files for crawlix 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crawlix 0.3.0
File Size Uploaded Provenance Actions
crawlix-0.3.0.tar.gz 62.6 kB Without provenance Details for crawlix-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crawlix 0.3.0
File Interpreter ABI Platform Actions
crawlix-0.3.0-py3-none-any.whl Python 3 none any Details for crawlix-0.3.0-py3-none-any.whl

Total release size: 91.3 kB

Release files / crawlix-0.3.0.tar.gz

Download URL crawlix-0.3.0.tar.gz
Size 62.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cc059d935742435149b5b9acdd26df987aad6af5e7d0d252ecd95c561424318
BLAKE2b-256 checksum
How to use checksums
af4d0a17d4dc5f675b627f5ad64442361a86cf91006adaff80b4caa1f7e4d956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / crawlix-0.3.0-py3-none-any.whl

Download URL crawlix-0.3.0-py3-none-any.whl
Size 28.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0602354ec0f8f454cc9d0116383ececd5611f493dff54fd2594fe808f726b045
BLAKE2b-256 checksum
How to use checksums
eb858612818652123a59d0540a3ae77a8409b9f55f8e53f96a6d24d48090e7f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for crawlix 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page