# Website Screenshot API & HTML to PDF: Full Page, Bulk URLs (`jordydev/screenshot-pdf`) Actor

Take full-page or viewport screenshots (PNG, JPEG) and PDFs of any list of URLs, or convert raw HTML to PDF. Cookie banners removed automatically, iPhone, Pixel, iPad and desktop presets, wait-for-selector and direct download links. $3 per 1,000 files.

- **URL**: https://apify.com/jordydev/screenshot-pdf.md
- **Developed by:** [Jordy](https://apify.com/jordydev) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 files

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Website Screenshot API & HTML to PDF Converter: Full Page, Bulk URLs

**Turn any list of URLs, or your own raw HTML, into full-page PNG/JPEG screenshots and PDFs, with cookie banners removed, for $3 per 1,000 files.**

Pick a device preset (desktop, laptop, iPad, iPhone, Pixel, Galaxy), full page or viewport, and the Actor **accepts cookie banners automatically** so your screenshots look like what a real visitor sees. Render invoices, reports or email templates from raw HTML to PDF without hosting them. Every file gets a direct download link.

### What can it do?

- ✅ **Bulk URL screenshots**: PNG, JPEG and PDF, one file per URL and format, with a direct `fileUrl` per file.
- ✅ **HTML to PDF / PNG**: pass raw HTML in `htmlDocuments`; public images and CSS load normally.
- ✅ **Full-page or viewport** captures. Full page scrolls first so lazy-loaded images appear (pages over 16,000 px are cut and flagged).
- ✅ **8 device presets**: desktop 1920/1440, laptop 1366/1280, iPad Pro 11, iPhone 15, Pixel 8, Galaxy S24, or a custom width and height.
- ✅ **No cookie popups**: clicks "Accept" on OneTrust, Didomi, Cookiebot, Usercentrics, SourcePoint, Quantcast, CookieYes, TrustArc and more, in 10 languages, and reports what it did per file.
- ✅ **Wait controls**: wait for a CSS selector, `domcontentloaded` / `load` / `networkidle`, extra delay; hide chat widgets or popups with your own selectors.
- ✅ **PDF options**: paper size (A4, Letter…), landscape, background graphics. Text in PDFs stays selectable.

### Use cases

- **Visual monitoring and archiving**: schedule daily screenshots of competitor pages, landing pages or terms pages.
- **Agencies and QA**: capture every page of a site on desktop and mobile for a client review or a visual regression check.
- **Invoices and reports**: convert HTML templates to PDF in bulk from your app via the API.
- **SEO and marketing**: thumbnails for directories, link previews and reports.
- **Compliance and evidence**: dated PDFs of web pages as they appeared.

### How to use it

1. Click **Try for free** and paste your URLs into **URLs**, or add raw HTML under **HTML documents**.
2. Choose formats (**PNG**, **JPEG**, **PDF**), a device preset and full page or viewport.
3. Click **Start**. Every file has a `fileUrl` in the **Output** tab and is stored in the run's key-value store.
4. For monitoring, save the input as a **task** and add a **schedule**; send links to Slack, Google Drive or a webhook under **Integrations**.

### Example input

```json
{
  "urls": ["https://example.com", "https://www.theguardian.com/uk"],
  "htmlDocuments": [{ "name": "invoice-42", "html": "<h1>Invoice #42</h1><p>Total: €49</p>" }],
  "formats": ["png", "pdf"],
  "device": "desktop-1440",
  "fullPage": true,
  "dismissCookieBanners": true
}
```

#### Call it from the API

```bash
curl -X POST "https://api.apify.com/v2/acts/jordydev~screenshot-pdf/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com"],"formats":["png","pdf"],"device":"mobile-iphone-15"}'
```

### Example output

Real runs on 27 Oct 2026:

| target | format | device | size (px) | file size | cookie banner |
|---|---|---|---|---|---|
| https://www.theguardian.com/uk | png | desktop-1440 | 1440 × 16000 (cut) | 11.2 MB | clicked |
| https://www.nu.nl/ | png | desktop-1440 | 1440 × 10773 | 1.9 MB | clicked |
| https://www.python.org/ | png | desktop-1440 | 1440 × 2608 | 481 KB | none |
| https://www.wikipedia.org/ | jpeg | mobile-iphone-15 | 1179 × 1977 | 266 KB | none |
| html:invoice-demo | pdf | desktop-1440 | – | 19 KB | skipped |

One row as JSON:

```json
{
  "tool": "screenshot-pdf",
  "target": "https://www.theguardian.com/uk",
  "status": "ok",
  "format": "png",
  "finalUrl": "https://www.theguardian.com/uk",
  "httpStatus": 200,
  "title": "Latest news, sport and opinion from the Guardian",
  "device": "desktop-1440",
  "widthPx": 1440,
  "heightPx": 16000,
  "truncated": true,
  "bytes": 11245919,
  "fileKey": "png-www.theguardian.com-uk.png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/png-www.theguardian.com-uk.png",
  "cookieBanner": "clicked",
  "cookieBannerVia": "selector:button.sp_choice_type_11",
  "warnings": ["Page is taller than 16,000 px; the image was cut at 16,000 px."]
}
```

Failed pages return a row with `status: "error"` and an `errorCode` (`INVALID_URL`, `BLOCKED_PRIVATE_ADDRESS`, `NAVIGATION_FAILED`…) and are **not charged**.

### How much does it cost?

Pay per event: you only pay per file produced, not for Apify compute.

| Event | Price | When it's charged |
|---|---|---|
| File | **$0.003** ($3 per 1,000 files) | One PNG, JPEG or PDF file produced |
| Actor start | $0.00005 | Apify's standard fee per run start (per GB of memory) |

Examples: 100 URLs as PNG ≈ **$0.30**; 100 URLs as PNG + PDF ≈ **$0.60**; 1,000 HTML invoices to PDF ≈ **$3.00**.

**Free**: errors and invalid input. You can set a maximum cost per run; the Actor stops cleanly when it is reached.

### FAQ

**Why is a cookie banner sometimes still visible?**
Banners differ by site and visitor country. The Actor clicks known "Accept" buttons and falls back to hiding banner containers; check `cookieBanner` in each row and use `hideSelectors` for anything left over.

**Can I screenshot pages behind a login?**
Not in this version. Public pages only.

**Is the PDF a real print?**
Yes: Chrome's print engine with print CSS, so text stays selectable. For a pixel-exact copy of the screen, use PNG.

**What about very long pages?**
Full-page images are cut at 16,000 px and marked `truncated: true`. PDFs have no such limit.

**Is it legal? Does it respect robots.txt?**
It loads each URL once, like a normal browser visit, and refuses private, internal and cloud-metadata addresses. You are responsible for capturing only pages you are allowed to and for how you use the images (copyright, site terms). This is not legal advice.

**How do I download the files?**
Every row has a `fileUrl`. All files are also in the run's key-value store (Storage tab), under `png-`, `jpeg-` and `pdf-` keys.

### Related Actors

More tools by the same developer, all pay-per-event with the same clean output style:

- [EU Jobs Search (Workday, Greenhouse, Lever & Teamtailor)](https://apify.com/jordydev/eu-job-search): search live jobs from 6,500+ European employers' career sites by keyword and country, no company list needed.
- [Greenhouse & Lever Jobs Scraper (ATS Job Feed)](https://apify.com/jordydev/ats-job-feed): every open job from your own list of companies on Greenhouse, Lever, Ashby, Workable, Recruitee and Personio.
- [Bulk PageSpeed Insights & Core Web Vitals Checker](https://apify.com/jordydev/pagespeed-bulk-audit): Lighthouse scores, LCP/CLS/INP and top fixes for hundreds of URLs, with CSV and PDF report.
- [Broken Link Checker & SEO Site Audit (Site QA Crawler)](https://apify.com/jordydev/site-qa-crawler): broken links, redirects, SEO basics, WCAG accessibility and SSL expiry in one crawl, with a fix list and PDF.

***

Related searches: website screenshot API, full page screenshot, bulk URL to PNG, URL to PDF, HTML to PDF API, webpage to PDF converter, mobile screenshot tool, screenshot without cookie banner, website archiving, visual monitoring.

# Actor input Schema

## `urls` (type: `array`):

Pages to capture. "example.com" becomes https://example.com/. Private/internal addresses are refused.

## `htmlDocuments` (type: `array`):

Optional. Render your own HTML (invoices, reports, emails) to PNG/JPEG/PDF. Each entry: {"name": "invoice-42", "html": "<h1>Hello</h1>"}. External images/CSS on public URLs load normally.

## `formats` (type: `array`):

One file (and one billed capture) per source and format.

## `fullPage` (type: `boolean`):

Capture the whole scrollable page (images). Off = only the visible viewport. Very long pages are cut at 16,000 px.

## `device` (type: `string`):

Viewport, pixel ratio, touch and user agent. Mobile presets come from Playwright's device list.

## `viewportWidth` (type: `integer`):

Optional override of the preset width.

## `viewportHeight` (type: `integer`):

Optional override of the preset height.

## `waitUntil` (type: `string`):

Page-load event to wait for. "networkidle" is slower but catches late content.

## `waitForSelector` (type: `string`):

Optional CSS selector that must be visible before capture, e.g. "#main" or ".chart canvas".

## `waitForSelectorTimeoutSecs` (type: `integer`):

If the selector does not appear in time, the page is captured anyway and a warning is added.

## `delayMs` (type: `integer`):

Wait this long after loading (animations, fonts).

## `scrollToBottom` (type: `boolean`):

For full-page captures, scroll through the page first so lazy-loaded images appear.

## `dismissCookieBanners` (type: `boolean`):

Click "Accept" on common consent banners (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, Google, …) or hide them if no button is found.

## `hideSelectors` (type: `array`):

CSS selectors to hide before capture (chat widgets, popups).

## `jpegQuality` (type: `integer`):

1–100.

## `pdfFormat` (type: `string`):

Paper size for PDF output.

## `pdfLandscape` (type: `boolean`):

Landscape orientation for PDFs.

## `printBackground` (type: `boolean`):

Include background colours and images in PDFs.

## `timeoutSecs` (type: `integer`):

Maximum time to load each page.

## `maxConcurrency` (type: `integer`):

Pages captured at the same time.

## `maxItems` (type: `integer`):

Safety cap on URLs + HTML documents per run.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://www.wikipedia.org"
  ],
  "htmlDocuments": [],
  "formats": [
    "png"
  ],
  "fullPage": true,
  "device": "desktop-1440",
  "waitUntil": "load",
  "waitForSelector": "",
  "waitForSelectorTimeoutSecs": 15,
  "delayMs": 500,
  "scrollToBottom": true,
  "dismissCookieBanners": true,
  "hideSelectors": [],
  "jpegQuality": 80,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "printBackground": true,
  "timeoutSecs": 45,
  "maxConcurrency": 3,
  "maxItems": 500
}
```

# Actor output Schema

## `files` (type: `string`):

No description

## `store` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://example.com",
        "https://www.wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jordydev/screenshot-pdf").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [
        "https://example.com",
        "https://www.wikipedia.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("jordydev/screenshot-pdf").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://example.com",
    "https://www.wikipedia.org"
  ]
}' |
apify call jordydev/screenshot-pdf --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jordydev/screenshot-pdf"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/e9Qc3yGAwVtvklDl6/builds/PB7LLBfKMelLGBl5G/openapi.json
