# Website Screenshot & PDF: No Cookie Banners (`webify-lab/website-screenshot-pdf`) Actor

Bulk website screenshots as PNG, JPEG, WebP or PDF. Full page or viewport, desktop, laptop, tablet and mobile presets, element capture, lazy images loaded, cookie banners hidden without accepting anything, dark mode. Public file links in the output. Failed URLs are free.

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

## Pricing

from $3.50 / 1,000 screenshot takens

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: Full Page, Devices, No Cookie Banners

Take clean screenshots of any public web page in bulk: PNG, JPEG, WebP or PDF, full page or viewport, on desktop, laptop, tablet or mobile. Cookie and consent banners are hidden without accepting anything, lazy-loaded images are loaded by scrolling through the page first, and every file comes back as a public link.

### What you get per URL

| field | meaning |
|---|---|
| `url`, `finalUrl` | the requested URL and where it ended up after redirects |
| `httpStatus`, `title` | HTTP status of the page and its title |
| `device`, `viewport` | preset used, with width, height and pixel density |
| `files` | one entry per format: `format`, `key`, `url` (public link), `bytes`, `width`, `height` (pixels; for PDF the page count is in `pages`) |
| `bannerHidden` | what was removed, e.g. `Sourcepoint`, `OneTrust` or `overlay: div#cmp-banner` |
| `loadMs` | time until the page was loaded |
| `viaProxy` | whether the page was loaded through the proxy |
| `error` | why a URL failed (invalid URL, DNS, timeout, HTTP 404, selector not found) |

File keys are stable and readable: host, path, device and format, e.g. `www.spiegel.de-desktop.png` or `www.spiegel.de-politik-mobile.jpg`. The same URL always gets the same key, which makes comparing runs easy.

### Features

- **Formats:** PNG, JPEG, WebP and PDF from one page load. JPEG and WebP quality adjustable.
- **Devices:** desktop 1440x900, laptop 1280x800, tablet 820x1180, mobile 390x844 with mobile user agent, touch and 3x pixel density, or any custom size.
- **Element capture:** pass a CSS selector to capture one element only.
- **Wait strategy:** load event or network idle, plus an extra delay.
- **Lazy images:** scrolls through the page before capturing.
- **Cookie banners:** known consent platforms (OneTrust, Cookiebot, Usercentrics, Sourcepoint, Didomi, Quantcast, Borlabs, Complianz, Klaro, CookieYes, consentmanager, Iubenda, TrustArc and more) plus a heuristic for large fixed overlays that mention cookies or consent. The banner is removed from the page, never clicked, so no consent is given.
- **Dark mode**, **hide elements** (chat widgets, ads), **PDF** in A4 or Letter, portrait or landscape, with or without backgrounds.
- **Reliable:** one browser with an isolated context per URL, a hard timeout per URL, automatic browser restart after a crash, one retry through the proxy when a page blocks.

### Pricing

You pay per URL with at least one file delivered, no matter how many formats you pick. Failed URLs (invalid, unreachable, timeout, HTTP errors) are not charged.

### Input example

```json
{ "urls": ["https://www.spiegel.de/"], "formats": ["png", "pdf"], "device": "mobile", "fullPage": true }
```

### Limits

- Only public pages. No logins, no CAPTCHA solving.
- Full-page images are cut at 16,000 CSS px height by default (adjustable up to 30,000 px). Long news front pages on the mobile preset (3x density) can produce PNGs above 20 MB; pick JPEG or WebP (about 5 to 10 times smaller) or set the pixel density to 1.
- The banner heuristic is careful on purpose: an unusual banner may stay visible. Add its selector to `hideSelectors`.
- Some sites block datacenter traffic. With the automatic proxy strategy those pages are retried through the proxy with a realistic browser fingerprint.
- Shops and publishers with strong bot protection can still block every automated browser. Such URLs, and pages that render empty, end as an error item and are not charged.
- With `selector`, PDFs still contain the whole page.

### FAQ

**What am I charged for?** One event per URL with at least one file delivered, no matter how many formats you pick. Items with an `error` are not charged.

**Where are the files stored?** In the run's default key-value store under a stable key built from host, path, device and format. Each entry in `files` contains the key and a public `url` to the record.

