Taking one screenshot of a web page is easy. Taking a full-page screenshot, or a PDF, of fifty pages on mobile and desktop, every week, without a cookie banner covering half of each image, is the part that eats an afternoon.

This post shows the free ways to capture a page yourself, the problems that full-page captures run into, and then how to get a screenshot and/or PDF for every URL in a list with Website Screenshot API: Full-Page PNG, JPEG & PDF, an Apify Actor I built and publish as thriving_adder. I earn when it is used. You do not need the Actor to take screenshots.

Capture a page yourself

For a few pages, these free options are enough:

  1. Chrome DevTools. Open DevTools, press Ctrl+Shift+P (Cmd+Shift+P on a Mac), type "screenshot" and choose Capture full size screenshot. Turn on device mode first for a mobile view.
  2. Firefox. Right-click the page, choose Take Screenshot, then Save full page.
  3. Print to PDF. The browser's print dialog with "Save as PDF" gives you a PDF of the page as the print stylesheet sees it.
  4. Playwright from the command line. Playwright's CLI can screenshot or print one URL without writing a script (npx playwright screenshot --help lists the options):
npx playwright screenshot --full-page https://example.com/ example.png npx playwright screenshot --device="iPhone 13" --full-page https://example.com/ example-mobile.png npx playwright pdf https://example.com/ example.pdf 

The first run may ask to download a browser (npx playwright install chromium). PDF output only works in Chromium.

If you only need a handful of pages, stop here. A short loop around the Playwright CLI covers a lot of cases.

What goes wrong at scale

Once the list gets longer, the same few problems keep coming back:

  • Cookie and consent banners cover the top of every capture. Clicking "Accept" automatically means agreeing to tracking on someone else's site, so hiding the banner is usually the better choice.
  • Lazy-loaded images stay blank unless the page is scrolled before the capture.
  • Very tall pages (long articles, infinite feeds) can hang the browser or produce an image tens of thousands of pixels high.
  • Slow or broken pages need a timeout, and you have to keep track of which URLs failed.
  • Somewhere to put the files and a way to match each file to its URL.

None of this is hard, but it is code you have to write and keep running.

Capture a list of URLs in one call

The Actor opens each URL in headless Chrome (Playwright) and saves a PNG or JPEG screenshot, a PDF, or both. It has desktop (1366x768), laptop, tablet and mobile (390x844) presets or a custom size; mobile and tablet render at 2x pixel density. It can capture the full page or only the viewport. Common cookie-consent banners are hidden with CSS (it never clicks "Accept"), and you can hide other elements with your own CSS selectors. Pages taller than 10,000 px (adjustable) are clipped and flagged instead of hanging the run. Each result row has the final URL, the HTTP status code, the page title and a download link for every file.

Capture only pages you are allowed to capture, and respect each site's terms. By default the Actor respects robots.txt and skips disallowed URLs for free.

Cost

Prices below are from the live Store listing on 30 November 2026. Check that page before you run anything, in case they have changed.

Event Price
Actor start $0.00005 (one event per GB of memory, minimum one; the default 4 GB run counts as four events, so $0.0002)
Screenshot (PNG or JPEG), per page $0.002
PDF, per page $0.0025

Failed pages, rejected URLs (logins, localhost, private networks) and robots.txt skips are free. You only pay for events that actually happen, not the run cap.

Two pages as PNG plus PDF therefore cost $0.009 plus the start fee. One thousand full-page PNGs cost about $2.

Apify's Free plan includes $5 of monthly usage and does not require a credit card (apify.com/pricing, checked 30 November 2026).

One API call

Create a free Apify account and copy an API token from Console > Settings > API & Integrations. Replace APIFY_TOKEN in the request below. The two URLs are only public examples so you can see the shape of the output. Point urls at pages you are allowed to capture when you run this for real.

This calls Apify's public synchronous endpoint, which waits for the run to finish (up to 300 seconds) and returns the dataset items as JSON. A short list of ordinary pages fits easily. For long lists, use Apify's asynchronous run API instead.

curl -sS --max-time 300 -X POST \ "https://api.apify.com/v2/acts/thriving_adder~website-screenshot-pdf/run-sync-get-dataset-items?maxTotalChargeUsd=0.05" \ -H "Authorization: Bearer APIFY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "urls": [ { "url": "https://example.com/" }, { "url": "https://www.wikipedia.org/" } ], "outputFormats": ["png", "pdf"], "viewport": "mobile", "fullPage": true }' 

