Install and start capturing
npm install snapshotflow supports Node.js 18+, includes TypeScript types, and works with both ESM and CommonJS.
npm install snapshotflow
What shipped
The SDK wraps every production capture workflow in typed JavaScript: binary screenshots and PDFs, JSON with extracted content and metadata, hosted URLs, batches of up to 10 pages, pixel-level visual diffs, and asynchronous jobs with signed webhooks.
- Capture control: full-page mode, viewport, device scale, formats, selectors, waits, dark mode, headers, cookies, custom CSS and scripts.
- Cleaner output: block ads, trackers, cookie banners, media, or selected requests before capture.
- Useful results: save a buffer to disk, convert it to a Blob or base64, extract page content, and read cache or ETag metadata.
Main methods
| Method | What it does |
|---|---|
take, takeJson, takeUrl | Return binary output, structured JSON, or a hosted download URL. |
batch | Capture up to 10 URLs with shared settings. |
diff | Compare two pages and return pixel statistics plus a diff image. |
takeAsync, getJob, waitForJob | Start, inspect, and wait for long-running captures. |
health, verifyWebhook | Check service health and verify incoming webhook signatures. |
Minimal screenshot
import { SnapshotFlow } from "snapshotflow";
const client = new SnapshotFlow({
apiKey: process.env.SNAPSHOTFLOW_API_KEY
});
const shot = await client.take({
url: "https://example.com",
fullPage: true
});
await shot.save("example.png");