Node.js screenshot API

Website Screenshot API for Node.js

Capture any URL to a PNG, JPEG or PDF from Node with one fetch call. rasterly runs the headless Chromium server-side, so there's no Puppeteer or Playwright to bundle, keep warm, or patch.

Screenshotting from Node usually means shipping Puppeteer, a bundled Chromium, and a cold-start problem on serverless. rasterly moves that off your function: GET /v1/screenshot?url=...&format=png with your key returns the image bytes. One request, tiny deploy, priced from $0.90 per 1,000.

Try it

node — fetch (Node 18+)
import { writeFile } from "node:fs/promises";

const qs = new URLSearchParams({
  url: "https://stripe.com",
  format: "png", full_page: "true", scale: "2",
});
const res = await fetch(
  `https://api.rasterly.dev/v1/screenshot?${qs}`,
  { headers: { "X-Api-Key": "sk_live_..." } },
);
if (!res.ok) throw new Error(`rasterly ${res.status}`);
await writeFile("shot.png", Buffer.from(await res.arrayBuffer()));

Swap format=pdf for a print-ready A4, or format=jpeg with quality to shrink the file. Grab a key instantly:

node — grab a key
const { key } = await fetch("https://api.rasterly.dev/v1/keys", { method: "POST" }).then(r => r.json());

Common options

Better on serverless

Bundling Chromium into a Vercel or Lambda function is the classic pain: a 300MB dependency, cold starts, and a chrome-aws-lambda layer to babysit. Calling rasterly keeps the function tiny because the browser runs on our side — one fetch, no binary in your bundle. It's the same engine behind PDF, read→Markdown, extract→JSON, crawl and monitoring, so one key covers the whole web layer at $0.90 per 1,000 with 100/mo free.

FAQ

How do I take a screenshot of a website in Node.js?
Call GET https://api.rasterly.dev/v1/screenshot with url and format params and your X-Api-Key header via fetch, then write the arrayBuffer to a file. No Puppeteer, Playwright or bundled Chromium.
Do I need Puppeteer or Playwright?
No — rasterly runs the headless Chromium on the server, so you don't bundle a 300MB browser, keep it warm on serverless, or patch it. Node makes one HTTP request and receives the bytes.
Does it work on Vercel or Lambda?
Yes, and that's the main reason to use it there. Bundling Chromium is heavy and cold-start prone; calling rasterly keeps the function tiny because the browser runs on our side. One fetch, no chrome-aws-lambda layer.
How much does it cost?
From $0.90 per 1,000 on standard and $0.58 per 1,000 on Growth, with 100 renders/mo free. Instant sk_live_ key from POST /v1/keys.
Start free — 100 renders See a live render