# Website Screenshot & PDF API — Cookie Banner Removal (`poised_beardlichen/website-screenshot-pdf`) Actor

Use this when you need a clean screenshot or PDF of a web page (cookie banners, ads, chats removed). $0.0015/screenshot, $0.003/full page, $0.005/PDF. Input: {"url":"https://example.com","format":"png"}. Output: screenshotUrl, title, status, width, height. Bulk URLs, mobile/desktop.

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

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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, Clean, No Cookie Banners

Capture **pixel-perfect screenshots (PNG, JPEG, WebP) or PDFs of any website**, one URL or ten thousand. Cookie banners, GDPR consent pop-ups, ads, trackers and chat bubbles are removed automatically, so you get a clean picture of the page the way a real visitor sees it after clicking "Reject all".

Use it as a normal Actor (bulk runs, schedules, integrations) **or as a real-time HTTP API** (Standby mode) that returns the image directly.

### Why this screenshot tool?

| | This Actor | Basic screenshot tools |
|---|---|---|
| Cookie banners & consent pop-ups | ✅ Removed (OneTrust, Cookiebot, Didomi, Quantcast, Sourcepoint, TrustArc, Usercentrics, Shopify + EasyList Cookie lists, auto-reject, overlay clean-up) | ❌ Visible |
| Ads, trackers, chat widgets | ✅ Blocked / hidden | ❌ |
| Formats | PNG, JPEG, **WebP**, **PDF** | PNG/JPEG |
| Devices | Desktop, laptop, **iPad, iPhone, Pixel** (real emulation: UA, touch, retina) | Width only |
| Full page with lazy-loaded images | ✅ Auto-scroll | Partial |
| Capture one element | ✅ CSS selector | ❌ |
| Dark mode, custom CSS/JS, retina 2×/3× | ✅ | ❌ |
| Blocked / captcha / error pages | ✅ Detected and flagged (`blocked: true`) | Often saved as a normal result |
| Real-time API | ✅ `GET /screenshot?url=…` | ❌ |

### What can I use it for?

- **Link previews & thumbnails** for apps, directories and chat tools
- **Website change monitoring** – schedule daily screenshots of competitor pricing pages
- **Compliance & evidence** – dated captures of ads, listings, terms pages
- **SEO & agency reports** – desktop + mobile shots of client sites in one run
- **AI agents** – let an LLM "see" a page (works via Apify MCP)
- **Archiving** – save pages as searchable PDFs

### How to take website screenshots

1. Click **Try for free**.
2. Paste your URLs (one per line – `example.com` works too).
3. Pick a format, device and whether you want the full page.
4. Click **Start**. Each screenshot appears in the results table with a direct download link.

#### Example input

```json
{
  "urls": ["https://www.bbc.com", "https://stripe.com", "https://github.com"],
  "devices": ["desktop", "mobile"],
  "format": "jpeg",
  "fullPage": true,
  "hideCookieBanners": true,
  "blockAds": true
}
```

#### Example output (one item per URL × device)

```json
{
  "url": "https://www.bbc.com",
  "device": "mobile",
  "format": "jpeg",
  "fullPage": true,
  "success": true,
  "finalUrl": "https://www.bbc.com/",
  "status": 200,
  "title": "BBC Home - Breaking News, World News, US News, Sports, Business, Innovation, Climate, Culture, Travel, Video & Audio",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/screenshot-www-bbc-com-mobile-1a2b3c4d5e.jpg",
  "width": 1170,
  "height": 24180,
  "bytes": 1460211,
  "durationMs": 5210,
  "error": null
}
```

Failed or blocked pages produce `"success": false` with a readable `error` – one bad URL never fails the run.

### Real-time screenshot API (Standby mode)

```bash
## Returns the image bytes
curl "https://<your-standby-url>/screenshot?url=https://stripe.com&format=webp&device=mobile&fullPage=true" \
  -H "Authorization: Bearer <APIFY_TOKEN>" -o stripe.webp

## Returns JSON with metadata + base64 image
curl -X POST "https://<your-standby-url>/screenshot" -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://github.com","format":"pdf","response":"json"}'
```

