# Website Screenshot API – Full Page & PDF (`tidyrun/web-screenshot`) Actor

Full-page website screenshots and PDFs for many URLs on desktop, tablet and mobile. Lazy images loaded, cookie banners hidden. Optional visual change alerts. $3 per 1,000 screenshots; failed pages free.

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

## Pricing

from $3.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 API – Full Page & PDF

Capture **full-page screenshots and PDFs of many URLs on desktop, tablet and mobile in one run**. Lazy images are loaded, cookie banners are hidden and sticky headers don't repeat down the page. Turn on **change detection** and every run tells you which pages changed visually since the last one, with a highlighted diff image.

**$3 per 1,000 screenshots. Failed pages are free.**

### Quick start

1. Add your **URLs** (bare domains like `example.com` work).
2. Pick **Devices**: desktop, laptop, wide, tablet, mobile.
3. Optional: tick **Also save a PDF** or **Detect visual changes**.
4. Click **Start**. The **Output** tab shows every screenshot as a preview with a link to the full image.

Input example:

```json
{
    "urls": [{ "url": "https://stripe.com" }, { "url": "https://www.python.org" }],
    "devices": ["desktop", "mobile"],
    "pdf": true
}
```

One output row per URL and device:

```json
{
    "url": "https://www.python.org/",
    "device": "desktop",
    "statusCode": 200,
    "title": "Welcome to Python.org",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../records/www-python-org-3f1c2a9b7e-desktop.png",
    "imageWidth": 1366,
    "imageHeight": 2546,
    "truncatedAtMaxHeight": false,
    "pdfUrl": "https://api.apify.com/v2/key-value-stores/.../records/www-python-org-3f1c2a9b7e-print.pdf",
    "error": null
}
```

### Why this one

| Common problem | What happens here |
| --- | --- |
| One screenshot per run, one device | Paste a list of URLs and pick several devices; you get one row per URL × device. |
| Grey boxes where images should be | The page is scrolled first so lazy-loaded images render. |
| Cookie pop-ups covering the page | Common consent banners are hidden (OneTrust, Cookiebot, Didomi, Usercentrics and more). Nothing is clicked or accepted. |
| Sticky header repeated or covering content | Fixed and sticky elements are pinned so the full-page image reads naturally. |
| Emoji and non-Latin text show as boxes | Emoji, Thai, Chinese, Japanese and Korean fonts are installed. |
| Paying for pages that failed | Failed pages are **never charged**. Errors say what to fix. |
| Need to know when a page changes | **Detect visual changes** compares with the previous run and returns `changed`, `changedPercent` and a diff image. |

### Monitor pages for visual changes

Turn on **Detect visual changes** and put the Actor on a **Schedule** (for example daily). The first run saves a baseline; every later run compares against the previous screenshot of the same URL and device:

```json
"change": { "status": "compared", "changed": true, "changedPercent": 3.42, "previousCapturedAt": "2026-10-08T09:00:00.000Z", "diffUrl": "https://api.apify.com/v2/key-value-stores/.../records/example-com-1a2b3c4d5e-desktop-diff.png" }
```

Connect a Slack, email or webhook integration to get alerted when `changed` is `true`. Baselines live in a named key-value store in your own account (`screenshot-baselines` by default); use a different **Baseline store name** to keep separate monitors.

### Pricing

| Event | Price |
| --- | --- |
| Screenshot (captures taller than 15,000 px count as 2) | $0.003 |
| PDF | $0.003 |
| Change check (comparison with the previous run) | $0.001 |

So 1,000 full-page screenshots cost $3; only very long pages (over 15,000 px captured) count twice. Set **Maximum height** to 15,000 to never pay double. Pages that fail to load are free, and the run stops cleanly at your maximum charge limit.

### Call it from your code

```bash
curl -X POST "https://api.apify.com/v2/acts/tidyrun~web-screenshot/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":[{"url":"https://example.com"}]}'
```

### Tips

- Full-page shots stop at **Maximum height** (20,000 px by default); `truncatedAtMaxHeight` tells you when that happened.
- Use **JPEG** for much smaller files when you don't need pixel-perfect images.
- If a page keeps loading forever (chat widgets, live tickers), set **Wait until** to "DOM ready" and add an **Extra delay**.

### Responsible use

This Actor opens public pages in a normal browser, like a visitor would. It does not log in, solve CAPTCHAs or get around bot protection; pages that block automated browsers are reported as errors and not charged. Make sure you have the right to capture and store the pages you list, and respect each site's terms.

# Actor input Schema

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

Pages to capture. Bare domains like example.com work too.

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

One screenshot per URL per device.

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

Capture the whole scrolling page instead of only the first screen.

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

PNG is pixel-perfect; JPEG files are several times smaller.

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

One A4 PDF per URL, printed with backgrounds.

## `detectChanges` (type: `boolean`):

Compare with the previous run's screenshot of the same URL and device. Returns changed true/false, the percent of the page that changed and a diff image. The first run only saves the baseline.

## `changeThresholdPercent` (type: `number`):

A page counts as changed when more than this percent of its pixels differ.

## `baselineStoreName` (type: `string`):

Named key-value store in your account that keeps the previous screenshots for change detection. Use different names to keep separate monitors.

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

Hides common consent pop-ups (OneTrust, Cookiebot, Didomi, Usercentrics and others). Nothing is clicked or accepted.

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

Extra elements to hide, e.g. .chat-widget or #newsletter-popup.

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

Scrolls through the page first so lazy-loaded images appear in full-page shots.

## `fixStickyElements` (type: `boolean`):

Stops fixed and sticky headers from repeating or covering content in full-page shots.

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

When the page counts as loaded. Use "DOM ready" for pages that never stop loading.

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

Optional CSS selector to wait for before capturing.

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

Wait this long after loading, e.g. for animations.

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

Full-page shots stop at this height and the row is flagged truncatedAtMaxHeight. Captures taller than 15,000 px count as 2 screenshots.

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

Only used for JPEG. Lower means smaller files.

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

How long to wait for a page to load before giving up (not charged).

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://www.python.org"
    }
  ],
  "devices": [
    "desktop"
  ],
  "fullPage": true,
  "format": "png",
  "pdf": false,
  "detectChanges": false,
  "changeThresholdPercent": 0.1,
  "baselineStoreName": "screenshot-baselines",
  "hideCookieBanners": true,
  "scrollToLoad": true,
  "fixStickyElements": true,
  "waitUntil": "load",
  "delayMs": 0,
  "maxHeight": 20000,
  "jpegQuality": 80,
  "timeoutSecs": 60
}
```

# Actor output Schema

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

One row per URL and device: screenshotUrl, pdfUrl, change status and percent, page title, HTTP status and any error.

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

Counts of screenshots, PDFs, change checks, changed pages and failures.

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

All screenshots, PDFs and diff images saved by this run.

# 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"
        },
        {
            "url": "https://www.python.org"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidyrun/web-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" },
        { "url": "https://www.python.org" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tidyrun/web-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"
    },
    {
      "url": "https://www.python.org"
    }
  ]
}' |
apify call tidyrun/web-screenshot --silent --output-dataset

```

## MCP server setup

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