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.11.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.11-py3-none-manylinux_2_35_aarch64.whl (4.3 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ ARM64

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

Uploaded Python 3manylinux: glibc 2.31+ x86-64

pyunbrowser-0.0.11-py3-none-macosx_11_0_arm64.whl (4.0 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

pyunbrowser-0.0.11-py3-none-macosx_10_12_x86_64.whl (4.3 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: pyunbrowser-0.0.11.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.11.tar.gz
Algorithm Hash digest
SHA256 22df18de20fa048cbe073f4eabad7936a3af441b3dd1992f3fa30ead4406ceb7
MD5 8f3d9e9d05cdab021877d5af460c979f
BLAKE2b-256 6916d77a8d2461d21a53f975770339f00bc0240c9bd5259089e3bc526d9b76ed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.11-py3-none-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 e971d329eea06077490d1122842ae13631bd839aa35e133b0c93c2ccbc502522
MD5 b8f81377482b8f2d9cf661cf2dc3d6f4
BLAKE2b-256 df9b8aedad09364b7983ed87b092c7e56112bd9063301ffbbd8812d2d0c9e5c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.11-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 e3f5d1c3523f37f97b35f5cf4eb2296b0011fbeb0365096f9b0672d109ed790d
MD5 f95f47b14dcc890bfd774b0444b308d2
BLAKE2b-256 21175c89156b386a01aa1cb0394388690e751b997f48585a72b4cdac0e65ddb2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.11-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9dadd4f619c85e86a86c0eef6f971f5cbbca129ce3f07ffbd48be62f469abaf8
MD5 0a085a5f99fa0d2c20d514fc5aadba45
BLAKE2b-256 0e8f3dd6494fc5da83a182ad387e4284b37b447f74b6f5dc3d0a8b048127861b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.11-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ecaff4517e84c7c84f597bd9fa970f6d446a190a2b9a817986bbc4e9e7092493
MD5 a86ab39e26be64249d3ef1c0bbd03bd3
BLAKE2b-256 c5f8bb02c40871e3ccb2e3ea16750ba48d3d846b4f0af04125027c84b754e6db

See more details on using hashes here.

Provenance

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