# Website Screenshot & URL to PDF API — Bulk (`olliolli/website-screenshot-pdf`) Actor

Take full-page website screenshots in PNG, JPEG or WebP. Convert URLs to PDF, merge PDFs and monitor visual changes. Batch public URLs from lists, Apify datasets or sitemaps.

- **URL**: https://apify.com/olliolli/website-screenshot-pdf.md
- **Developed by:** [Tom J](https://apify.com/olliolli) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 screenshots

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 & URL to PDF API** takes full-page website screenshots and converts public web pages to PDF in bulk. Capture PNG, JPEG or WebP images, merge PDFs into one bookmarked document, and monitor visual website changes across runs.

Run from Apify Console without writing code, or integrate with the Python and JavaScript API examples below. Import URLs from a list, an Apify dataset or an XML sitemap. No target-website API key is required; API integrations use your Apify token.

### Website screenshot, PDF conversion and monitoring features

- Capture PNG, JPEG or WebP screenshots with desktop, mobile and retina profiles.
- Print URLs to A4, Letter or Legal PDFs with margins, print CSS, backgrounds and optional URL/date/page-number headers.
- Combine successful PDF captures into one bookmarked document.
- Turn another Actor's URL dataset or a sitemap into a capture batch.
- Compare each page with its previous successful capture and get a percentage and red-overlay diff image.
- Hide common cookie banners without clicking acceptance buttons. Explicit cookie acceptance is optional and off by default.

### Use cases for bulk website capture

| Your goal | What to use |
|---|---|
| Review landing pages on desktop and mobile | PNG, JPEG or WebP screenshots with device profiles. |
| Save public documentation or research pages | URL-to-PDF conversion with A4, Letter or Legal output. |
| Assemble a multi-page research pack | Batch PDF conversion and one merged PDF with URL bookmarks. |
| Check public pricing or product pages for visual changes | A named monitor baseline, change percentage and diff image. |
| Capture pages found by another Actor | Dataset URL import; no manual copy-and-paste of each URL. |

### How to take website screenshots and convert URLs to PDF

1. Add public URLs, or select a dataset and its URL field. The default example uses three simple public pages.
2. Choose screenshot, PDF or both. Turn on monitoring and choose a unique monitor name if you want comparisons across runs.
3. Run the Actor. Open the Captures table for signed file links; OUTPUT contains the merged PDF link, status counts and billing diagnostics.

```json
{
  "urls": ["https://example.com", "https://example.org"],
  "output": "both",
  "pdfFormat": "A4",
  "pdfMargins": {"top": 10, "right": 10, "bottom": 10, "left": 10},
  "mergePdf": true,
  "hideCookieBanners": true,
  "monitor": true,
  "monitorName": "my-public-pages",
  "changeThreshold": 2
}
```

### Ready-to-use capture examples

#### Bulk URL to PDF converter with merged output

Create individual PDFs and a combined document with a bookmark for each successful URL:

```json
{"urls":["https://example.com","https://example.org"],"output":"pdf","pdfFormat":"A4","mergePdf":true}
```

#### Mobile website screenshot in WebP

Capture the visible mobile viewport. Set `fullPage` to `true` for a longer image within the documented limits:

```json
{"urls":["https://example.com"],"output":"screenshot","device":"mobile","format":"webp","fullPage":false}
```

#### Website change monitoring across scheduled runs

Reuse this monitor name on later runs. The first capture establishes the baseline; later captures return `changed`, `changePercent` and a diff image when available:

```json
{"urls":["https://example.com"],"output":"screenshot","monitor":true,"monitorName":"public-page-watch","changeThreshold":2}
```

### Screenshot and PDF input options

| Field | Default | Purpose |
|---|---|---|
| `urls` | — | Up to 1,000 public HTTP(S) URLs. Exact duplicate URLs are removed. |
| `datasetId`, `urlField` | —, `url` | Select an Apify dataset for read access. Dot paths and arrays of URLs are supported. |
| `sitemapUrl` | — | XML sitemap or sitemap index. Scan up to 20 sitemap documents, 5 MB each. |
| `output`, `format` | `screenshot`, `png` | `screenshot`/`pdf`/`both`; screenshots in `png`/`jpeg`/`webp`. |
| `fullPage` | `true` | Capture full height within the safety limits below. |
| `device` | `desktop` | `desktop`, `laptop`, `tablet`, `mobile`, `iphone-13`, `pixel-7`, `ipad-pro`, `macbook-13`. Chromium emulation, not a physical device. |
| `width`, `height`, `deviceScaleFactor` | profile | Optional viewport overrides; width 240–3,840, height 240–2,160, scale 1–3. |
| `pdfFormat`, `pdfMargins` | `A4`, 10 mm | A4/Letter/Legal and four margins of 0–50 mm. |
| `pdfPrintBackground`, `pdfHeaderFooter` | `true`, `false` | Print backgrounds; optional URL, UTC date and page numbers. |
| `mergePdf` | `false` | Merge successful PDFs with URL bookmarks. Requires PDF or both output. |
| `waitUntil` | `load` | `load`, `domcontentloaded` or `networkidle`; continuously active pages may time out with networkidle. |
| `loadFallback`, `scrollToLoad` | `true`, `true` | Recover a stalled load event using DOM plus bounded asset checks; scroll within the screenshot height cap to trigger lazy content. |
| `waitForSelector`, `delayMs` | —, 0 | Wait for a CSS selector, then optionally delay up to 10 seconds. |
| `hideCookieBanners`, `acceptCookies` | `true`, `false` | Hide original known CMP selectors; acceptance needs explicit opt-in. |
| `hideSelectors`, `darkMode` | `[]`, `false` | Hide your own widgets; request dark colour scheme. |
| `monitor`, `monitorName` | `false`, — | Persist a visual baseline in a named key-value store. A name or selected store is required. |
| `monitorStoreId` | — | Optional selected key-value store with READ and WRITE permissions. |
| `changeThreshold` | 2 | A change is flagged when the changed-pixel percentage is greater than this threshold. |
| `maxUrls`, `timeoutPerUrlSecs`, `maxConcurrency` | 100, 45, 3 | Maximum 1,000 URLs, 120 seconds per URL and three parallel pages. Memory safety caps actual parallelism: one page at 1–2 GB, up to three at 4 GB. |
| `proxyConfiguration` | direct | Optional Apify or public HTTP proxy. No automatic proxy escalation or IP rotation. |

### Download screenshots, PDFs and change results

One dataset row per attempted URL includes `url`, `finalUrl`, `status`, `httpStatus`, `title`, `width`, `height`, `bytes`, `tookMs`, `capturedAt`, `truncatedHeight` and `files.screenshot`/`files.pdf`.

Statuses are `ok`, `partial` (screenshot height limited), `timeout`, `http_error`, `blocked`, `invalid_url` and `failed`. File links are generated by the Apify SDK for the run's key-value store and include signatures when required. Share them only with intended recipients; they grant access to those files.

Monitoring adds `changePercent`, `changed`, `previousCapturedAt` and `diffImage`. The first capture has `changed: null`. OUTPUT includes counts, charged events, unprocessed URLs, stopping reasons, connection attempts, recovery events, revision and the merged PDF link/status. Inspect these fields rather than relying only on the run's green status. `billingEnabled` distinguishes real pay-per-event runs from private unmonetized tests. `connectionAttempts` counts browser/proxy sessions, not individual page requests. A failed row includes the processing `phase`. Each capture includes `readiness`, `warnings` and `recoveryEvents` where applicable; OUTPUT reports `effectiveConcurrency`. Source image/font errors are reported as `source_has_broken_images` or `source_has_broken_fonts`; images still pending at the asset deadline cause a free failure.

### How much does Website Screenshot & PDF cost?

Pay-per-event pricing is configured as follows. The active Apify pricing table is authoritative.

| Event | Price (USD) |
|---|---:|
| Delivered screenshot | $0.002 |
| Delivered PDF | $0.003 |
| Delivered merged PDF, once per run | $0.01 |
| Completed visual comparison against a previous capture | $0.003 |
| Standard Actor start, per allocated GB rounded up | $0.00005 |

At the default 2 GB, 100 screenshots cost $0.20010; 100 PDFs plus one merged PDF cost $0.31010. A repeat monitor run with 100 screenshots and 100 comparisons costs $0.50010. An initial monitoring run has no comparison charge. Both output charges one screenshot and one PDF per successful URL.

The Actor stores the delivered result before charging its event. It checks the combined capture/comparison price before starting work and stops when the charge limit is reached. Up to three budget-reserved pages can already be in progress. Dataset delivery, charging and baseline persistence are separate operations, not a cross-service transaction. Avoid resurrecting a run after an uncertain storage or billing failure; inspect OUTPUT first.

#### What you are not charged for

No capture/comparison events for `timeout`, `http_error`, `blocked`, `invalid_url` or `failed`. Failure rows are free. No comparison event for the first baseline, and no merge event when a merged file cannot be delivered. A height-limited `partial` screenshot is delivered and charged. The standard start event still applies on failed runs. There must be no automatic `apify-default-dataset-item` event in addition to the explicit events. Custom proxy/provider charges and your own Actor development runs may incur separate platform usage.

### Schedule visual website change monitoring

Create an Apify task with a stable `monitorName`, then schedule it. Do not overlap runs that share a monitor store/name. Use run-finished webhooks to send downstream workflows the dataset ID, then filter rows where `changed` is true. This Actor does not send email or chat messages itself.

Monitoring stores an 800-pixel-wide thumbnail and hash per URL and capture configuration. Grayscale pixel differences of at most 16/255 are treated as noise. Added or removed page area counts as change. This detects visual differences, not semantic changes: clocks, advertisements, fonts and layout shifts can trigger a change. Animations/transitions are disabled, but full determinism is not guaranteed. A changed capture setting establishes a separate baseline. Failed captures preserve the previous baseline.

### Website screenshot and URL-to-PDF API: Python and JavaScript

Use your Apify API token for the Apify platform; no API key is needed for the target website.

Python:

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("olliolli/website-screenshot-pdf").call(run_input={
    "urls": ["https://example.com"], "output": "both"
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["status"], row["files"])
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('olliolli/website-screenshot-pdf').call({
  urls: ['https://example.com'], output: 'both'
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### MCP

Once the Actor is available to your account, add it through Apify's MCP server to an MCP-compatible client. Pass the same input fields and use the returned dataset/file links. MCP does not bypass website restrictions or Apify resource permissions.

### Good to know

- This uses Chromium. Device profiles emulate viewport, scale and mobile behaviour, not Safari or the hardware itself.
- Screenshot height is capped at 16,383 physical output pixels and 40 million pixels total. It can be shorter on wide retina profiles; `truncatedHeight` records this. Horizontal content beyond the selected viewport is not stitched.
- At the default 2 GB allocation, memory safety automatically processes one page at a time. Raise Actor memory to 4 GB to permit up to three concurrent pages. `maxConcurrency` is an upper bound, not a promise; heavier pages may require more time.
- The default load strategy first requests `load`. If it stalls, `loadFallback` permits DOM readiness only after separate font and image checks. Capture work, including DNS, stays within the original per-URL deadline (browser cleanup may add up to five seconds) and is reported in `recoveryEvents`. Set `loadFallback: false` for strict load-event semantics. Dynamic apps may still need `waitForSelector` for their specific content.
- Screenshots capture a bounded rectangle without resizing the page viewport. Images above 8,192 output pixels in height use scroll-and-stitch to avoid oversized browser surfaces; small fixed/sticky elements visible in the first viewport are hidden in later segments to prevent repetition. Dynamic or custom sticky layouts may still need a specific hide selector. Native lazy images are requested eagerly and bounded scrolling triggers common lazy loaders. CSS content-visibility is forced visible for capture. Infinite feeds, interaction-only content, video and custom scroll containers are not automatically expanded.
- PDFs use print CSS and can look different from screenshots. A source site’s fixed banners can repeat or obscure content in print; use `hideSelectors` for permitted widgets or select a print-friendly source page. No login, paywall or bot-challenge bypass is performed. A detected block is returned without a capture event.
- Only HTTP(S) on ports 80/443 is supported. Credentials in URLs, internal IPs, local networks and non-public DNS answers are rejected. Every browser connection goes through a DNS-pinned public-address gateway, including redirects and subresources. WebSockets, service workers and media requests are disabled.
- Individual output files are capped at 30 MB; merging is skipped without a merge fee if the source PDFs exceed 50 MB combined; exceptionally long PDF pages are refused. Use lower concurrency for resource-heavy sites. Scrolling is bounded by the output height cap; lazy content beyond that cap or requiring interaction is not guaranteed in PDFs.
- XML sitemaps are supported; compressed `.xml.gz` files are not currently supported. Dataset source scanning is capped at 10,000 rows.
- No CAPTCHA solving, imported cookies, login, fingerprint evasion or unlimited IP switching. Each URL uses a fresh isolated browser context.

### Privacy

Only capture pages you are authorised to process. Screenshots/PDFs reproduce the visible page, so do not submit pages containing private information or personal profiles. The Actor does not extract recruiter names, email addresses or telephone numbers into structured fields. It cannot guarantee automatic removal of personal information from arbitrary page pixels or PDF content. No page text, cookies, headers, proxy credentials or raw exception fragments are logged. Files remain in your Apify storage; monitoring thumbnails persist until you remove the monitor store. Dataset output includes the URLs you submit, so do not include secrets in query strings.

### Frequently asked questions

#### How do I take full-page website screenshots in bulk?

Add your URLs and select `output: screenshot` with `fullPage: true`. Choose PNG, JPEG or WebP. Each attempted URL returns its own status; successful captures include a download link. Long pages can be height-limited, as described below.

#### Can I convert a website to PDF using an API?

Yes. Use the Python or JavaScript example above with `output: pdf`. Set `mergePdf: true` to combine successful PDFs. PDF output follows the website's print stylesheet; it can differ from its screenshot.

#### Can I generate PDFs without screenshots?

Yes. Set `output` to `pdf`. Monitoring still takes an internal image for comparison, but no screenshot event is charged unless a screenshot is delivered.

#### Does hiding a cookie banner accept cookies?

No. Original selectors hide known CMP elements. `acceptCookies: true` explicitly permits clicking a supported CMP acceptance button. It never authorises a login or challenge.

#### Why is a long screenshot marked partial?

Its height exceeded the output-pixel safety limit. The truncated image is delivered and charged; PDF print layout is independent of that crop.

#### Does the first monitoring run report every page as changed?

No. It creates the baseline with `changed: null` and no comparison event. Later successful captures compare with the last successful baseline.

#### Can I import URLs from another Actor?

Yes. Select its dataset and specify `urlField`, including a dotted path to a nested field. The input resource picker grants the required read permission.

#### Are blocked pages or timeouts billed?

No capture/comparison event is charged. A standard Actor start event can still apply. Error rows describe the category; protected content is not bypassed.

#### Is this a legal archive or an uptime guarantee?

No. It is a screening/research aid, not a certified archive or legal proof. Source behaviour, content and network availability can change.

### Disclaimer

Independent tool, not affiliated with the websites captured or their operators. Respect the source website's terms and your rights to process its content. This is a screening/research aid; review important results yourself.

### Need help?

Open an Apify issue with the run ID, input settings without secrets, expected output and the safe status from OUTPUT. Do not post cookies, tokens or private screenshots.

# Actor input Schema

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

Public HTTP(S) pages to capture. No authentication, internal addresses or credential-bearing URLs.

## `datasetId` (type: `string`):

Select a resource to grant access. Monitor store is optional when a named store is available.

## `monitorStoreId` (type: `string`):

Select a resource to grant access. Monitor store is optional when a named store is available.

## `urlField` (type: `string`):

Dataset field containing a URL or list; dot paths supported.

## `sitemapUrl` (type: `string`):

Public XML sitemap or sitemap index; at most 20 sitemap documents, 5 MB each.

## `monitorName` (type: `string`):

Separate baseline name: 1–40 letters, digits or hyphens. Do not overlap runs with the same name.

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

Optional CSS selector to wait for before capture.

## `output` (type: `string`):

Choose output.

## `format` (type: `string`):

Choose format.

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

Choose device.

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

Choose pdfFormat.

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

Choose waitUntil.

## `loadFallback` (type: `boolean`):

If the load event stalls, use DOM readiness only after checking fonts and images, within the original deadline.

## `scrollToLoad` (type: `boolean`):

Bounded scrolling to trigger lazy content before capture.

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

Capture page height up to 16,383 output pixels; longer output is partial.

## `pdfPrintBackground` (type: `boolean`):

Print background colours and images.

## `pdfHeaderFooter` (type: `boolean`):

Print URL, date and page numbers.

## `mergePdf` (type: `boolean`):

Combine successful PDFs into merged.pdf with a bookmark per URL.

## `hideCookieBanners` (type: `boolean`):

Hide known cookie banners with original CSS rules; does not accept cookies.

## `acceptCookies` (type: `boolean`):

Explicitly allow clicking the known CMP accept button. Default off; no login or challenge clicking.

## `darkMode` (type: `boolean`):

Request a dark colour scheme.

## `monitor` (type: `boolean`):

Compare against the previous successful capture; first run establishes a free baseline comparison.

## `maxUrls` (type: `integer`):

Bounded maxUrls.

## `timeoutPerUrlSecs` (type: `integer`):

Bounded timeoutPerUrlSecs.

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

Bounded maxConcurrency.

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

Bounded delayMs.

## `width` (type: `integer`):

Bounded width.

## `height` (type: `integer`):

Bounded height.

## `deviceScaleFactor` (type: `integer`):

Bounded deviceScaleFactor.

## `changeThreshold` (type: `number`):

Changed when more than this percentage of thumbnail pixels differs beyond the noise threshold.

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

Optional CSS selectors for widgets you own; no paywall or login bypass.

## `pdfMargins` (type: `object`):

Margins in millimetres (top, right, bottom, left), each 0–50.

## `proxyConfiguration` (type: `object`):

Optional Apify or HTTP proxy. Direct by default. No automatic IP rotation.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://example.org",
    "https://example.net"
  ],
  "urlField": "url",
  "output": "screenshot",
  "format": "png",
  "device": "desktop",
  "pdfFormat": "A4",
  "waitUntil": "load",
  "loadFallback": true,
  "scrollToLoad": true,
  "fullPage": true,
  "pdfPrintBackground": true,
  "pdfHeaderFooter": false,
  "mergePdf": false,
  "hideCookieBanners": true,
  "acceptCookies": false,
  "darkMode": false,
  "monitor": false,
  "maxUrls": 100,
  "timeoutPerUrlSecs": 45,
  "maxConcurrency": 3,
  "delayMs": 0,
  "changeThreshold": 2,
  "pdfMargins": {
    "top": 10,
    "bottom": 10,
    "left": 10,
    "right": 10
  },
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `captures` (type: `string`):

No description

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

No description

## `files` (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://example.org",
        "https://example.net"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("olliolli/website-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://example.org",
        "https://example.net",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("olliolli/website-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://example.org",
    "https://example.net"
  ]
}' |
apify call olliolli/website-screenshot-pdf --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,olliolli/website-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/tFntWTbu2KM3ZB1Rq/builds/UBL18zwlfbW74FwM5/openapi.json
