Home / URL to PDF and screenshot API

Capture

URL to PDF and screenshot API

Turn a list of URLs into PDFs or full-page screenshots (PNG, JPEG, WebP). How a headless browser does it, what usually fails, and a hosted Actor that bills only successful captures.

A headless browser (Playwright or Puppeteer) can turn any URL into a PDF or a screenshot. A single file is a few lines of code. A reliable bulk job is not: you have to wait for the page to settle, hide cookie banners, pick a viewport, deal with timeouts, and avoid charging yourself for pages that never loaded.

The usual DIY shape

browser = await chromium.launch()
page = await browser.new_page()
await page.goto(url, wait_until="networkidle")
await page.pdf(path="out.pdf", format="A4")

That works until a site never reaches networkidle, until a sticky banner covers the content, or until you need a full-page PNG of a 20,000-pixel article. Mobile vs desktop, dark mode, and "just this element" all add flags you will end up supporting.

The Actor

Screenshot & PDF API accepts a list of URLs and returns PNG, JPEG, WebP or PDF captures. It supports full-page, element-level and mobile viewports, and cookie-banner hiding. You pay $2 per 1,000 successful captures; failed captures are not billed.

Example tasks:

This Actor captures pages. It does not extract the text or the product catalog; use the Shopify & WooCommerce Products Feed or the jobs Actors when you need structured rows.