# Website Screenshot & PDF: Full Page, Mobile, Bulk URLs (`4b47/website-screenshot`) Actor

Capture full-page or viewport screenshots (PNG, JPEG, WebP) and PDFs of any list of URLs or a sitemap. Desktop, laptop, tablet and phone presets, cookie banners closed, lazy images loaded, dark mode, wait for selectors. From $2 per 1,000 screenshots.

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

## Pricing

from $2.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 captures any list of web pages as full-page or viewport images (PNG, JPEG or WebP) and
PDFs.** Pick desktop, laptop, tablet or phone presets; cookie banners are clicked away, lazy-loaded images are
scrolled into view, and you can wait for a selector, hide elements, capture one element or switch on dark mode. Give
URLs or a sitemap; get a dataset with a direct link to every image and PDF.

**Try it now:** press **Start**. The prefilled input captures 2 full pages (apify.com with its cookie banner closed,
and a Wikipedia article) in about 15 seconds for about one cent. Price: **$2 per 1,000 viewport screenshots, $4 per 1,000
full-page screenshots**, PDFs $2 per 1,000. Failed URLs and bot-check pages are free. Apify's free plan ($5 of
monthly credit) covers about **1,200 full-page or 2,400 viewport screenshots a month**.

It runs a current Chromium (Playwright) with no proxies and no anti-bot tricks: what you get is what a regular visitor
sees on a fresh visit.

### Use cases

- **Visual monitoring and archiving:** schedule daily full-page captures of your pages or competitors' pricing pages
  and keep a dated visual history.
- **SEO and marketing reports:** above-the-fold screenshots of landing pages on desktop and mobile, straight from a
  sitemap.
- **QA and responsive checks:** the same URLs on desktop, tablet, iPhone and Android in one run, with dark mode.
- **Link previews and thumbnails:** viewport or element shots (`#hero`, `header`) as small WebP files for a
  directory, CMS or newsletter.
- **Evidence and compliance:** PDF + PNG of a page as it looked at a point in time, with the final URL, HTTP status
  and capture time.
- **AI agents:** give a vision model the rendered page instead of raw HTML.

### How to use Website Screenshot & PDF

1. Paste page URLs into **URLs** (or add **Sitemaps**).
2. Choose **Devices**, **Full page** or viewport, the **Image format**, and optionally **Also save PDF**.
3. Optional: **Wait for selector**, **Extra delay**, **Hide elements**, **Capture only this element**, **Dark mode**.
4. Press **Start**. The **Output** tab shows a table with image previews; every item has `screenshotUrl` and `pdfUrl`.
5. For monitoring, save the input as a task and add a **Schedule**.

### Input

```json
{
  "urls": ["https://apify.com", "https://www.python.org"],
  "devices": ["desktop", "mobile"],
  "fullPage": true,
  "format": "webp",
  "quality": 75,
  "pdf": true,
  "darkMode": true,
  "waitForSelector": "main",
  "hideSelectors": ["#intercom-container"]
}
```

| Field | What it does |
| --- | --- |
| `urls`, `sitemapUrls` | Pages to capture (domains work without `https://`); sitemaps and sitemap indexes (`.gz` too), `maxPagesPerSitemap` each. |
| `devices` | `desktop` 1366x768, `desktop-hd` 1920x1080, `laptop` 1440x900 @2x, `tablet` 834x1194 @2x, `mobile` (iPhone) 393x659 @3x, `mobile-android` 412x839. |
| `fullPage`, `maxHeight` | Whole page (default, cut at 15,000 px and at 16,384 device pixels) or the viewport only. |
| `format`, `quality` | `png`, `jpeg`, `webp` or `none` (PDF only). |
| `pdf`, `pdfFormat`, `pdfLandscape`, `pdfMedia` | PDF next to the image: A4/Letter/Legal/A3, as on screen or with the print stylesheet. |
| `dismissCookieBanners` | Accept common consent banners (30 platforms + accept buttons in 15+ languages), then hide leftover cookie overlays. |
| `waitUntil`, `waitForSelector`, `delayMs`, `timeoutSecs` | When the page counts as ready. |
| `selector`, `hideSelectors` | Capture one element; hide chat widgets, ads or sticky bars. |
| `darkMode`, `viewportWidth`, `viewportHeight` | `prefers-color-scheme: dark`; custom viewport for the first device. |
| `blockTrackers`, `blockMedia`, `scrollToLoad`, `maxConcurrency` | On by default: skip ~40 analytics/ad services and video streams, scroll for lazy images; tabs in parallel. |

