obscura-node is an open-source Node.js wrapper for Obscura, a high-performance headless browser written from scratch in Rust. It has reached over 1,800+ downloads on npm, serving as a lightweight drop-in replacement for headless Chrome with Puppeteer and Playwright.
Unlike heavy Chromium installations that take 300+ MB of disk space and 200+ MB of RAM per tab, Obscura runs in just ~30 MB of memory and starts up in under 50 milliseconds.
Key Highlights
- 1,800+ npm Downloads: Actively downloaded by developers building AI web agents and scraping pipelines.
- Ultra-Lightweight Footprint: Consumes only ~30 MB memory per page, using up to 10x less RAM than headless Chrome.
- Drop-in Chrome Replacement: Full Chrome DevTools Protocol (CDP) support over WebSockets for seamless Puppeteer and Playwright integration.
- Fast Startup & Rendering: Loads static pages in ~51 ms and dynamic JavaScript apps in ~85 ms.
- Built-in Stealth & Tracker Blocking: Masks automation flags and blocks thousands of analytics trackers out of the box.
- One-Shot Fetch API: Includes
ObscuraFetch()to fetch and render any URL into HTML, plain text, or Markdown without setting up a server.
Quick Start
Install via npm
npm install obscura-node
One-Shot Page Fetching
import { ObscuraFetch } from 'obscura-node';
const page = await ObscuraFetch('https://example.com', {
format: 'markdown',
stealth: true,
});
console.log(page.content);
Puppeteer / Playwright Integration
import { loadObscura } from 'obscura-node';
import puppeteer from 'puppeteer-core';
// Spawns lightweight browser instance and returns CDP WebSocket
const { wsEndpoint, close } = await loadObscura({ port: 9222 });
const browser = await puppeteer.connect({
browserWSEndpoint: wsEndpoint,
});
const page = await browser.newPage();
await page.goto('https://example.com');
await browser.close();
await close();
Comparison: Obscura vs Headless Chrome
| Metric | Obscura | Headless Chrome |
|---|---|---|
| Memory per instance | ~30 MB | 200+ MB (6x to 10x more) |
| Binary size | ~70 MB | 300+ MB |
| Page load (static) | ~51 ms | ~500 ms |
| Page load (dynamic) | ~85 ms | ~800 ms |
| Startup time | ~50 ms (Instant) | ~2,000 ms |
| Anti-detection | Built-in stealth | Requires extra plugins |
| Tracker blocking | 3,500+ domains | None by default |
Tech Stack
- Runtime: Node.js, TypeScript
- Engine: Obscura (Rust V8 via
deno_core), Chrome DevTools Protocol (CDP) - Distribution: npm package, cross-platform binary manager (Linux, macOS, Windows)