# Website Screenshot & PDF API · Bulk, Full-Page, Diff (`bibian/website-screenshot-pdf-api`) Actor

Website screenshots and PDFs: bulk capture of any URL list with change detection

- **URL**: https://apify.com/bibian/website-screenshot-pdf-api.md
- **Developed by:** [Vivien MORVAN](https://apify.com/bibian) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 92.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.96 / 1,000 captures

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 & PDF API · Bulk + Diff

A website screenshot API built for lists, not single pages: feed it up to 1,000 URLs and get a full page screenshot or a URL to PDF for every one of them in a single run, with bulk screenshots, 5 devices, dark mode, cookie-banner removal and built-in change detection to monitor website changes between runs — all in one dataset, no scripting required.

### At a glance

| | |
|---|---|
| **What you get** | One dataset row per URL: a PNG/JPEG/WebP screenshot or a PDF, its public image URL, dimensions or page count, load time, content hash and a perceptual hash used to flag pages that changed since your last run. |
| **Price** | $1.20 per 1,000 captures, screenshot or PDF: a 50-page test run costs about $0.06, start fee included. |
| **Speed** | 4 pages captured in parallel; a 50-URL run finishes in about a minute. |
| **Try it** | Click **Try for free**: the form is already filled with 3 real URLs. |
| **Keep it fresh** | Tick **Only changed pages** and schedule it daily: each run then delivers (and charges for) only the pages whose render actually changed. See "Monitor website changes daily" below. |

### What you can do with it

- **Monitor website changes**: schedule it daily with `onlyChanged: true` and get only the pages that actually changed, with a perceptual-hash diff percentage, not a single screenshot buried in a key-value store.
- **Bulk screenshot a whole site or a client list**: hundreds of URLs in one dataset, one row each, instead of one run per page.
- **Archive pages as PDF**: URL to PDF for documentation, legal evidence, or an offline copy of a page as it looked on a given date.
- **QA across devices**: capture the same URL list on desktop, laptop, tablet, mobile and Android in separate runs to compare layouts.
- **Build a visual changelog**: `contentHash` and `perceptualHash` on every row let you diff a page against any earlier run yourself, even without `onlyChanged`.

### Input

| Field | What it does |
|---|---|
| URLs | Up to 1,000 URLs, one capture each. `localhost`, private network addresses and non-http(s) schemes are rejected per URL (the rest of the list still runs). |
| Format | `png` (default), `jpeg`, `webp` or `pdf`, for the whole run. |
| Quality | 1-100, for JPEG/WebP only. |
| Full page | Capture the whole scrollable page, not just the viewport (default on). |
| Selector | Capture a single element instead of the full page or viewport. |
| Device | `desktop` (1440×900), `laptop` (1280×800), `tablet` (iPad), `mobile` (iPhone 15), `android` (Pixel 8) or `custom`. |
| Dark mode | Emulates `prefers-color-scheme: dark` before capturing. |
| Hide cookie banners | CSS-only hiding of OneTrust, Didomi, Cookiebot, Quantcast, Axeptio and similar banners. Never clicks accept/reject. |
| Block ads & trackers | Blocks common ad/tracking domains while the page loads. |
| Scroll to bottom | Scrolls down first so lazy-loaded images appear in full-page captures. |
| Wait for selector / Extra delay | Extra waiting for pages that render late. |
| Timeout per page | Up to 60 seconds. |
| Custom user agent / extra headers | Overrides sent with every request. Never put a session cookie here. |
| Only changed pages | Deliver and charge only for pages that changed since the previous run of this same search (same URL list and options). |
| Maximum number of URLs | The run stops after this many URLs from the list, in order. |

### Ready-to-use inputs

A 100-URL batch captured on one device, full page, default PNG:

```json
{
  "urls": ["https://example.com", "https://your-site.com/page-1", "https://your-site.com/page-2"],
  "format": "png",
  "device": "desktop",
  "fullPage": true,
  "maxItems": 100
}
```

Daily change monitoring — schedule this with Apify Schedules; after the first run, only the URLs that actually changed are delivered and charged:

```json
{
  "urls": ["https://your-site.com", "https://your-site.com/pricing"],
  "onlyChanged": true,
  "maxItems": 50
}
```

Mobile PDF export:

```json
{
  "urls": ["https://your-site.com/terms", "https://your-site.com/privacy"],
  "format": "pdf",
  "device": "mobile"
}
```

### Output

One record per URL:

```json
{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "httpStatus": 200,
  "title": "Example Domain",
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/screenshot-001.png",
  "format": "png",
  "width": 1440,
  "height": 900,
  "pages": null,
  "bytes": 38162,
  "fullPage": true,
  "device": "desktop",
  "loadMs": 1230,
  "capturedAt": "2026-11-09T22:00:00.000Z",
  "contentHash": "e58a3877...",
  "perceptualHash": "00000000...",
  "changedSincePrevious": null,
  "diffPercent": null,
  "error": null
}
```

| Field | What it is |
|---|---|
| `url` / `finalUrl` | Requested URL and the URL actually reached, after redirects. |
| `httpStatus` / `title` | Response status and page `<title>`. |
| `imageUrl` | Public URL of the screenshot or PDF, readable directly with no Apify token. |
| `format`, `width`/`height` (images) or `pages` (PDF), `bytes` | Output shape and size. |
| `fullPage`, `device` | The settings this capture used. |
| `loadMs`, `capturedAt` | How long the page took and when it was captured. |
| `contentHash` | sha256 of the exact bytes behind `imageUrl`, for your own exact-match diffing. |
| `perceptualHash` | 256-bit perceptual hash (dHash) of the rendered page; `null` for PDF. |
| `changedSincePrevious` / `diffPercent` | Set only when **Only changed pages** is ticked: whether this page's render differs from the previous run of the same search, and by how much. `null` on the first run of a search, and whenever Only changed pages is off. |
| `error` | `null` on success, a short reason otherwise (timeout, DNS failure, or an HTTP error status such as `HTTP 404`/`HTTP 500`). An error row has no image and is never charged. |

Export the dataset as JSON, CSV or Excel, or read it through the Apify API.

### Why this one

- **Built for lists, not single pages.** The Store's free leader captures one URL per run into a key-value store; this Actor turns a list of up to 1,000 URLs into one dataset, one row per page, in a single run.
- **Change detection is built in, not bolted on.** `onlyChanged` compares a perceptual hash against the previous run of the same search and delivers (and charges for) only what actually changed — exactly the "monitor web changes" use case the free leader names but does not implement.
- **PDF and 5 devices in the same Actor.** Desktop, laptop, tablet, mobile, Android or a custom size, screenshot or PDF, same input shape.
- **Cookie banners hidden by CSS only.** No click ever simulates a visitor's consent choice; the banner is simply hidden before the capture.
- **A failed page never costs you anything.** A timeout, a DNS failure or a page that answers 4xx/5xx produces an `error` row and is not charged; the run still succeeds as long as at least one page was captured.

### Good to know

- `format` applies to the whole run; mix formats by running the Actor twice with the same URL list.
- PDF page count is read from the generated PDF's own structure; it is accurate for the PDFs this Actor produces, not a general-purpose PDF parser.
- WebP is produced by re-encoding the PNG capture through the browser's own canvas (Playwright has no native WebP screenshot mode); very tall full-page captures can hit the canvas's own size limit on some pages.
- No proxy and no site-specific bypass: this Actor renders pages like a real visitor's browser, it does not fight anti-bot protections. A page that blocks ordinary visits will also show up here as a failed capture.
- `onlyChanged` memory is per Actor and per search (URL list + options, not `maxItems`), kept in a key-value store named `only-new-memory-bibian-<this Actor's ID>` in your own account.

### Who uses it

- **Agencies and freelancers** who need a visual snapshot of a client's site, or every page of a site, in one batch instead of one-by-one.
- **Legal and compliance teams** archiving a page's exact appearance (terms, pricing, disclosures) as a PDF with a timestamp.
- **Marketing and competitive intelligence** watching competitor landing pages and pricing pages for changes, without reading every screenshot by hand.
- **QA and design teams** comparing the same page across desktop, tablet and mobile in one run.

### Pricing

Pay per result: **$1.20 per 1,000 captures**, screenshot or PDF alike, plus a small start fee per run with the default 2 GB of memory. You only pay for the pages you receive — a failed capture or a page skipped by **Only changed pages** is never charged. Store discounts apply automatically on paid Apify plans: up to 20% off every event on the higher tiers.

### Run it from your code

JavaScript:

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('bibian/website-screenshot-pdf-api').call({
  urls: ['https://example.com', 'https://apify.com'],
  format: 'png',
  maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient(token="<APIFY_TOKEN>")
run = client.actor("bibian/website-screenshot-pdf-api").call(run_input={
    "urls": ["https://example.com", "https://apify.com"],
    "format": "png",
    "maxItems": 100
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

### Monitor website changes daily and connect your tools

1. **Schedule it.** Save a task with `onlyChanged: true` on the URL list you care about, and schedule it daily with Apify Schedules. The first run always delivers everything and builds the baseline; every run after that delivers, and charges for, only the pages that changed.
2. **Push the results where you work.** Add an Apify integration or a webhook to the task: Google Sheets, Slack, Make, Zapier, n8n or your own endpoint, triggered at the end of every run.
3. **Call it from your stack.** The API and the JavaScript and Python clients return the dataset as JSON, CSV or Excel; `imageUrl` is a plain public URL you can embed or download directly, no token needed.
4. **Let an AI agent use it.** Through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp), assistants such as Claude or ChatGPT can search the Store, read this page and run the Actor as a tool to screenshot or PDF a page on demand.

### Frequently asked questions

**Do I need an account or login for the pages I capture?** No, and this Actor never uses one: it renders only publicly reachable pages, with no session cookie.

**Which formats can I export the dataset as?** JSON, CSV, Excel, XML, HTML table or RSS, from the dataset page or through the API; the captures themselves are PNG, JPEG, WebP or PDF files behind `imageUrl`.

**Does it work on pages behind a login or a captcha?** No. This Actor renders pages exactly as an ordinary visitor's browser would; it does not attempt to bypass a login wall, a CAPTCHA or an anti-bot challenge.

**What happens if one URL in my list is down?** That row gets an `error` and is not charged; every other URL in the same run is captured normally and the run still succeeds.

**Need a custom version built for you?** I also build private versions and custom integrations: direct delivery to Google Sheets, a database or a webhook, extra formats, or a specific device size. Open an issue in the Issues tab with what you need, and I will reply there with a quote.

**Something does not work?** Open an issue in the Issues tab. Every public Actor is test-run daily and the broken ones are repaired.

**Did this save you time?** A short review on the Store page helps other people find the Actor, and tells me what to improve next.

# Actor input Schema

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

Up to 1000 URLs to capture, one screenshot or PDF per URL. localhost, private network addresses and non-http(s) schemes are rejected.

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

Output file format for every URL in this run.

## `quality` (type: `integer`):

Image quality 1-100 for JPEG and WebP. Ignored for PNG and PDF.

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

Capture the entire scrollable page instead of only the visible viewport.

## `selector` (type: `string`):

CSS selector of a single element to capture instead of the full page or viewport, for example "#main" or ".hero".

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

Viewport and user agent to emulate.

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

Viewport width in pixels. Only used when Device is "Custom".

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

Viewport height in pixels. Only used when Device is "Custom".

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

Pixel density: 1 for normal, 2 for a sharper (retina) but heavier image.

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

Emulate the "prefers-color-scheme: dark" setting before capturing.

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

Inject a CSS rule that hides the usual cookie-consent banners (OneTrust, Didomi, Cookiebot, Quantcast, Axeptio and similar) before capturing. Never clicks or accepts a consent choice.

## `blockAds` (type: `boolean`):

Block common advertising and tracking domains while loading the page, for a cleaner and faster capture.

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

Scroll the page to the bottom before capturing, so lazy-loaded images appear in a full-page screenshot.

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

CSS selector to wait for before capturing, for pages that render their main content after load.

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

Extra wait time in milliseconds right before capturing, on top of any Wait for selector.

## `timeoutMs` (type: `integer`):

Maximum time allowed for one page to load and capture.

## `userAgent` (type: `string`):

Overrides the user agent that the selected Device would otherwise send.

## `extraHeaders` (type: `object`):

Extra HTTP headers sent with every request, as a JSON object of header name to value. Never put a session cookie here.

## `onlyChanged` (type: `boolean`):

For scheduled runs. Deliver (and charge for) only the URLs whose rendered page changed since the previous run of this same search, using a perceptual hash. The first run of a search always delivers everything; the memory is kept in a key-value store of your account named "only-new-memory-bibian-" followed by the ID of this Actor.

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

The run stops after this many URLs from the list above, in order.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://fr.wikipedia.org/wiki/Capture_d%27%C3%A9cran",
    "https://news.ycombinator.com"
  ],
  "format": "png",
  "quality": 85,
  "fullPage": true,
  "device": "desktop",
  "width": 1440,
  "height": 900,
  "deviceScaleFactor": 1,
  "darkMode": false,
  "hideCookieBanners": true,
  "blockAds": true,
  "scrollToBottom": true,
  "delayMs": 0,
  "timeoutMs": 30000,
  "onlyChanged": false,
  "maxItems": 50
}
```

# Actor output Schema

## `captures` (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://apify.com",
        "https://fr.wikipedia.org/wiki/Capture_d%27%C3%A9cran",
        "https://news.ycombinator.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bibian/website-screenshot-pdf-api").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://apify.com",
        "https://fr.wikipedia.org/wiki/Capture_d%27%C3%A9cran",
        "https://news.ycombinator.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bibian/website-screenshot-pdf-api").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://apify.com",
    "https://fr.wikipedia.org/wiki/Capture_d%27%C3%A9cran",
    "https://news.ycombinator.com"
  ]
}' |
apify call bibian/website-screenshot-pdf-api --silent --output-dataset

```

## MCP server setup

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

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/ieIXZXeBBktG7Kf3Q/builds/PesO914mNYdDF5Z42/openapi.json