Parameters: `url` (required), `format` (png|jpeg|webp|pdf), `device` (desktop|laptop|tablet|mobile|android), `fullPage`, `width`, `height`, `scaleFactor`, `quality`, `delayMs`, `waitUntil`, `waitForSelector`, `selector`, `darkMode`, `hideCookieBanners`, `blockAds`, `hideChatWidgets`, `customCss`, `customJs`, `timeoutSecs`, `pdfFormat`, `pdfLandscape`, `response` (image|json). Response headers include `X-Final-Url`, `X-Page-Status`, `X-Duration-Ms` and `X-Blocked`.

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("<username>/website-screenshot-pdf").call(run_input={
    "urls": ["https://www.theguardian.com"], "format": "png", "device": "desktop"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item["screenshotUrl"])
```

#### JavaScript

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('<username>/website-screenshot-pdf').call({ urls: ['https://stripe.com'], format: 'pdf' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Pricing

Simple **pay-per-event** pricing with no subscription. You pay a fixed price per successful capture, and blocked or failed pages are free:

| Event | Price |
|---|---|
| Viewport screenshot (PNG / JPEG / WebP, any device) | $0.0015 |
| Full-page screenshot | $0.003 |
| PDF of a page | $0.005 |

**Examples:**

- 1,000 desktop screenshots: **$1.50**
- 1,000 full-page screenshots: **$3.00**
- 100 PDFs: **$0.50**

Platform usage is included in these prices. Set **Maximum cost per run** and the Actor stops at your limit.

#### How does the price compare?

Price for **1,000 viewport screenshots**, taken from each Actor's public Apify Store pricing (free-tier prices, checked 19 October 2026):

| Actor | Price per 1,000 | Start fee | Removes cookie banners & pop-ups |
|---|---|---|---|
| **This Actor** | **$1.50** | none | ✅ ~40 consent tools + ads + chat widgets |
| cheapapi/website-screenshot-api | $0.89 | $0.00001 | not advertised |
| moonweil/url-screenshot-api | $4.00 | $0.001 | not advertised |
| i-scraper/website-screenshot | $6.00 | none | not advertised |
| parseforge/screenshot-url | $16.00 | none | not advertised |
| fetchbase/web-screenshot-pro | $20.00 | none | not advertised |

Failed or blocked captures are free here, so you only pay for usable images.

### Tips

- **Site blocks the request (403 / captcha)?** Try *Proxy → Apify Proxy → Residential*. Some large news and social sites use advanced bot protection and may still refuse; such pages are flagged `blocked: true`.
- **Need a country-specific version** (e.g. EU cookie wall, local prices)? Choose a proxy country.
- **Animations or late content?** Add *Extra delay* or *Wait for selector*.
- **Very long pages** are cut at *Max full-page height* (default 16,000 px). WebP is limited to 16,383 px per side.
- **Throughput:** ~4 parallel pages per 2 GB memory; 4 GB handles most bulk jobs well.

### FAQ

**Is it legal to take screenshots of websites?** Capturing publicly available pages is generally fine, but respect copyright and site terms, and don't capture personal data without a legitimate reason.

**Does it bypass logins or paywalls?** No. You can pass your own cookies/headers via the API for pages you are authorised to access.

**Can I use it with Make, Zapier, n8n, Google Drive or Slack?** Yes – via Apify integrations and webhooks.

**Found a bug or a banner that isn't removed?** Open an issue on the Issues tab with the URL and we'll look into it.

### Use with AI agents (MCP)

AI agents can call this Actor as a tool through the [Apify MCP server](https://mcp.apify.com). Add it to Claude Desktop, Cursor, VS Code or any MCP client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=poised_beardlichen/website-screenshot-pdf",
      "headers": { "Authorization": "Bearer <YOUR_APIFY_TOKEN>" }
    }
  }
}
```

Then ask your agent: *"Take a full-page mobile screenshot of example.com without cookie banners."* Pricing is fixed per capture, so agents can predict costs before calling.

### Calling it from an AI agent or a script (async pattern)

A single default screenshot usually finishes in about 10–20 seconds. The Apify MCP server waits only about 30–45 seconds for a run before it returns. So for batches, slow pages, or whenever a call returns before the run is done, start the run and fetch the results afterwards rather than waiting on it:

1. **Start the run:** `POST https://api.apify.com/v2/acts/poised_beardlichen~website-screenshot-pdf/runs` with input such as `{"url": "https://example.com"}`. The response contains `data.id` (the run ID) and `data.defaultDatasetId`.
2. **Wait for it to finish:** poll `GET https://api.apify.com/v2/actor-runs/<runId>?waitForFinish=60` until `status` is `SUCCEEDED`.
3. **Fetch the results:** `GET https://api.apify.com/v2/datasets/<defaultDatasetId>/items?clean=true`.

Send your token as `Authorization: Bearer <APIFY_TOKEN>`. Through MCP, if the call returns a run ID instead of results, use the server's run-status and dataset tools (e.g. `get-actor-run`, then `get-dataset-items`) with that ID. For small, quick jobs you can use the synchronous endpoint `POST /v2/acts/poised_beardlichen~website-screenshot-pdf/run-sync-get-dataset-items` instead, which waits for up to 300 seconds.

### Other tools by us

- [PDF to Text & Markdown API, OCR for Scanned PDFs](https://apify.com/poised_beardlichen/pdf-to-text-markdown-ocr): turn the PDFs you capture here (or any PDF, DOCX or image) into clean text and LLM-ready Markdown, with automatic OCR for scanned pages.
- [Bulk Email Verifier & Validator](https://apify.com/poised_beardlichen/email-verifier-bulk): check email lists for valid syntax, MX records, disposable and role addresses and typos, at $0.30 per 1,000 emails.
- [Image to Text OCR API](https://apify.com/poised_beardlichen/image-to-text-ocr): extract text from PNG, JPEG, TIFF and WebP images in 27 languages, at $1.50 per 1,000 images.
- [Bulk PageSpeed & Lighthouse Checker](https://apify.com/poised_beardlichen/pagespeed-lighthouse-checker): Lighthouse scores, Core Web Vitals and top fixes for many URLs on mobile and desktop, from $0.005 per audit.
- [Website Screenshot & PDF for AI Agents](https://apify.com/poised_beardlichen/website-screenshot-pdf-agent): a lightweight copy of the screenshot tool for agents and one-off calls (no Standby). Same prices, starting at $0.0015 per screenshot.

# Actor input Schema

## `url` (type: `string`):

Shortcut for one page URL, e.g. "https://example.com". Combined with the list below; provide at least one of the two.

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

Web pages to capture, processed in parallel. "example.com" without https:// works too. Use "url" instead for a single page.

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

Image format, or PDF for a printable document.

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

Capture the whole scrollable page instead of just the visible viewport.

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

Viewport preset. Tablet and mobile use real device emulation (user agent, touch, pixel ratio).

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

Remove cookie/consent pop-ups (OneTrust, Cookiebot, Didomi, Quantcast and more).

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

Block ads and trackers (EasyList/EasyPrivacy). Faster, cleaner pages.

## `hideChatWidgets` (type: `boolean`):

Hide Intercom, Drift, HubSpot, Zendesk and similar chat bubbles.

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

Emulates prefers-color-scheme: dark.

## `devices` (type: `array`):

Capture every URL on several devices in one run. Overrides "Device".

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

Overrides the preset width.

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

Overrides the preset height.

## `scaleFactor` (type: `integer`):

Device pixel ratio. 2 = retina-sharp images (4× pixels).

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

Screenshot only this element, e.g. "#pricing" or "article".

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

Page-load event to wait for. "networkidle" is slower but safest for heavy apps.

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

Wait until this element is visible before capturing.

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

Additional wait before capture, for animations.

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

Scroll first so lazy images load (full-page and PDF only).

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

Max time for navigation and waiting per attempt. Default 30 s.

## `maxRetries` (type: `integer`):

Retries after network errors or timeouts. Default 1.

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

CSS injected into every page, e.g. ".promo{display:none}".

## `customJs` (type: `string`):

Script run in the page before capture (may be async).

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

Ignored for PNG and PDF.

## `maxFullPageHeight` (type: `integer`):

Very long pages are cut at this height.

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

Only for PDF output.

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

Only for PDF output.

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

Pages captured in parallel.

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

Optional Apify Proxy for sites that block data-centre traffic or for a country version.

## `chargeErrorPages` (type: `boolean`):

HTTP 4xx/5xx and bot-protection pages are saved as failed and not charged by default. Enable to keep them as normal results.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://en.wikipedia.org/wiki/Web_scraping"
  ],
  "format": "png",
  "fullPage": false,
  "device": "desktop",
  "hideCookieBanners": true,
  "blockAds": true,
  "hideChatWidgets": true,
  "darkMode": false,
  "waitUntil": "load",
  "delayMs": 300,
  "scrollToBottom": true,
  "timeoutSecs": 30,
  "maxRetries": 1,
  "quality": 80,
  "maxFullPageHeight": 16000,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "chargeErrorPages": false
}
```

# Actor output Schema

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

Dataset items: url, device, success, finalUrl, status, title, screenshotUrl, width, height, bytes, durationMs, error.

## `screenshots` (type: `string`):

PNG, JPEG, WebP or PDF files, one per successful capture.

# 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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("poised_beardlichen/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",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

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

```

## MCP server setup

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