# Website Screenshot & PDF Generator (`pushbuild/website-screenshot-pdf`) Actor

Turn any list of URLs into full-page screenshots (PNG/JPEG) or print-ready PDFs. Blocks cookie banners and ads, waits for lazy-loaded images, supports mobile devices and dark mode.

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

## Pricing

$20.00 / 1,000 page captureds

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 & PDF Generator

Turn any list of URLs into **full-page screenshots** (PNG or JPEG) or **print-ready PDFs**, at scale.

### Features

- **Full-page or viewport** captures, with lazy-loaded images scrolled into view first.
- **Cookie banners, consent popups, chat widgets and ad frames removed** automatically (OneTrust, Cookiebot, Didomi, Usercentrics, Sourcepoint, Quantcast, Intercom, HubSpot and more).
- **Device presets**: desktop (1920×1080), laptop, tablet and mobile (retina, touch, mobile user agent), or a custom viewport.
- **Dark mode** emulation.
- **Single-element capture** with a CSS selector, and **custom hide selectors**.
- **PDF output** with A4, Letter, Legal or A3 paper, landscape, and background graphics.
- **Parallel capture**: up to 16 pages at once.

### Output

Every file is saved to the run's key-value store. Each dataset item links to it:

```json
{
  "url": "https://www.bbc.com",
  "finalUrl": "https://www.bbc.com/",
  "status": 200,
  "title": "BBC Home - Breaking News, World News, US News, Sports, Business, Innovation, Climate, Culture, Travel, Video & Audio",
  "format": "jpeg",
  "key": "www-bbc-com-05e9df12.jpeg",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/…/records/www-bbc-com-05e9df12.jpeg",
  "bytes": 1787833,
  "width": 1920,
  "device": "desktop",
  "capturedAt": "2026-10-11T19:33:02+00:00",
  "error": null
}
```

Failed pages come back with an `error` message and are **not charged**.

### Use cases

Website monitoring and visual archiving, SEO and competitor snapshots, link previews and thumbnails, compliance records, invoice and report PDFs from HTML pages, and QA across devices.

# Actor input Schema

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

Pages to capture.

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

Image format, or pdf for a print-ready document.

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

Capture the whole scrollable page instead of just the viewport.

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

Viewport and user agent preset.

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

Overrides the device width.

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

Overrides the device height.

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

Emulate prefers-color-scheme: dark.

## `blockBanners` (type: `boolean`):

Remove common cookie/consent popups, chat widgets and ad frames before capturing.

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

Capture only this CSS element (images only).

## `hideSelectors` (type: `string`):

Comma-separated CSS selectors to hide before capturing.

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

Wait this long after the page loads.

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

Compression quality for JPEG.

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

Paper size for PDF output.

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

Landscape orientation for PDF output.

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

Include background colors and images in the PDF.

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

Give up on a page after this long.

## `concurrency` (type: `integer`):

How many pages to capture at once.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://en.wikipedia.org/wiki/Web_scraping"
  ],
  "format": "png",
  "fullPage": true,
  "device": "desktop",
  "darkMode": false,
  "blockBanners": true,
  "delayMs": 0,
  "quality": 85,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "timeoutSecs": 45,
  "concurrency": 4
}
```

# Actor output Schema

## `results` (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://apify.com",
        "https://en.wikipedia.org/wiki/Web_scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pushbuild/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://apify.com",
        "https://en.wikipedia.org/wiki/Web_scraping",
    ] }

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

```

## MCP server setup

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