### Output

One item per URL and device (real result from `examples/input-advanced.json`):

```json
{
  "url": "https://www.bbc.com/news",
  "finalUrl": "https://www.bbc.com/news",
  "device": "desktop",
  "statusCode": 200,
  "title": "BBC News - Breaking news, video and the latest top stories from the U.S. and around the world",
  "cookieBanner": "text:Yes, I agree",
  "transferredBytes": 2284725,
  "requests": 170,
  "loadMs": 1077,
  "totalMs": 4866,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/bbc.com-news-bea6e6-desktop.webp",
  "format": "webp",
  "width": 1366,
  "height": 7459,
  "deviceScaleFactor": 1,
  "bytes": 619296,
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/bbc.com-news-bea6e6-desktop.pdf",
  "pdfBytes": 7147981,
  "pdfPages": 12,
  "charged": { "screenshot": 1, "full-page": 1, "pdf": 1 }
}
```

`width`/`height` are image pixels (CSS size x device scale). `truncated: true` marks pages cut at the max height,
`timedOut: true` pages captured while still loading. Failures carry `error` with a code: `nxdomain`,
`target_unreachable`, `tls_error`, `target_timeout`, `selector_not_found`, `bot_protection` (the site answered with a
bot check or HTTP 401/403/429/503: the image is kept for reference but not charged).

### How much does a screenshot cost?

| Event | Price | Example |
| --- | --- | --- |
| Screenshot (viewport or element) | **$0.002** | 1,000 above-the-fold shots = **$2** |
| Full-page capture (added to a screenshot) | $0.002 | 1,000 full-page shots = **$4** |
| PDF | $0.002 | |
| Heavy page: each started 5 MB a page downloads beyond 5 MB | $0.002 | most pages are 1-5 MB; a 26 MB page adds $0.010 |
| Actor start (per GB of run memory) | $0.002 | default 2 GB run = $0.004 |
| Failed URL, bot-check page | free | |

Platform usage is included: rendering pages in Chromium is the expensive part (2-6 CPU-seconds and 3-5 MB of
downloads per real-world page), and you pay a fixed price instead of compute. Set a **maximum cost per run** and the
actor stops there.

### FAQ

#### How are cookie banners handled?

First the "accept" buttons of OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, TrustArc, Sourcepoint, Google
Funding Choices, CookieYes, Complianz, Iubenda and about 20 more, in the page and in iframes; then any visible
"Accept all / Alle akzeptieren / Tout accepter / Akceptuj..." button inside a cookie or consent box; finally leftover
fixed cookie overlays are hidden. `cookieBanner` in the output tells which step worked. In our 20-site test (news, shops, SaaS) it closed banners on
12 sites.

#### Why does a page show "Access denied" or a bot check?

Some sites (often big retailers) block automated browsers. The actor does not use proxies or evasion, so such pages
come back with `error.code: "bot_protection"` and are not charged.

#### Can it log in or capture pages behind a paywall?

No. It captures public pages as an anonymous visitor.

#### How long can a full page be?

Up to 15,000 CSS pixels by default (`maxHeight`, max 16,000) and 16,384 image pixels, which is 5,461 CSS pixels on a
3x phone. Longer pages are cut and marked `truncated`.

#### Can I call it from code or an AI agent?

Yes: the Apify API (`run-sync-get-dataset-items` returns the items with image links), the JavaScript and Python
clients, or the Apify MCP server.

### Integrations and API

Schedule runs, call the API, export items to JSON/CSV/Excel, and send results to Slack, Google Drive, Make, Zapier,
n8n or webhooks.

### Related actors

