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.10.tar.gz (13.4 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.10-py3-none-manylinux_2_35_aarch64.whl (4.2 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ ARM64

pyunbrowser-0.0.10-py3-none-manylinux_2_31_x86_64.whl (4.4 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyunbrowser-0.0.10-py3-none-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

pyunbrowser-0.0.10-py3-none-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: pyunbrowser-0.0.10.tar.gz
  • Upload date:
  • Size: 13.4 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.10.tar.gz
Algorithm Hash digest
SHA256 6fb4581559cdc138799cfdec009ceb09d2f961e28e91afa097f7d9bd7597490b
MD5 ec20e270012f49b68ad81a422f214b12
BLAKE2b-256 a56048a737355b9468e86d10a296903a8dad9246d2235e0a9ecd033344fe8306

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyunbrowser-0.0.10.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.10-py3-none-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.10-py3-none-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 36e3680225db71dddcf8729ad27def241fff1eb24168f9431b78e0b8c16eba37
MD5 fd22437543a141778c84eb0463b156b6
BLAKE2b-256 9e980fac845bbe05bea4e623e3cac18527b4a2f53edf2ca0789992ee3c6a2b72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.10-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 26f4dbdb1098de63778d09e16c613b4043e68973ef9eaa93b03b291238afee2f
MD5 bb7843f009b3f91fe5742216a6c79d61
BLAKE2b-256 93c009fe371d898a406d82d6532dca73defeaf5f5210d562f0922fa34a475847

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.10-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9db02064e1173b42f83244f961700aa4d892b61db1ac1ed90ae3b960c6b68e79
MD5 d873e48c6bb2a67aca56f6d1845f8aae
BLAKE2b-256 0f1e2dc67e23e0d552258d9541b0c2640e6bd92009cf3748fb113a516046099d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.10-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 91a0490af5687859af9dcdc7258bf4b27afb54ee9d51e8a84f45dda5b0d0c2da
MD5 493fb62b54aa6a062785d9ef60d2baa7
BLAKE2b-256 e06f793e3cd48fb3bce610bfb99798f87b3c2aba7f92ead1f66f0592c7dd5365

See more details on using hashes here.

Provenance

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