# Website Screenshot & URL to PDF – Bulk, Full Page, Mobile (`1stbtln/website-screenshot-pdf`) Actor

Take bulk website screenshots (full page, viewport, mobile, tablet, or a single element) or convert any URL to PDF. Hides cookie banners and blocks ads automatically. PNG, JPEG or PDF. Pay only per successful capture.

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

## Pricing

from $1.50 / 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 – Bulk, Full Page, Mobile

Capture **bulk website screenshots** or **convert any URL to PDF** in one run. Full-page or viewport captures, desktop / laptop / tablet / iPhone / Android emulation, single-element screenshots, dark mode — with **cookie banners removed and ads blocked automatically**.

**You only pay for successful captures.** Pages that return HTTP errors, render blank, or show an anti-bot wall are reported in the dataset and **not charged**.

### What can this Website Screenshot API do?

- 📸 **Full-page screenshots** of any public web page (lazy-loaded images are scrolled into view first)
- 📱 **Mobile & tablet screenshots** – iPhone 15 Pro, Pixel 7, iPad Pro, laptop, 1080p desktop, or a custom viewport
- 📄 **URL to PDF** – A4, Letter, Legal, A3, Tabloid, portrait or landscape, with backgrounds
- 🎯 **Element screenshots** – capture only `#pricing`, `.hero`, a chart, or a tweet embed via CSS selector
- 🍪 **Cookie banner remover** – clicks "Accept" and hides 50+ consent popups (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, TrustArc…)
- 🚫 **Ad & tracker blocking** – cleaner captures and faster loads
- 🌙 **Dark mode** emulation, extra delay, custom CSS selectors to hide (chat widgets, sticky headers)
- ⚡ **Parallel capture** – up to 20 pages at once; hundreds of URLs per run
- 🔌 Use it via API, schedules, webhooks, Make, Zapier, n8n, or as an **MCP tool for AI agents**

### Use cases

- Website change monitoring and visual archiving (schedule daily runs)
- Competitor landing-page and pricing-page tracking
- SEO and client reporting, link previews, thumbnails, portfolio images
- Compliance evidence and ad verification
- Saving articles, invoices, or docs as PDF
- Giving AI agents "eyes" on a web page

### How to use

1. Paste one or more URLs (bare domains like `example.com` work).
2. Choose **PNG**, **JPEG**, or **PDF** and a device.
3. Click **Start**. Each file is saved to the run's key-value store, and the dataset lists a direct `fileUrl` for every capture.

#### Input example

```json
{
  "urls": ["https://apify.com", "https://news.ycombinator.com"],
  "format": "png",
  "device": "mobile",
  "fullPage": true,
  "hideCookieBanners": true,
  "blockAds": true
}
```

URL to PDF:

```json
{ "urls": ["https://en.wikipedia.org/wiki/Web_scraping"], "format": "pdf", "pdfFormat": "Letter" }
```

Element only:

```json
{ "urls": ["https://news.ycombinator.com"], "selector": "#hnmain tr:first-child", "darkMode": true }
```

#### Output example

```json
{
  "url": "https://www.bbc.com/",
  "finalUrl": "https://www.bbc.com/",
  "statusCode": 200,
  "title": "BBC Home | Breaking News, World News...",
  "format": "jpeg",
  "device": "desktop",
  "fullPage": true,
  "fileKey": "www.bbc.com-85ea1cd174.jpg",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/www.bbc.com-85ea1cd174.jpg",
  "fileSizeBytes": 2641920,
  "durationMs": 5472,
  "capturedAt": "2026-11-17T20:55:10.000Z",
  "error": null
}
```

Failed pages appear with an `error` message (e.g. `Not captured (not charged): HTTP 500`) and cost nothing.

### Pricing

Pay per event — no subscription, no compute math:

| Event | Price |
|---|---|
| Screenshot (PNG/JPEG) | **$1.50 per 1,000** |
| URL → PDF | **$2.00 per 1,000** |

Failed, blank, and bot-blocked pages are free. Set a maximum cost per run in the Apify Console to cap spend.

### Tips

- Sites with strong bot protection (e.g. Reddit) may need **Proxy → Residential**.
- For very long pages, JPEG is ~5–10× smaller than PNG.
- Use `waitUntil: networkidle` plus `delayMs` for heavy single-page apps.

### FAQ

**Is taking screenshots legal?** Capturing publicly available pages is generally fine. You are responsible for how you use the images (copyright, personal data). This Actor does not log in to any site.

**Can I schedule it?** Yes – create a Task with your URLs and add a schedule for daily or hourly captures.

**Something broke?** Open an issue on the Issues tab — they're answered quickly.

# Actor input Schema

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

Pages to capture. Bare domains like example.com are fine.

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

PNG (lossless), JPEG (smaller files) or PDF (print-ready document).

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

Viewport and user agent to emulate.

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

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

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

Capture only this element, e.g. `#pricing` or `.hero`. Ignored for PDF.

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

Clicks common 'Accept' buttons and hides 50+ consent-manager popups (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast…).

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

Blocks requests to common ad and tracking networks. Cleaner and faster captures.

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

Hide chat widgets, sticky headers, popups, etc.

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

Emulate prefers-color-scheme: dark.

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

When navigation is considered finished. If it times out, whatever has rendered is captured.

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

Wait this long before capturing (animations, lazy content).

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

Scrolls the page before a full-page/PDF capture so lazy-loaded images appear.

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

Overrides the device width (px).

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

Overrides the device height (px).

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

1–100. Only for JPEG.

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

Only for PDF.

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

Only for PDF.

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

Include background colors and images in PDF.

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

Max navigation time per page.

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

How many pages to capture at once (1–20). Raise memory for higher values.

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

Optional. Use a proxy for geo-specific or protected sites.

## `captureBlockedPages` (type: `boolean`):

By default, pages that return HTTP 4xx/5xx, render empty, or show an anti-bot wall are skipped and NOT charged. Enable to capture (and pay for) them anyway, e.g. for uptime evidence.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://news.ycombinator.com"
  ],
  "format": "png",
  "device": "desktop",
  "fullPage": true,
  "hideCookieBanners": true,
  "blockAds": true,
  "hideSelectors": [],
  "darkMode": false,
  "waitUntil": "load",
  "delayMs": 500,
  "scrollToBottom": true,
  "jpegQuality": 80,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "timeoutSecs": 45,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "captureBlockedPages": false
}
```

# Actor output Schema

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

Dataset with one row per URL: fileUrl (direct link to PNG/JPEG/PDF), final URL, HTTP status, page title, device, file size, and error for pages that were not captured (not charged).

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

Keys of all screenshot/PDF files saved to the default key-value store.

# 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://news.ycombinator.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("1stbtln/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://news.ycombinator.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("1stbtln/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://news.ycombinator.com"
  ]
}' |
apify call 1stbtln/website-screenshot-pdf --silent --output-dataset

```

## MCP server setup

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