- [URL to Markdown for LLM & RAG](https://apify.com/4b47/llm-ready-markdown): the text of the same pages as
  clean Markdown.
- [Image to Text OCR](https://apify.com/4b47/image-pdf-ocr): read text from screenshots and PDFs.
- [Bulk File & Image Downloader](https://apify.com/4b47/bulk-file-downloader): download the images and files
  a page links to.

# Actor input Schema

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

Pages to capture, one per line (domains without https:// work too). Up to 50,000.

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

One capture per URL and device. Desktop 1366x768, Desktop HD 1920x1080, Laptop 1440x900 (retina 2x), Tablet 834x1194 (iPad Pro 11, 2x), Mobile 393x659 (iPhone 15, 3x), Android 412x839 (Pixel 7). Mobile presets send the device's user agent, so sites serve their mobile layout.

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

Capture the whole scrollable page (lazy images are scrolled into view first). Off = only the visible viewport.

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

PNG (lossless), JPEG or WebP (much smaller files). None = PDF only.

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

1-100.

## `pdf` (type: `boolean`):

Print each page to a PDF (A4 by default, backgrounds included), saved next to the screenshot.

## `dismissCookieBanners` (type: `boolean`):

Click "Accept" on common consent banners (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, TrustArc and ~25 more, plus accept buttons in 15+ languages), then hide leftover cookie overlays.

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

Ask the page for its dark color scheme (prefers-color-scheme: dark). Sites without a dark theme look the same.

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

CSS selector that must be visible before capturing (e.g. .product-grid, #chart canvas). If it never appears the URL fails (free).

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

Wait this long after the page is ready (animations, charts, late widgets).

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

Load (default) plus up to 3 s for the network to go quiet; Network idle waits for no requests for 500 ms (slower, for dashboards); DOM ready is fastest.

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

CSS selector of one element to capture instead of the page (e.g. header, #pricing).

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

CSS selectors to hide before capturing: chat widgets, ads, sticky bars (e.g. #intercom-container, .ad-slot).

## `sitemapUrls` (type: `array`):

sitemap.xml URLs (indexes and .gz work): their pages are captured too, up to "Max pages per sitemap".

## `maxPagesPerSitemap` (type: `integer`):

Upper limit of pages taken from each sitemap.

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

Overrides the width of the first device (200-3840 px).

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

Overrides the height of the first device (200-2400 px).

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

Full-page captures longer than this are cut (and marked truncated). Also capped at 16,384 device pixels (5,461 CSS px on 3x phones).

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

Paper size of the PDF.

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

Landscape orientation.

## `pdfMedia` (type: `string`):

Screen: the PDF looks like the page on screen. Print: use the site's print stylesheet.

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

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

## `blockTrackers` (type: `boolean`):

Skip ~40 analytics, ad and session-replay services (Google Analytics, Tag Manager, DoubleClick, Hotjar, Meta pixel, ...). Faster, lighter, no visual change on most pages.

## `blockMedia` (type: `boolean`):

Do not download video/audio streams (posters still show). Saves time and data.

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

Max wait for a page to load. A page that is still loading after this is captured as it is (marked timedOut).

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

Default: one browser tab per GB of run memory (2 at the default 2 GB, up to 8).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://en.wikipedia.org/wiki/Screenshot"
  ],
  "devices": [
    "desktop"
  ],
  "fullPage": true,
  "format": "png",
  "quality": 80,
  "pdf": false,
  "dismissCookieBanners": true,
  "darkMode": false,
  "delayMs": 0,
  "waitUntil": "load",
  "maxPagesPerSitemap": 100,
  "maxHeight": 15000,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfMedia": "screen",
  "scrollToLoad": true,
  "blockTrackers": true,
  "blockMedia": true,
  "timeoutSecs": 30
}
```

# Actor output Schema

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

One item per URL and device: screenshot link, PDF link, page title, HTTP status, size and timing. Failed URLs have an error field and are not charged.

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

Every image and PDF as a record of the run's key-value store (each item's screenshotUrl and pdfUrl point here).

## `summary` (type: `string`):

Counts, bytes and error codes.

# 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/Screenshot"
    ],
    "devices": [
        "desktop"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("4b47/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/Screenshot",
    ],
    "devices": ["desktop"],
}

# Run the Actor and wait for it to finish
run = client.actor("4b47/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/Screenshot"
  ],
  "devices": [
    "desktop"
  ]
}' |
apify call 4b47/website-screenshot --silent --output-dataset

```

## MCP server setup

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