# Website Screenshot & PDF - Full Page, Mobile, Dark Mode (`maksym_kotenko/website-screenshot-pdf`) Actor

Full-page or viewport screenshots (PNG, JPEG) and PDFs of any URL list. 12 device presets, dark mode, cookie banner hiding, lazy-load scrolling, batches up to 1000 URLs. Pay only per captured page.

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

## Pricing

from $1.50 / 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.
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, Mobile, Dark Mode

Capture clean screenshots and PDFs of any list of web pages. Full-page or first-screen, desktop or phone, light or dark, with cookie banners out of the way. Paste URLs, press Start, download the files.

### What it does

- **Full-page or viewport screenshots** in PNG or JPEG, or the page as a **PDF document**.
- **12 device presets**: Full HD and QHD desktops, laptops, MacBook Retina, iPad Air, iPad Pro, iPhone 15, iPhone SE, Pixel 8, Galaxy S24 - with the right viewport, pixel ratio, touch support and user agent. Or set a custom viewport and pixel ratio.
- **Dark mode**: sets `prefers-color-scheme`, so sites with a dark theme render dark.
- **Cookie banners hidden** for the common consent platforms (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, Sourcepoint, Google Funding Choices, CookieYes and more). Hide anything else with your own CSS selectors: chat widgets, promo bars, popups.
- **Lazy-loaded images**: optional scroll through the page before a full-page capture.
- **Batches up to 1000 URLs per run**, captured in parallel, duplicates removed.
- **Retries and honest billing**: pages that fail to load, answer 5xx or block the request are retried and, if they still fail, listed with an error code and **not charged**.
- **Spending limit respected**: the run stops at your maximum cost per run.

### Use cases

- Visual monitoring and archiving of pages on a schedule.
- Thumbnails and previews for directories, link pages and dashboards.
- Responsive design checks: one URL list, several device presets.
- Evidence and compliance snapshots, PDF copies of pages and invoices.
- Feeding page images to AI and vision models.

### How to use

1. Paste URLs into **URLs**, one per line. `example.com` works, `https://` is added.
2. Pick **Output format** and **Device**. Keep **Full page** on for the whole page.
3. Press **Start**. Each capture appears in the **Output** tab with a direct link to the file.

#### Input example

```json
{
  "urls": ["https://apify.com", "https://example.com"],
  "format": "png",
  "fullPage": true,
  "device": "iphone-15",
  "colorScheme": "dark",
  "hideCookieBanners": true,
  "hideSelectors": [".intercom-launcher"]
}
```

#### Output example

Files are stored in the run's key-value store. The dataset lists one row per URL:

```json
{
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "httpStatus": 200,
  "title": "Example Domain",
  "format": "png",
  "device": "iphone-15",
  "viewportWidth": 393,
  "viewportHeight": 852,
  "deviceScaleFactor": 3,
  "fullPage": true,
  "colorScheme": "dark",
  "imageWidth": 1179,
  "imageHeight": 2556,
  "bytes": 48213,
  "key": "screenshot-example.com-0caaf24ab1.png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/screenshot-example.com-0caaf24ab1.png",
  "capturedAt": "2026-10-16T10:00:00.000Z",
  "error": null,
  "errorMessage": null
}
```

A failed page keeps the same columns, with `fileUrl: null` and an `error` code: `INVALID_URL`, `NAVIGATION_FAILED`, `BLOCKED`, `HTTP_ERROR`, `CAPTURE_FAILED`, or `SPENDING_LIMIT` for pages skipped once the run reached its maximum cost.

### Pricing

Pay per event: one **Screenshot** event per captured PNG or JPEG, one **PDF** event per PDF. Invalid URLs, pages that fail to load, answer 5xx or block the request after retries, and pages skipped at your spending limit are free. Pages that answer 4xx, such as a 404, are captured as they render and charged; `httpStatus` shows the code. Current prices are on the **Pricing** tab. Set a maximum cost per run in the run options and the Actor stops there.

### Tips

- Large batches: give the run 4 GB of memory or more, the Actor then captures more pages in parallel.
- Single-page apps: set **Wait until** to *Network idle* or add an **Extra delay**.
- Long pages are cut at **Max full-page height** (16384 px by default; at a 3x pixel ratio the browser limit is about 5400 CSS px).
- Sites that block datacenter traffic or show regional content: enable **Proxy**.

### Integrations

Use the Apify API, scheduler, webhooks and integrations (Zapier, Make, n8n, Google Drive and others) to run captures on a schedule and send the files where you need them.

### Limits and fair use

The Actor opens public pages only and does not log in. You are responsible for having the right to capture the pages you request and for respecting the target sites' terms.

### Support

Found a page that renders wrong or a banner that is not hidden? Open an issue on the **Issues** tab with the URL and your input. Fixes ship quickly.

# Actor input Schema

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

Pages to capture, up to 1000 per run. A missing scheme defaults to https://. Duplicates are captured once.

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

PNG is lossless, JPEG is smaller, PDF renders the page as a document.

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

Capture the whole scrollable page instead of the first screen. Ignored for PDF.

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

Viewport size, pixel ratio, touch and user agent of the emulated device. Choose Custom to set your own viewport below.

## `colorScheme` (type: `string`):

Sets prefers-color-scheme, so sites with a dark theme render in dark mode.

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

Hides consent popups of the common consent platforms (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, Sourcepoint, CookieYes and more) and unlocks page scrolling.

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

Extra CSS selectors to hide before capture, for example chat widgets or promo bars.

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

Navigation is done when this event fires. Network idle is slower but safer for single-page apps.

## `delaySecs` (type: `integer`):

Wait this long after the page loads, for animations and late content.

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

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

## `navigationTimeoutSecs` (type: `integer`):

Maximum time to load one page.

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

How many times a page that failed to load or answered 5xx is retried. Failed pages are not charged.

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

Only for JPEG output.

## `maxHeightPx` (type: `integer`):

Very long pages are cut at this height. High pixel ratio devices are limited further to 16384 image pixels.

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

Only for PDF output.

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

Only for PDF output.

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

Used when Device is Custom viewport.

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

Used when Device is Custom viewport.

## `deviceScaleFactor` (type: `number`):

Used when Device is Custom viewport. 2 gives a retina-sharp image.

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

Upper bound for pages captured at once. The actual parallelism also depends on run memory: give 4 GB or more for large batches.

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

Use a proxy for sites that block datacenter traffic or show region-specific content.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "format": "png",
  "fullPage": true,
  "device": "desktop-1920",
  "colorScheme": "light",
  "hideCookieBanners": true,
  "hideSelectors": [],
  "waitUntil": "load",
  "delaySecs": 0,
  "scrollToBottom": false,
  "navigationTimeoutSecs": 60,
  "maxRetries": 2,
  "jpegQuality": 80,
  "maxHeightPx": 16384,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "deviceScaleFactor": 1,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per URL: file link, HTTP status, page title, device, image size, or an error code for pages that failed.

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

PNG, JPEG or PDF files named screenshot-<host>-<hash>.<ext>.

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

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

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

```

## MCP server setup

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