**Do I need a proxy?** Not usually. With the default `proxyStrategy` `auto` pages load directly, and a page that answers 403, 429 or 503, shows a bot check or stalls is retried once through the proxy with a realistic browser fingerprint. `direct` never uses a proxy, `proxy` always does.

**Are cookie banners accepted?** No. Known consent platforms and large fixed cookie overlays are removed from the page, never clicked, so no consent is given. What was removed is listed in `bannerHidden`.

**What happens when a page fails?** The URL still gets a dataset item with `error` set, for example for an invalid URL, a timeout (default 90 seconds per URL, `timeoutSecs` 15 to 300), an HTTP error page or a page that renders empty because of bot protection.

### Use with AI agents (MCP)

This Actor works as a tool for Claude, ChatGPT, Cursor and other MCP clients through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Add only this Actor:

```
https://mcp.apify.com?tools=webify-lab/website-screenshot-pdf
```

On first use the server signs you in with OAuth. Alternatively send the header `Authorization: Bearer <APIFY_TOKEN>`. Agents on the default Apify MCP setup can also find this Actor with `search-actors` and run it with `call-actor`. Pricing is the same as in Apify Console: you pay per result.

# Actor input Schema

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

Pages to capture. http(s) is added when missing. Duplicates are skipped.

## `formats` (type: `array`):

One file per format and URL. All formats come from the same page load.

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

Capture the whole scrollable page. Off captures only the visible viewport.

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

Viewport preset. Mobile and tablet use a mobile user agent, touch and a high pixel density.

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

Only used with device 'custom'.

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

Only used with device 'custom'.

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

Optional. 1 keeps files small, 2 or 3 gives retina images. Empty uses the preset (desktop 1, tablet 2, mobile 3).

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

Optional. Captures only the first matching element, e.g. #pricing or header. Images only; PDFs always contain the page.

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

When the page counts as loaded. Network idle is capped, so pages with endless polling still get captured.

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

Wait this long after loading, before capturing.

## `scrollPage` (type: `boolean`):

Scrolls down step by step to trigger lazy-loaded images, then back to the top.

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

Removes consent banners of common platforms (OneTrust, Cookiebot, Usercentrics, Sourcepoint, Borlabs, Complianz and more) plus large fixed overlays that talk about cookies. Nothing is accepted or clicked.

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

Emulates prefers-color-scheme: dark. Only sites that support dark mode change.

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

Optional. Elements to hide before capturing, e.g. chat widgets or ad slots.

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

Lower is smaller. Does not affect PNG.

## `maxHeight` (type: `integer`):

Very long or infinite pages are cut at this height (CSS pixels).

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

Only for PDF.

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

Only for PDF.

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

Include background colors and images in the PDF.

## `captureErrorPages` (type: `boolean`):

Off: a 404 or 500 page returns an error item and is not charged. On: the error page is captured and charged like any other page.

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

Pages processed at the same time in one browser. More needs more memory (about 1 GB per 3 pages).

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

Whole budget per URL including load, scrolling and capturing.

## `maxUrls` (type: `integer`):

Safety limit per run.

## `proxyStrategy` (type: `string`):

Automatic keeps costs low and retries through the proxy only when a page answers 403, 429 or shows a bot check.

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

Used for blocked pages (automatic) or for every page (always). Residential works best for strict sites.

## Actor input object example

```json
{
  "urls": [
    "https://www.spiegel.de/",
    "https://apify.com/"
  ],
  "formats": [
    "png"
  ],
  "fullPage": true,
  "device": "desktop",
  "width": 1440,
  "height": 900,
  "waitUntil": "load",
  "delayMs": 500,
  "scrollPage": true,
  "hideCookieBanners": true,
  "darkMode": false,
  "hideSelectors": [],
  "jpegQuality": 80,
  "maxHeight": 16000,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "captureErrorPages": false,
  "concurrency": 3,
  "timeoutSecs": 90,
  "maxUrls": 1000,
  "proxyStrategy": "auto",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

One item per URL: url, finalUrl, httpStatus, title, device, viewport, files (format, key, url, bytes, width, height), bannerHidden, loadMs, viaProxy, capturedAt; or error. The files themselves are in 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://www.spiegel.de/",
        "https://apify.com/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("webify-lab/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://www.spiegel.de/",
        "https://apify.com/",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("webify-lab/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://www.spiegel.de/",
    "https://apify.com/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call webify-lab/website-screenshot-pdf --silent --output-dataset

```

## MCP server setup

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