Skip to main content

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

Project description

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.

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}]. Refs are stable handles for click/type/submit.
  • extract() — auto-strategy structured data: tries JSON-LD → __NEXT_DATA__ → Nuxt → OpenGraph → microdata → text fallback, returns highest-confidence hit.
  • click(ref) / type(ref, text) / submit(ref) — interaction. POST and GET forms supported. Checkboxes/radios tracked.
  • 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.

Project details


Download files

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

Source Distribution

pyunbrowser-0.0.8.tar.gz (12.7 kB view details)

Uploaded Source

Built Distributions

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

pyunbrowser-0.0.8-py3-none-manylinux_2_35_aarch64.whl (4.1 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ ARM64

pyunbrowser-0.0.8-py3-none-manylinux_2_31_x86_64.whl (4.3 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyunbrowser-0.0.8-py3-none-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

pyunbrowser-0.0.8-py3-none-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file pyunbrowser-0.0.8.tar.gz.

File metadata

  • Download URL: pyunbrowser-0.0.8.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyunbrowser-0.0.8.tar.gz
Algorithm Hash digest
SHA256 afcdbdb258f1362ec984f38ba571e14cdbde7b6b0ac7564094e03c5ef37f1511
MD5 15cc162cc6907590d0eaf6f301c2fd33
BLAKE2b-256 110bd302c94117e9659eaca5a184ef8c71fdf9acb3a49a82a46199e7436b89c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.8.tar.gz:

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.8-py3-none-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.8-py3-none-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 7aac2a7e330bf3d9aeb97d16b9384c441d9413dc02d263c33121cc3b553f3889
MD5 87e1ac1840d971cbe351c09c4bfac59c
BLAKE2b-256 10f7147a2b29ee14f36c41ecff8bb0d2358375742f592ec249cb2bb2fa3c6394

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.8-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.8-py3-none-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.8-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 02d1cedcb1ab9c506eff0cf209370b5ec2e338657a5593908005fbe002609cb0
MD5 d7ef972e462845b7d44b451414e6ae3d
BLAKE2b-256 97b394ef5f7575fc2332aa3ce4319c9ce3ed515a54d96f0e9b06753009bb693b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.8-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.8-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.8-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df66a11837f42b4e62aad28442b04713b4cb533643cc73ca81107148b414f7ed
MD5 94caca143a1ce290437fca429b038412
BLAKE2b-256 396c9854461e589cf69f1014de559d67d982a2da013543fa82556c5865332380

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.8-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.8-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.8-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cd16e39ef447729abe16bc7dac49bb50b80614de67feb95fe81ec734293cb592
MD5 89400f7e049e3247f7309b2108d4bd83
BLAKE2b-256 a39f20b6a314be486fc6ea5f28a071a8366990241d055d1eb18b96b58486b6bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.8-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page