Web Scraping APIs

What Is Obscura?

What Is Obscura? — conceptual illustration
On this page

Obscura is an open-source headless browser engine written from scratch in Rust — not a fork or patch of Chrome or Firefox. It runs JavaScript through V8 (via the deno_core crate) against an html5ever-built DOM and exposes a Chrome DevTools Protocol server so Puppeteer/Playwright clients can drive it. At ~30MB and ~85ms per page it is by far the lightest tool here, but it has no layout engine, no CSS cascade, and no real canvas/WebGL — which is exactly what limits it against fingerprint-aware anti-bots.

Quick facts

TypeFrom-scratch headless engine (V8 + html5ever)
LanguageRust (CLI/engine); any language via CDP clients
Footprint~30MB binary, ~85ms page load — high concurrency
StealthJavaScript shim (navigator overrides) + optional TLS via --features stealth
Hard limitNo layout/rendering — getBoundingClientRect returns all zeros

How Obscura works

Obscura is a Cargo workspace of six crates: a CLI (fetch/scrape/serve + load balancer), a CDP WebSocket server, a Page abstraction, an HTTP client (reqwest by default, wreq for TLS impersonation under --features stealth), the V8 runtime, and an html5ever DOM with the selectors crate for CSS queries. On navigation it fetches the HTML, parses it, fetches CSS in parallel (but only stores it as a string — never applies it), boots V8 from a compile-time snapshot, and executes the page scripts.

All anti-detection lives in a 3,035-line bootstrap.js shim executed before page scripts: it defines navigator with webdriver=undefined, a Chrome 145 UA, userAgentData/UA-CH payloads, a 5-plugin list, and stubs for mediaDevices/battery/permissions. There are no C++ or binary patches — every override is JavaScript.

Why it is weak against real anti-bots

Obscura is not a full browser. Because it has no layout engine, getBoundingClientRect() returns {0,0,0,0} for every element and getComputedStyle returns stub values — both trivially detectable by Layer-5 (rendering/layout) probes. Its canvas, WebGL, and audio are not real implementations, so any fingerprinting service that hashes actual canvas/WebGL output flags it instantly. The UA is hardcoded Linux. It defeats only basic navigator.webdriver-style checks; against DataDome, Kasada, Akamai, PerimeterX, or even Cloudflare beyond the free tier, it fails.

When to use Obscura

Use it when: you need to render JavaScript on unprotected pages at high concurrency and a real Chrome instance (~200MB) is too heavy — Obscura's ~30MB workers let you run many in parallel. The repo's suggested pattern is a hybrid: Obscura handles the easy bulk, and Patchright/Camoufox handle the few protected targets. Avoid it when: the target uses any fingerprint-aware or layout-probing detection — it has no answer to those. It is a lightweight JS-rendering engine, not an anti-detect browser.

Code example

bash
# Lightweight JS rendering for unprotected pages, optional TLS stealth
obscura fetch https://example.com --dump-text

# Or run as a CDP server and drive it from Puppeteer/Playwright clients
obscura serve --port 9222
# Build with TLS impersonation: cargo build --release --features stealth

Related terms

Concept map

How Obscura connects

The terms most directly tied to this one. Hover a node to see its neighbours, click to preview, drag to rearrange.

0 terms · 0 connections
You are here · Web Scraping APIs
Building map…

Frequently asked questions

Is Obscura a real browser?

No. It is a from-scratch engine that runs JavaScript (V8) against an html5ever DOM, but it has no layout engine, no CSS cascade, no compositor, and no real canvas/WebGL/audio. It reimplements just enough browser surface to execute page scripts, which is why it is so lightweight.

Why does Obscura fail against anti-bot systems?

Its missing layout engine is a dead giveaway: getBoundingClientRect returns all zeros and getComputedStyle returns stubs, which Layer-5 rendering probes catch immediately. Its canvas/WebGL are not real, so fingerprinting services that hash actual output flag it. It only beats basic navigator.webdriver checks.

When would I choose Obscura over Chrome?

When you need to render JavaScript on unprotected pages at high concurrency. At ~30MB and ~85ms per load you can run far more workers than with ~200MB Chrome instances. The recommended pattern is hybrid — Obscura for the easy bulk, Patchright/Camoufox for the protected pages.

Does Obscura impersonate TLS?

Optionally. Built with --features stealth it swaps reqwest for the wreq client to present a Chrome 145 TLS fingerprint. It is a single profile, not the broad impersonation library that Scrapling's curl_cffi tier offers.

Last updated: 2026-05-28