Screenshot API vs Puppeteer and Playwright

By URLBooth · Published · Last updated

A screenshot API is usually the better choice when screenshots are a feature rather than your product: you send a URL and get an image, without operating browsers. Running Puppeteer or Playwright yourself wins when you need full control of the browser, must keep data inside your own network, or already run browser infrastructure.

What is the real difference?

Both approaches drive a real Chromium browser. The difference is who runs it. With Puppeteer or Playwright you own the code, the browser binary, the machines and everything that goes wrong between them. With a screenshot API you own one HTTP call.

import puppeteer from "puppeteer";
​
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 900 });
await page.goto("https://example.com", { waitUntil: "networkidle2" });
await page.screenshot({ path: "screenshot.png" });
} finally {
await browser.close();
}
URLBooth API
curl --fail-with-body "https://urlbooth.com/v1/screenshots" \
-H "Authorization: Bearer $URLBOOTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","device":"macbook-pro-14","format":"png"}' \
-o screenshot.png

The Puppeteer snippet looks short because it only shows the happy path on one machine. The questions below are what it leaves out.

What do you take on when you run it yourself?

ConcernSelf-hosted Puppeteer or PlaywrightHosted screenshot API
InfrastructureYou provision servers or containers with the browser's system libraries and fonts, and keep Chromium patched.Provided. You call an endpoint.
Memory and browser lifecycleBrowsers are heavy. You manage concurrency limits, crashed or leaked processes and zombie tabs.Handled by the provider.
Cold startsLaunching a browser per request is slow; keeping browsers warm costs idle compute and adds state to manage.Not your problem, though each request still takes a few seconds to load a real page.
Cookie banners and adsYou write and maintain selectors and request blocklists per site, and they break when sites change.Built in on URLBooth and best effort. See the cleanup guide.
ScalingBursts need more machines or a queue. You decide how to back-pressure and retry.Limits are published (Pro: 60 requests per minute, 10 concurrent). Beyond that you need a larger plan or your own capacity.
Cost of ownershipCompute is only part of it. Add engineering time for upgrades, on-call and debugging flaky pages.A flat subscription (URLBooth Pro is $20 per month for up to 10,000 captures a day).
ControlFull: scripts, logins, clicks, custom headers, any Chromium flag.Limited to the documented options: url, device, format, fullPage, cleanup, frame.
Data locationPages are fetched from your own network.Pages are fetched by the provider and stored privately for two days.

Why are consent banners and ads the hidden cost?

A clean screenshot needs more than page.screenshot(). Cookie dialogs, newsletter pop-ups and ad slots cover the content you wanted, and every site does it differently. Self-hosting means keeping a rule list current. A hosted API shares that maintenance across all its users, but it is still best effort: pages that block automated browsers will fail either way. See how URLBooth removes cookie banners.

Which one should you choose?

If this describes youChoose
Screenshots are a side feature and you want it working this weekScreenshot API
You capture public pages and want banners and ads removedScreenshot API
You have no one to maintain browser infrastructureScreenshot API
You need to log in, click through flows or run custom scripts before capturingPuppeteer or Playwright
Pages are on a private network or must not leave your infrastructurePuppeteer or Playwright
You already run browser fleets, or capture volume is large and steady enough to justify the workPuppeteer or Playwright
You test your own app in CIPlaywright (it is a test tool first)

Many teams start with the API and only move to self-hosting if they outgrow its options. The reverse migration is harder, because you also have to retire the infrastructure you built.

Where to go next