Skip to main content

unbrowser

Web access for LLM agents. One static binary. No Chrome.

Single-file native headless browser optimized for LLM agents. Runs JavaScript via QuickJS, returns a low-token page summary on every navigate, and gives you stable element refs for click/type/submit. Tens of MB RAM per session, no Chrome dependency.

pip install pyunbrowser   # PyPI name; the import is `from unbrowser import ...`

The wheel ships the native binary for your platform — there's nothing else to install.

unbrowser is the lightweight browser tier from Unchained. Run the live public-web demo before installing; no account is required, and the demo accepts only the fixed public source sets shown on the page.

For transparent bot-wall cookie handoff through local Chrome, install the optional solver extra:

pip install 'pyunbrowser[solver]'  # includes unchainedsky-cli
unbrowser cookie-service --headless --profile unbrowser-cookie-service
unbrowser router https://example.com/protected

The solver service binds to 127.0.0.1 by default and returns cookies from the user's local Chrome/unchained session. It does not fabricate challenge tokens. Private/reserved/internal hosts are rejected unless explicitly allowed with --allow-host. Non-loopback binds are rejected unless --allow-remote-bind is passed because /solve is unauthenticated and can return browser cookies. Router refuses non-loopback cookie service URLs by default because it sends target URLs and challenge metadata to that service; use --allow-remote-cookie-service only for a trusted remote solver.

Quick start

from unbrowser import Client

with Client() as ub:
    r = ub.navigate("https://news.ycombinator.com")
    for s in ub.query(".titleline > a")[:3]:
        print(s["text"], s["attrs"]["href"])

Why

curl This Playwright / headless Chrome
Static / SSR pages ✅ but token-heavy ✅ low-token BlockMap overkill
SPA-shell sites (with exec_scripts) ⚠️ partial
Bot-walled (cookie handoff)
Run in Lambda / Workers / edge ❌ Chrome too big
Per-page cost at 100K/day ~free ~free $$$
LLM-shaped output DIY parse ✅ inline BlockMap DIY parse

What it does

  • navigate(url) — fetch, parse, return {status, url, bytes, headers, blockmap, challenge}. With exec_scripts=True, runs page JS in QuickJS (bounded by a 30s watchdog so it can't wedge).
  • query(selector) — CSS query → [{ref, tag, attrs, text, text_chars, text_truncated}]. Refs are stable handles for click/type/submit.
  • query_debug(selector) — diagnose selector misses with match counts, samples, DOM summary, and selector hints.
  • extract() — auto-strategy structured data: tries JSON-LD → __NEXT_DATA__ → Nuxt → OpenGraph → microdata → text fallback, returns highest-confidence hit.
  • extract_table(selector) / table_to_json(selector="table") — normalize HTML tables into headers, rows, and row count.
  • click(ref) / type(ref, text) / submit(ref) — interaction. GET and application/x-www-form-urlencoded POST forms supported; multipart is not yet supported. Checked checkbox/radio values are serialized.
  • cookies_set(...) — paste cookies from a real Chrome session to bypass bot detection (Cloudflare, PerimeterX, Datadome). Solve once, replay forever.

Full RPC reference, BlockMap shape, challenge detection, profile system, and architecture: github.com/protostatis/unbrowser.

Honest limits

  • Heavy framework SPAs (Ember/React) often don't auto-mount inside QuickJS even with exec_scripts=True — the watchdog ensures it returns, check density.likely_js_filled to decide whether to escalate.
  • No screenshots (out of scope by design).
  • Hardest-tier anti-bot (FingerprintJS Pro, Kasada, advanced Akamai BMP) needs the cookie handoff path. The binary detects and labels the challenge for you.

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyunbrowser-0.0.19-py3-none-manylinux_2_35_aarch64.whl (4.4 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ ARM64

pyunbrowser-0.0.19-py3-none-manylinux_2_31_x86_64.whl (4.5 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyunbrowser-0.0.19-py3-none-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

pyunbrowser-0.0.19-py3-none-macosx_10_12_x86_64.whl (4.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file pyunbrowser-0.0.19-py3-none-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.19-py3-none-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 8415377fd2dde412be3a77e061a277b98cdcffc569b3bd2a5d0cc1ec110e12be
MD5 b86b79353a551b515104ca9006a602cc
BLAKE2b-256 06f27195f537118fcff5c786b7478951395c9673bb096a08a358a44f098ebaef

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.19-py3-none-manylinux_2_35_aarch64.whl:

Publisher: release.yml on protostatis/unbrowser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyunbrowser-0.0.19-py3-none-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.19-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 1f1582cb884ef515f7e08a5dfafc97a974c325a438e2a416d943150fe0c59fd9
MD5 cbc51149a8e844bba019fb9763f2d0ea
BLAKE2b-256 4134bc5a8ab3326473ea21ca636d26fe3ef9da006a5a360f4bf9b8c3fecad1ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.19-py3-none-manylinux_2_31_x86_64.whl:

Publisher: release.yml on protostatis/unbrowser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyunbrowser-0.0.19-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.19-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 301a7913d3b267259b5bb142d228aa07a9450fc69459f6e2a4de68f5673798b8
MD5 6ad43b513bd055c0673c92abdd66170e
BLAKE2b-256 90037f93b539f3b1f3abd7040b750065c92abb192f62db8c752a7804c7b7c10d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.19-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on protostatis/unbrowser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyunbrowser-0.0.19-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.19-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d51c0d2689cc8ccd5abbebf73c0538c2770819aeb253472ab359e0c9a2640d51
MD5 4e56a857160719fd4fabc37f82dff5fa
BLAKE2b-256 af358b238738fe4bfed619de58f8cefda5f52c271490516efb679799e80b6663

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.19-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on protostatis/unbrowser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.21

4 files

0.0.20

4 files

This release

0.0.19 This release

4 files

0.0.18

4 files

0.0.17

4 files

0.0.16

4 files

0.0.15

4 files

0.0.14

4 files

0.0.13

4 files

0.0.12

4 files

0.0.11

5 files

0.0.10

5 files

0.0.9

5 files

0.0.8

5 files

0.0.6

4 files

0.0.5

4 files

0.0.4

3 files

0.0.1

2 files

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