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. 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.

Project details


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

Uploaded Python 3manylinux: glibc 2.35+ ARM64

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

Uploaded Python 3manylinux: glibc 2.31+ x86-64

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

Uploaded Python 3macOS 11.0+ ARM64

pyunbrowser-0.0.12-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.12-py3-none-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyunbrowser-0.0.12-py3-none-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 461ca59c33d81be487e2b74311f720981ed1ca046155440d94624387c0c763ff
MD5 d9502944f6a69f7992c4f0318fca07df
BLAKE2b-256 61325b5c97a9f36d577197369cbe01d53af2a4f0bdb4b37a4e6c6a5aa734be50

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.12-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 bc5475f1a034e87f33dfa99607651e8ab9967329ddcd8e84cc678882b8093bd1
MD5 e18d67866654984729cdaebc8fb031bf
BLAKE2b-256 4c67cdf7c3087d23d7b5394166e2b939904efed8a0037156cd90fcb9b6c2cc40

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.12-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 12222cb5e51f9e683fb5366975ae1bd6d43b99ba8c2e90215d0a9aab64ab1679
MD5 e99d51a270ae2fbeb5daea842d769b51
BLAKE2b-256 e67acb2248d16f18ad374c6656f8854ceacf2927245b6c8858f4402577d837b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyunbrowser-0.0.12-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9115402fb204701b06e505c900df559416125ae32b77576aa36507b71c3b2ca0
MD5 bfdfa0980877fb4433b0460571f10bff
BLAKE2b-256 681402b008b6ba3ce2dff59e15fb9a136c0b55d46344a00292ce4226a81b15ac

See more details on using hashes here.

Provenance

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