The same call in JavaScript (Node.js 18 or later; save it as capture.mjs and run node capture.mjs), downloading each file to ./output:

import { mkdir, writeFile } from "node:fs/promises"; const response = await fetch( "https://api.apify.com/v2/acts/thriving_adder~website-screenshot-pdf/run-sync-get-dataset-items?maxTotalChargeUsd=0.05", { method: "POST", headers: { Authorization: "Bearer APIFY_TOKEN", "Content-Type": "application/json", }, body: JSON.stringify({ urls: [ { url: "https://example.com/" }, { url: "https://www.wikipedia.org/" }, ], outputFormats: ["png", "pdf"], viewport: "mobile", fullPage: true, }), }, ); const items = await response.json(); if (!response.ok) { throw new Error(`Run failed: ${response.status} ${JSON.stringify(items)}`); } await mkdir("output", { recursive: true }); for (const row of items) { if (row.error) { console.log(`${row.url ?? row.startUrl}: ${row.error}`); continue; } for (const [format, ext] of [["png", "png"], ["jpeg", "jpg"], ["pdf", "pdf"]]) { const fileUrl = row[`${format}Url`]; if (!fileUrl) continue; const file = `output/${row[`${format}Key`]}.${ext}`; const res = await fetch(fileUrl); await writeFile(file, Buffer.from(await res.arrayBuffer())); console.log(`${row.url} (${row.statusCode}) -> ${file}`); } } 

Each successful row includes:

  • startUrl and url - the URL you sent and the final URL after redirects
  • statusCode and title - the HTTP status and the page's <title>
  • viewport, fullPage, pageHeightPx and heightTruncated - what was captured, and whether a very tall page was clipped
  • pngUrl / jpegUrl / pdfUrl - download links for the files, with pngKey, pngBytes and so on
  • takenAt - when the capture was made

Rows for pages that failed or were skipped include an error message ending in "(not charged)". The download links point to the run's storage on Apify: treat them like private links, and download the files you want to keep, because unnamed run storage is removed after your plan's data retention period.

The JSON below is only an illustrative shape of a successful row, so you can see the field names. The values are placeholders, not the result of a live run.

{ "startUrl": "https://example.com/", "url": "https://example.com/", "statusCode": 200, "title": "Example Domain", "viewport": "390x844", "fullPage": true, "pageHeightPx": 0, "heightTruncated": false, "takenAt": "2026-11-30T00:00:00.000Z", "pngKey": "png_<hash>", "pngUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/png_<hash>", "pngBytes": 0, "pdfKey": "pdf_<hash>", "pdfUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/pdf_<hash>", "pdfBytes": 0 } 

A Python script and a Node.js script that save the files locally are in the MIT-licensed examples repo under screenshot-pdf/.

Useful options

  1. "viewport": "desktop" (or laptop, tablet, mobile), or set viewportWidth and viewportHeight for a custom size.
  2. "outputFormats": ["jpeg"] with "jpegQuality": 70 gives much smaller files than PNG.
  3. For single-page apps, set "waitUntil": "networkidle" or add "delayMs": 2000.
  4. "scrollToBottom": true scrolls the page first so lazy-loaded images appear.
  5. "hideSelectors": [".chat-widget", "#promo-bar"] hides elements the built-in cookie-banner list does not cover.
  6. "pdfFormat": "Letter" (or A4, Legal, A3) sets the PDF paper size.

Limits worth knowing

  • Only public http(s) pages. No logins or cookies. Localhost and private-network addresses are rejected and not charged.
  • Cookie banners are hidden with a list of common selectors. Unusual consent tools may still show; add their selectors to hideSelectors.
  • Pages taller than maxPageHeightPx (10,000 px by default) are clipped and flagged with heightTruncated. If a full-page capture still times out, the Actor falls back once to the top 4,000 px and flags that too.
  • Timeouts are not retried, so a very slow page fails fast (free) instead of holding up the run.
  • respectRobotsTxt defaults to true. Turn it off only for sites you own or have permission to capture.
  • The copyright in a page's content stays with its owner. A screenshot of a public page is generally fine for your own records, but check before you republish captures.

If something looks wrong, open an issue on the Actor's Issues tab with the URL and the input you used.