# Page Screenshot & PDF Capture (`clearrun/page-screenshot`) Actor

Full-page screenshots and PDFs of any URL. Scrolls to trigger lazy-loaded images, hides cookie banners, supports custom viewports, delays and dark mode. Returns a hosted image/PDF URL per page.

- **URL**: https://apify.com/clearrun/page-screenshot.md
- **Developed by:** [Clearrun Data](https://apify.com/clearrun) (community)
- **Categories:** Automation, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 screenshot or pdfs

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Page Screenshot & PDF Capture

Turn any list of URLs into full-page screenshots or PDFs, ready to download or embed. Built for reliability:
no third-party site dependencies, real Chromium rendering, lazy-load scrolling, cookie-banner removal, dark mode,
custom viewports and delays.

### What you get

One dataset row per URL with a hosted file link:

```json
{
  "url": "https://apify.com/",
  "title": "Apify: Full-stack web scraping and data extraction platform",
  "format": "png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/.../records/apify.com.png",
  "width": 1280,
  "height": 6120,
  "capturedAt": "2026-09-08T14:02:11.512Z",
  "error": null
}
```

Files live in the run's key-value store, so the link works from your own code, Zapier, Make, or an AI agent.

### Typical uses

- Visual change monitoring and QA archives
- Thumbnails for link previews, directories and newsletters
- Printable PDFs of articles, invoices and reports
- Evidence capture with timestamps (each row records the exact capture time)

### Input

| Field | Default | Notes |
|---|---|---|
| `urls` | — | List of pages to capture |
| `format` | `png` | `png`, `jpeg` or `pdf` |
| `fullPage` | `true` | Whole page vs first screen (PDF is always full page) |
| `viewportWidth` / `viewportHeight` | 1280 × 800 | Use 390 × 844 for a phone-sized capture |
| `delayMs` | 1000 | Extra wait after load |
| `scrollToLoad` | `true` | Scrolls first so lazy images render |
| `hideCookieBanners` | `true` | Removes common consent overlays |
| `darkMode` | `false` | Emulates dark colour scheme |
| `proxyConfiguration` | off | Turn on Apify Proxy for sites that block data-centre traffic |

### Pricing

Pay per event: you are charged only for each screenshot or PDF actually produced. Failed pages are free and are
recorded in the dataset with an `error` field so you can retry them.

#### Speed & cost

About 30–60 seconds for 100 results; a 100-result run costs roughly $0.40 in events plus about $0.05–0.20 of
platform usage.

### Use from an AI agent

This Actor is available through the Apify MCP server. Ask your agent to "take a full-page screenshot of
https://example.com" and it will call this tool and return the file link.

### Support

Open an issue on the Issues tab. Issues are answered within one working day. Please include the URL that failed
and the run ID.

# Actor input Schema

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

Pages to capture. One screenshot or PDF is produced per URL.

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

PNG (lossless), JPEG (smaller) or PDF (printable, always full page).

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

Capture the whole scrollable page instead of just the first screen.

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

Browser width in pixels. 1280 is a typical laptop; 390 approximates a phone.

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

Browser height in pixels. Only matters when Full page is off.

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

Extra time to wait after the page loads, for animations or late content.

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

Scroll through the page before capturing so lazy-loaded images render.

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

Remove common cookie/consent overlays before capturing.

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

Emulate the prefers-color-scheme: dark setting.

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

1–100, JPEG only.

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

Use a proxy for sites that block data-centre traffic. Off by default to keep runs cheap.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com/"
    }
  ],
  "format": "png",
  "fullPage": true,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "delayMs": 1000,
  "scrollToLoad": true,
  "hideCookieBanners": true,
  "darkMode": false,
  "jpegQuality": 80,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One record per page: hosted URL of the screenshot/PDF plus metadata

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

The captured files, stored in the run's 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": [
        {
            "url": "https://apify.com/"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

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

```

## MCP server setup

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