# Website Screenshot & Full Page PDF Capture API (`abzalp/website-screenshot`) Actor

Capture clean full page screenshots and PDFs (PNG, JPEG, WebP) with mobile/desktop presets, dark mode, retina display, and automatic cookie banner and ad blocking.

- **URL**: https://apify.com/abzalp/website-screenshot.md
- **Developed by:** [Abdul Basit](https://apify.com/abzalp) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 screenshot or pdf takens

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/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

[![Apify Store](https://img.shields.io/badge/Apify%20Store-Run%20Actor-FF9800?style=for-the-badge\&logo=apify\&logoColor=white)](https://apify.com/abzalp/website-screenshot)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](LICENSE)
[![Free Tier Supported](https://img.shields.io/badge/Free%20Tier-5%20USD%20Monthly-brightgreen?style=for-the-badge)](https://apify.com/abzalp/website-screenshot)

> 🚀 **[Run this Actor on Apify Store](https://apify.com/abzalp/website-screenshot)** — Instant cloud execution with zero setup, zero proxies needed, and free monthly credits.

Take clean screenshots of any website as **PNG, JPEG, WebP or PDF**: the true full page or just the screen, on desktop, iPhone, Android or iPad. **Cookie banners are declined automatically and ads are blocked**, so you get the page itself, not popups. Capture one URL or thousands, from a list, a dataset, or automatically after another Actor.

**What you get**

- 📄 **True full page:** scrolls through the page first so lazy-loaded images actually appear, then captures everything (up to about 16,000 pixels tall).
- 🍪 **No cookie banners:** consent popups from OneTrust, Sourcepoint, Didomi, Cookiebot and many more are **declined** (never accepted) using DuckDuckGo's open-source autoconsent. Leftover cookie notices are hidden.
- 🚫 **No ads:** ad and tracker requests are blocked and empty ad boxes removed, for cleaner and faster captures.
- 📱 **10 device presets:** desktop sizes from 1366 to 2560 wide, iPhone 15, iPhone SE, Pixel 7, Galaxy S9+, iPad Pro 11 and iPad mini, with each phone's real screen density and mobile layout.
- 🎯 **Element capture:** capture just one part of a page, such as `#pricing` or `main article`.
- 🌙 **Dark mode, retina, hide elements, custom size, extra delay** for animations, and PDF paper size and orientation.
- 💸 **Failed pages are free.** You pay only for screenshots that were taken.
- 🤖 **Bot checks aren't billed:** when a site shows a recognised "verifying you are human" or "you have been blocked" page instead of the real one, the URL is marked failed, no file is saved and you aren't charged.
- ⬜ **Blank captures aren't billed:** if a screenshot comes out as one flat colour, the Actor waits and retakes it (up to 10 extra seconds). If it's still flat, the URL is marked failed and you aren't charged.

### How much does it cost?

Pay-per-event pricing: a small start fee per run (it grows with the memory you give the run) plus a fee per **screenshot or PDF taken**. Pages that fail to load aren't charged the screenshot fee. A page that loads but answers with an error code, such as 404, is captured as shown and **is** charged; its row says which code it returned. The **Pricing** tab shows current prices. You can set a maximum cost per run, and the Actor stops before going over it.

### Input example

```json
{
    "urls": ["https://apify.com", "github.com"],
    "format": "png",
    "fullPage": true,
    "device": "desktop-1366",
    "blockCookieBanners": true,
    "blockAds": true
}
```

#### Screenshot every URL in a dataset

Pick a dataset in **Dataset with URLs**. The Actor looks for common fields (`url`, `website`, `link`, `loadedUrl`...), or set **URL field**. This works well after scrapers such as Google Maps Scraper to capture every business website.

#### Use it as an integration or on a schedule

- **After another Actor:** open it → **Integrations** → **Connect Actor or Task** → pick this Actor. The integration's input is pre-filled with `"datasetId": "{{resource.defaultDatasetId}}"`, which captures the URLs from the run that triggered it. Check that the **JSON** tab still has this line: without it, the run isn't allowed to read the results.
- **Website monitoring:** create a **Task** with your URLs and add a **Schedule** (for example daily) to keep a visual history of pages.

### Output

Each file is saved in the run's **key-value store**, and the dataset has one row per URL:

```json
{
    "url": "https://www.theguardian.com/international",
    "status": "captured",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../records/screenshot-0001-www-theguardian-com-international.png",
    "finalUrl": "https://www.theguardian.com/international",
    "statusCode": 200,
    "title": "News, sport and opinion from the Guardian's global edition",
    "width": 1366,
    "height": 16000,
    "cookieBanner": "sourcepoint-top",
    "adsBlocked": 15,
    "loadSeconds": 15.4
}
```

`cookieBanner` names the consent popup that was declined (or `hidden-generic` if a generic notice was hidden). Failed URLs have `status: "failed"` and a plain-English `error`. If a bot check or block page was the reason, `blockedBy` names it (for example `Cloudflare` or `Radware`).

### Tips

- **Slow or heavy sites:** set **Wait until** to *Network quiet*, or add an **Extra delay**. If a site keeps loading forever, the Actor still captures it once the page content is ready.
- **"The page was still one plain colour":** the site is very slow to draw, so add an **Extra delay**. A page that really is a single colour is reported this way too. Single-element captures aren't checked, so an element such as a colour swatch is captured normally.
- **Chat widgets or sticky headers in the way:** add their CSS selectors to **Hide elements**.
- **Sharper images:** set **Pixel density** to 2 (retina). Files are about 4× larger.
- **Speed:** each full-page image gets about 2 GB of memory, and each screen-sized image or PDF about 1 GB. Give the run more memory to capture more pages in parallel.

### Limits and good use

- No tool recognises every cookie banner or ad, so some pages can still show one. Use **Hide elements** to remove what's left.
- **Large batches:** a run stops at the time limit set in its **Run options**. For hundreds of URLs or more, raise the timeout and memory. If a run stops early, **resurrect** it: URLs already finished (captured or failed) are skipped, so you aren't charged for them again.
- Only public `http` and `https` pages. Private and local network addresses are refused for security.
- Pages behind a login, bot checks, CAPTCHAs and paywalls are not bypassed. Common bot-check pages (Cloudflare, Radware, DataDome, HUMAN/PerimeterX, Imperva, Vercel, AWS WAF, Google) are detected and not charged. Detection can't cover every site's own design, so a page it doesn't recognise is captured as shown.
- Make sure you have the right to capture and use the pages you screenshot, and respect each site's terms.

### Credits

Cookie consent handling: DuckDuckGo autoconsent (MPL-2.0). Ad blocking: Ghostery adblocker (MPL-2.0). This Actor is independent and isn't affiliated with or endorsed by them or by any website or consent service named here. Browser: Chromium via Playwright.

***

### 🔗 Related Developer Tools & Ecosystem

Extend your automation workflows with our companion tools on the Apify Store:

- 📄 **[YouTube Transcript & Subtitle Extractor](https://apify.com/abzalp/youtube-transcript-extractor)** — Extract clean video transcripts in Markdown & JSON for AI and LLMs.
- 📊 **[Google Sheets Sync & Importer](https://apify.com/abzalp/google-sheets-sync)** — Automatically export and append Apify dataset rows directly to Google Sheets.
- 📑 **[Dataset to Excel Report Generator](https://apify.com/abzalp/dataset-to-excel-report)** — Convert raw scraping datasets into styled, formatted Excel (.xlsx) reports with auto-filters.
- 📸 **[Website Screenshot & PDF Capture API](https://apify.com/abzalp/website-screenshot)** — Capture full-page screenshots and PDFs with mobile/retina presets and ad-blocking.
- 🖼️ **[AI Image Upscaler & Enhancer](https://apify.com/abzalp/ai-image-upscaler)** — Upscale low-resolution photos and images to 4K Ultra HD.
- 🎥 **[Video Compressor & Audio Extractor](https://apify.com/abzalp/video-compressor-converter)** — Fast video compression, format conversion, and clean MP3 audio extraction.

# Changelog

This Actor's version history is a separate document: https://apify.com/abzalp/website-screenshot/changelog.md

# Actor input Schema

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

Web pages to capture, one per line. https:// is added if missing.

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

PNG is lossless, JPEG and WebP are much smaller, PDF gives a printable document with selectable text.

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

Capture the whole scrolling page, not just the visible screen. Lazy-loaded images are loaded first.

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

Screen size and device type. Phone and tablet presets also use that device's browser identity, so sites show their mobile layout.

## `blockCookieBanners` (type: `boolean`):

Automatically declines cookie consent popups (never accepts them) and hides leftover cookie notices.

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

Blocks ads and tracking scripts for cleaner, faster captures.

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

Ask the site for its dark theme (works on sites that support it).

## `datasetId` (type: `string`):

Capture every URL in a dataset, for example the output of a scraper. When you connect this Actor as an integration, use {{resource.defaultDatasetId}} to capture the URLs from the run that triggered it.

## `urlField` (type: `string`):

The dataset field that holds the URL. Leave empty to detect common names (url, website, link...).

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

Capture at most this many URLs. 0 means all.

## `elementSelector` (type: `string`):

Optional CSS selector, for example "#pricing" or "main article". Only that element is captured.

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

CSS selectors of elements to hide before capturing, for example chat widgets: "#intercom-container".

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

When the page counts as loaded. "Network quiet" waits longest and suits heavy apps.

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

Wait this long after loading, for animations or late content. Maximum 30,000.

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

For full-page captures, scroll through the page first so lazy-loaded images appear.

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

Overrides the device preset width. 0 uses the preset.

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

Overrides the device preset height. 0 uses the preset.

## `scale` (type: `integer`):

1 is standard, 2 is retina (sharper, 4× the pixels). 0 uses the device preset.

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

1 to 100. Higher is sharper but larger.

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

Full-page captures are cut off at this height. Very long pages are also limited to about 16,000 image pixels.

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

Paper size for PDF output.

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

Landscape orientation for PDF output.

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

Give up on a page after this long. Failed pages are not charged.

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

How many pages to capture in parallel. 0 picks automatically from the run's memory.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://en.wikipedia.org/wiki/Web_scraping"
  ],
  "format": "png",
  "fullPage": true,
  "device": "desktop-1366",
  "blockCookieBanners": true,
  "blockAds": true,
  "darkMode": false,
  "maxUrls": 0,
  "waitUntil": "load",
  "delayMs": 0,
  "scrollToLoad": true,
  "viewportWidth": 0,
  "viewportHeight": 0,
  "scale": 0,
  "quality": 85,
  "maxHeight": 16000,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "timeoutSecs": 60,
  "maxConcurrency": 0
}
```

# Actor output Schema

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

No description

## `files` (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://en.wikipedia.org/wiki/Web_scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("abzalp/website-screenshot").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",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abzalp/website-screenshot"
        }
    }
}
```

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/awdgHCBMO1tZlMpCv/builds/JyhBELvZLosW2iZRO/openapi.json
