Node.js

Screenshot API for Node.js

No Puppeteer in your dependency tree, no Chromium in your container image, no memory ceiling to babysit.

screenshot api nodejs · request and resultPAGECAPTURE / 01
Node.js
import { writeFile } from "node:fs/promises";

export async function capture(url: string) {
  const response = await fetch("https://api.pagecapture.dev/v1/take", {
    method: "POST",
    headers: {
      "X-Access-Key": process.env.PAGECAPTURE_KEY!,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ url, format: "png", full_page: true }),
  });

  if (!response.ok) {
    const { error_code, error_message } = await response.json();
    throw new Error(`${error_code}: ${error_message}`);
  }

  await writeFile("shot.png", Buffer.from(await response.arrayBuffer()));
}
Capture result
succeeded
https://example.com
Noma
Shop now
NEW COLLECTION

Objects for slower mornings.

Thoughtful essentials, made in small batches from natural materials.

Explore the collection
No. 01 · Hinoki
PLANT-BASEDMADE IN SMALL BATCHESREFILLABLE
Artifact
PNG · 1440×900
Billing
1 credit
Engine
stable

Just fetch

Node 18+ has everything you need. No native modules, no post-install browser download.

Smaller images

A Chromium layer is roughly 300 MB of container image you stop shipping.

Typed errors

Stable error codes are easy to model as a union type and exhaustively handle.

Serverless friendly

Async mode with a webhook keeps you inside a short function timeout.

Pricing

One credit per successful capture. Failures and cache hits are free.

Free
$0
100 credits
Basic
$10
2,000 credits
Growth
$47
10,000 credits
All plans

Questions this raises

How does this compare to running Puppeteer myself?

Locally, Puppeteer is simpler. In production you inherit browser upgrades, fonts, memory limits, timeouts, concurrency and crash recovery. That operational surface is what you are moving.

Is there an official SDK?

The API is plain HTTP and the playground generates typed snippets. We would rather ship one contract that never drifts than seven SDKs at different versions.

Can I use it from an edge runtime?

Yes. It is one fetch call — no Node-specific APIs required beyond writing the file.