# Website Screenshot & PDF API – Full Page, No Cookie Banners (`goldfoot/website-screenshot-pdf`) Actor

Capture bulk website screenshots (PNG, JPEG) or PDFs. Full page, mobile/tablet/desktop, cookie banners and ads removed automatically, dark mode, element screenshots. Get a public file URL for each page.

- **URL**: https://apify.com/goldfoot/website-screenshot-pdf.md
- **Developed by:** [Julian Aliabadi](https://apify.com/goldfoot) (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 $5.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 & PDF API — Bulk, Full Page, No Cookie Banners

Turn **any list of URLs into clean screenshots or PDFs**, in bulk, with **cookie banners, consent pop-ups and ads removed automatically**. Each capture is saved as a file with a **public URL**, ready for your app, report, archive or AI agent.

✅ PNG, JPEG or PDF · ✅ Full page or visible screen · ✅ Desktop, laptop, tablet and mobile presets (retina) · ✅ Cookie banner removal (OneTrust, Cookiebot, Usercentrics, Didomi, Sourcepoint, Quantcast, Borlabs, Complianz, …) · ✅ Ad & tracker blocking · ✅ Dark mode · ✅ Single element capture · ✅ Lazy-load scrolling · ✅ Failed pages are not charged

### Use cases

- **Website monitoring & archiving** — schedule daily captures of your own or competitors' pages (pricing pages, landing pages, terms).
- **Reports & proposals** — drop clean screenshots into SEO audits, agency reports or pitch decks.
- **Link previews & thumbnails** — generate thumbnails for directories, bookmarks and CMSs.
- **Compliance & evidence** — save PDFs of web pages as they looked on a given date.
- **AI agents & vision models** — give an LLM a clean image of a page without pop-ups in the way.
- **Visual QA** — compare how a page renders on mobile vs desktop.

### How to use

1. Paste your URLs (one per line).
2. Choose **PNG**, **JPEG** or **PDF**, the **device**, and whether you want the **full page**.
3. Click **Start**. Each result row contains `fileUrl`, a direct link to the image/PDF.

### Input example

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

### Output example

```json
{
  "url": "https://apify.com",
  "finalUrl": "https://apify.com/",
  "httpStatus": 200,
  "title": "Apify: Full-stack web scraping and data extraction platform",
  "success": true,
  "format": "png",
  "device": "desktop",
  "fullPage": true,
  "fileKey": "apify.com-41d918bf8de3.png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/apify.com-41d918bf8de3.png",
  "bytes": 209715,
  "durationMs": 3921,
  "capturedAt": "2026-11-14T01:12:00.000Z"
}
```

All files are also in the run's **key-value store** (Storage tab), so you can download them in one go.

### Pricing

You pay **per successful capture** (see the Pricing tab). Pages that fail to load or return an HTTP error (e.g. 404, 502, bot protection) are **not charged**. Use the run's maximum cost setting to cap spending.

### Tips

- Very long pages are clipped at ~16,000 pixels (a Chrome limit). For mobile retina captures that's about 5,300 CSS pixels; use `deviceScaleFactor: 1` to capture more.
- Heavy single-page apps: set **Wait until** to `networkidle` or use **Wait for element**.
- Something still covering the page? Add its CSS selector to **Hide elements**.
- Some websites block automated browsers. Those captures are marked `success: false` and are free.

### Support

Open an issue on the **Issues** tab with the URL and settings you used. We usually respond within a few days.

# Actor input Schema

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

Pages to capture, one per line. "https://" is added if missing.

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

Image or PDF.

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

Capture the whole scrollable page instead of only the visible screen (images only).

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

Viewport and user agent preset.

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

Hide or accept cookie/consent pop-ups (OneTrust, Cookiebot, Usercentrics, Didomi, Sourcepoint, Quantcast and many more).

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

Block common ad and tracking networks for cleaner, faster captures.

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

Extra elements to hide, e.g. .newsletter-popup, #chat-widget.

## `customCss` (type: `string`):

CSS injected before capturing.

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

Emulate prefers-color-scheme: dark.

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

Screenshot a single element instead of the page, e.g. #pricing.

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

Page load event to wait for. Use networkidle for heavy single-page apps.

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

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

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

Wait until this element appears before capturing.

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

Scroll through the page before full-page captures so lazy-loaded images appear.

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

Overrides the device width. 0 = use device preset.

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

Overrides the device height. 0 = use device preset.

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

1–3. 0 = use device preset.

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

Only for JPEG.

## `pdfPaperFormat` (type: `string`):

Only for PDF.

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

Only for PDF.

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

Include background colors and images in the PDF.

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

Maximum time to load one page.

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

How many pages to capture in parallel. Use more memory for higher values.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://news.ycombinator.com"
  ],
  "format": "png",
  "fullPage": true,
  "device": "desktop",
  "hideCookieBanners": true,
  "blockAds": true,
  "darkMode": false,
  "waitUntil": "load",
  "delayMs": 1000,
  "scrollToBottom": true,
  "viewportWidth": 0,
  "viewportHeight": 0,
  "deviceScaleFactor": 0,
  "jpegQuality": 80,
  "pdfPaperFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "timeoutSecs": 30,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

Capture results with fileUrl, status, title and size for each URL.

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

All screenshot and PDF files in the run's 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("goldfoot/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("goldfoot/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 goldfoot/website-screenshot-pdf --silent --output-dataset

```

## MCP server setup

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