Puppeteer and Playwright are great libraries. Running them in production just to make screenshots or PDFs costs more than it looks.
We ran Puppeteer 25.16 with Chrome for Testing (400 MB unpacked) on Ubuntu on 2026-10-25, with 1280×800 viewports, waitUntil: "networkidle0" and fullPage: true.
| Step | Result |
|---|---|
Plain puppeteer.launch() | Crashes: "No usable sandbox!" (Ubuntu 23.10+ restricts user namespaces) Needs args: ["--no-sandbox"] or an AppArmor profile |
Launch with --no-sandbox | 0.34 s; 284 MB of memory (PSS) before opening a page |
| One Wikipedia article, full page | 2.6 s, 1.9 MB PNG; browser at 432 MB |
| 4 pages at once | 10 s; memory peak 1.16 GB |
| 8 pages at once | Memory peak 2.24 GB; 2 of 8 hit the 45 s navigation timeout |
Then six real sites, one at a time, 30 s timeout. Four of them didn't give a usable full-page capture, and none of those four threw an error you could catch:
| Site | Plain Puppeteer vs. Shotmint API |
|---|---|
| theverge.com | Puppeteer: networkidle0 never came (ads keep the network busy), timeoutAPI: 14 s, 1280×16000 (our height cap) |
| stackoverflow.com/questions | Puppeteer: a one-screen 1280×800 "full page" API: 1280×2822, the real list (we wait out self-solving bot challenges) |
| edition.cnn.com | Puppeteer: 1280×800 of "Unknown Error", sent with HTTP 200, because the default user agent says HeadlessChromeAPI: 1280×7627. Honest note: our API had the same bug until this test; it now sends a normal Chrome user agent by default |
| nytimes.com | Puppeteer: 1280×800 block page API: blocked too, but the response says so in X-Page-Status: 403 instead of looking like a success |
The other two (bbc.com/news, a GitHub repo) worked in both. The point isn't that Puppeteer is bad. It's that a screenshot service is mostly this kind of edge-case handling, and you only find the cases by looking at the images.
// Before: puppeteer
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(url, { waitUntil: "networkidle0" });
const png = await page.screenshot({ fullPage: true });
await browser.close();
// After: one HTTP call
const r = await fetch("https://shotmint.creasework.com/v1/screenshot?" + new URLSearchParams({ url, full_page: "true", wait_until: "networkidle" }),
{ headers: { "X-API-Key": process.env.SHOTMINT_KEY } });
const png = Buffer.from(await r.arrayBuffer());
| Puppeteer | Shotmint |
|---|---|
page.setViewport({width, height, deviceScaleFactor}) | width, height, device_scale_factor |
screenshot({fullPage: true}) | full_page=true |
(await page.$(sel)).screenshot() | selector=sel |
emulateMediaFeatures([{name:'prefers-color-scheme',value:'dark'}]) | dark_mode=true |
page.pdf({format, landscape, margin, printBackground, scale}) | /v1/pdf with format, landscape, margin, print_background, scale |
page.setContent(html) | html in the POST body |
page.setUserAgent(ua) | user_agent |
page.setExtraHTTPHeaders(h), page.setCookie(...) | headers, cookies |
page.addStyleTag({content}) | css, or hide_selectors to hide elements |
| Request interception to drop ads and cookie banners | block_ads=true |
new Promise(r => setTimeout(r, ms)) before the capture | delay (ms) |
screenshot({omitBackground: true}) | omit_background=true |
page.emulateMediaType("screen") before page.pdf() | screen_media=true |
page.pdf({displayHeaderFooter, headerTemplate, footerTemplate}) | header_template, footer_template |
Several page.pdf() calls merged with another library | urls (up to 20 pages into one PDF) |
The PDF endpoint also does things page.pdf() can't on its own: watermark, pdf_a (archival PDF/A), password protection, and title/author metadata. Every parameter is in the API reference.
Be honest with yourself here. If you need multi-step flows (log in, click, fill forms), you render millions of pages a month, or pages are only reachable inside your private network, self-hosting is the right call. An API pays off when rendering is a side feature you'd rather not operate. Staying with Puppeteer? See Puppeteer screenshots: full page, element & PDF (or the Playwright version) for the fixes to blank lazy images, cookie banners and missing fonts, and HTML to PDF in Node.js for page.pdf().
No signup, no card. Get a key in one click, then buy credits only if you need more (from €5 for 2,000, never expire). From a script, an AI agent, Make or Zapier, POST /v1/keys/free (no body) returns a key as JSON (openapi.json, no-code recipes).
All guides: guides · integrations · comparisons