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

Capture full-page website screenshots (PNG/JPEG) or PDFs in bulk with real Chrome. Desktop, tablet or mobile, dark mode, element capture, lazy-load scrolling and automatic cookie-banner hiding. Pay per capture, failed URLs are free.

- **URL**: https://apify.com/himanshu-data/website-screenshot-pdf.md
- **Developed by:** [Himanshu Agrawal](https://apify.com/himanshu-data) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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 Generator

Capture **full-page screenshots (PNG/JPEG) or PDFs** of any list of websites with real Chrome. Desktop, tablet or mobile view, dark mode, single-element capture, lazy-image loading and **automatic cookie-banner hiding** for clean results. Bulk URLs, fast, and failed URLs are never charged.

### What you can use it for

- **Website monitoring and archiving:** daily snapshots of competitor pages, pricing pages and landing pages.
- **Agencies and SEO:** visual reports for clients, before/after redesign proof, mobile vs desktop checks.
- **Compliance and evidence:** time-stamped PDF copies of terms, ads or listings.
- **Thumbnails and previews:** website previews for directories, link pages and newsletters.
- **AI and automation:** feed page images to vision models from Make, n8n, Zapier or the API.

### Input

| Field | What it does |
|---|---|
| URLs | Pages to capture, one per line. |
| Output | PNG, JPEG or PDF. |
| Full page | Whole scrollable page (up to 20,000 px) or just the visible screen. |
| Device | Desktop (custom width/height), tablet (iPad) or mobile (iPhone 13). |
| Hide cookie banners | Hides consent pop-ups from common providers (OneTrust, Cookiebot, Sourcepoint, Didomi, Quantcast and more) without clicking anything. |
| Dark mode | Requests the site's dark theme. |
| Capture only this element | CSS selector such as `#pricing`. |
| Scroll to load lazy images | Makes lazy-loaded images appear in full-page captures. |
| PDF paper size | A4, Letter, Legal or A3. |
| Proxy | Optional, for sites that block data centers or show country-specific content. |

```json
{
  "urls": ["https://stripe.com/pricing", "https://www.bbc.com/news"],
  "output": "png",
  "fullPage": true,
  "device": "desktop",
  "hideCookieBanners": true
}
```

### Output

One row per page, with a permanent link to the file stored in your run (real output, October 2026):

```json
{
  "url": "https://www.bbc.com/news",
  "finalUrl": "https://www.bbc.com/news",
  "httpStatus": 200,
  "title": "BBC News - Breaking news, video and the latest top stories from the U.S. and around the world",
  "output": "png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/yN3lllWhkqM6eVeXK/records/0003-www-bbc-com-news.png",
  "fileBytes": 2969470,
  "device": "desktop",
  "fullPage": true,
  "seconds": 5.2,
  "capturedAt": "2026-10-17T18:18:00.473Z"
}
```

### Pricing

Pay per capture: **$2.50 per 1,000 screenshots or PDFs** on paid Apify plans (less on Scale and Business). URLs that fail to load are not charged. Set a spending limit per run and the Actor stops cleanly when it is reached.

### Tips

- Use **JPEG** for small files and **PNG** for crisp text.
- Very long pages are cut at 20,000 px so files stay usable.
- If a site shows a "verify you are human" page, turn on the residential proxy.

# Actor input Schema

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

Pages to capture, one per line.

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

PNG for best quality, JPEG for small files, PDF for printable documents.

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

Capture the whole scrollable page (up to 20,000 px tall). Off captures only the visible screen.

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

Desktop uses the width and height below. Mobile and tablet emulate an iPhone 13 and an iPad.

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

Browser window width for desktop captures.

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

Browser window height for desktop captures (the visible area).

## `waitSeconds` (type: `integer`):

Wait after the page loads, for animations or slow widgets.

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

Hides common cookie and consent pop-ups for clean captures.

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

Asks the site for its dark theme, if it has one.

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

CSS selector, e.g. #pricing or .hero. Leave empty for the whole page.

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

Scrolls through the page first so lazy-loaded images appear in full-page captures.

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

Only for PDF output.

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

Optional. Use a proxy for sites that block data centers or show country-specific content.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://www.wikipedia.org"
  ],
  "output": "png",
  "fullPage": true,
  "device": "desktop",
  "width": 1366,
  "height": 768,
  "waitSeconds": 1,
  "hideCookieBanners": true,
  "darkMode": false,
  "scrollToLoad": true,
  "pdfFormat": "A4",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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://www.wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("himanshu-data/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://www.wikipedia.org",
    ] }

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

```

## MCP server setup

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