# Website Screenshot & PDF API with Visual Change Monitor (`zhtech/website-screenshot-monitor`) Actor

Full page or viewport screenshots and PDFs from URLs, sitemaps or datasets. Device presets, cookie banner hiding, and visual change alerts with pixel diff.

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

## Pricing

from $0.70 / 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 API with Visual Change Monitor

Take **full page or viewport screenshots** (PNG, JPEG, WebP) and **PDFs** of any list of URLs, a **sitemap**, or a **dataset** from another Actor. Pick a device (desktop, laptop, tablet, phone), dark mode, hide cookie banners, ads and chat bubbles, or capture a **single element** by CSS selector. Turn on **monitor mode** and the Actor compares every page with its last capture and tells you **only what changed visually**, with the changed percentage and a highlighted diff image.

Every file is saved to the run's key-value store and each dataset row has a public link to it plus the page title, final URL, HTTP status, width, height and size. **Failed, blocked or skipped pages are never charged.**

### What you can do with it

- **Visual change monitoring**: watch competitor pricing pages, landing pages, terms of service or your own site and get only the pages that changed. Schedule it hourly or daily.
- **Website QA and regression checks**: capture every page of a sitemap on phone and desktop after each deploy and compare with yesterday.
- **Archiving and compliance**: save PDFs or full page images of web pages with a timestamp.
- **Thumbnails and previews**: viewport shots of hundreds of sites for directories, link previews or reports.
- **Client reporting**: agencies capture client sites, ads landing pages or SERP adjacent pages in bulk.
- **AI agents**: give an LLM agent an image or PDF of any page through the Apify API or MCP server.

### Why this Actor

| | This Actor | Typical screenshot Actor |
|---|---|---|
| Full page that really works | Scrolls to load lazy images, unrolls inner scrollers, stitches very tall pages | Often stops at the first screen or shows blank lazy images |
| Failed or blocked pages | Free, with a clear reason | Often charged anyway |
| Bulk input | URL list, sitemap (index and .gz), dataset ID | URL list |
| Big jobs | Persisted queue, memory aware concurrency, image work serialized | Memory errors reported on large lists |
| Change monitor | Built in: pixel diff, changed %, diff image, only changed pages output | Not available |
| Clean captures | Cookie banners (40+ consent platforms), ads, chat widgets, custom selectors | Partial or none |

### How to use

1. Paste URLs (or a sitemap URL, or a dataset ID).
2. Pick the format, full page or not, and the device.
3. Run. Open the **Overview** tab to see thumbnails, or the key-value store for the files.

With no input at all the Actor captures https://example.com and https://apify.com (desktop viewport) so you can see the output format.

#### Monitor mode in 3 steps

1. Turn on **Visual change monitor** and give the baseline store a name per project (for example `client-acme`).
2. Run once. Every page is saved as a baseline (`monitorStatus: "baseline"`).
3. Schedule the same input. Each run outputs only pages that changed (`monitorStatus: "changed"`) with `changedPercent`, `diffImageUrl` (changes in red) and `previousImageUrl`. Unchanged pages produce no row and cost only the small `monitor-unchanged` price. Hook the run to a webhook, Slack or email integration to get alerts.

Tips: blank out areas that change on every visit (dates, carousels, live counters) with **Ignore these areas**. The default sensitivity catches a single changed word; raise **Changed if more than** to 1 to 5 percent for busy pages.

### Input example

```json
{
    "urls": ["https://example.com", "https://apify.com/pricing"],
    "sitemapUrls": [],
    "format": "png",
    "fullPage": true,
    "device": "phone",
    "darkMode": false,
    "hideCookieBanners": true,
    "hideAds": true,
    "waitUntil": "load",
    "delayMs": 1000,
    "monitorMode": false
}
```

Element capture: `"selector": "#pricing"`. PDF: `"format": "pdf", "pdfFormat": "Letter"`. Sitemap: `"sitemapUrls": ["https://example.com/sitemap.xml"], "maxUrls": 500, "includeUrlPatterns": ["/blog/"]`. Dataset: `"datasetId": "<dataset id>", "datasetUrlField": "url"`.

### Output example

```json
{
    "url": "https://httpbin.org/uuid",
    "finalUrl": "https://httpbin.org/uuid",
    "status": "ok",
    "httpStatus": 200,
    "title": null,
    "captureType": "viewport",
    "format": "png",
    "device": "laptop",
    "viewportWidth": 1366,
    "viewportHeight": 768,
    "deviceScaleFactor": 1,
    "darkMode": false,
    "width": 1366,
    "height": 768,
    "bytes": 7688,
    "pdfPages": null,
    "pageHeight": 768,
    "truncated": false,
    "fileKey": "httpbin-org-uuid-251c473fc9.png",
    "fileUrl": "https://api.apify.com/v2/key-value-stores/<store id>/records/httpbin-org-uuid-251c473fc9.png",
    "monitorStatus": "changed",
    "changedPercent": 0.049,
    "changedPixels": 510,
    "sizeChanged": false,
    "diffImageUrl": "https://api.apify.com/v2/key-value-stores/<store id>/records/httpbin-org-uuid-251c473fc9-diff.jpg",
    "previousImageUrl": "https://api.apify.com/v2/key-value-stores/<store id>/records/httpbin-org-uuid-251c473fc9-previous.png",
    "previousCapturedAt": "2026-11-23T07:00:39.918Z",
    "blockedBy": null,
    "error": null,
    "chargedEvent": "screenshot",
    "loadTimeMs": 1484,
    "capturedAt": "2026-11-23T07:01:16.851Z"
}
```

`status` values: `ok` (captured and charged), `robots_disallowed`, `bot_protected`, `http_error`, `selector_not_found`, `invalid_url`, `blocked_private_address`, `error`. Only `ok` is charged. A `SUMMARY` record in the key-value store has counts per status and the charged events.

### Pricing

Pay per event, you only pay for captures that were saved:

- `actor-start`: once per run.
- `screenshot`: each viewport or element screenshot (also monitor baselines and changed pages in viewport mode).
- `screenshot-fullpage-or-pdf`: each full page screenshot or PDF (also monitor baselines and changed pages in full page mode).
- `monitor-unchanged`: each monitored page that did not change. Much cheaper than a capture.

Errors, timeouts, robots.txt skips, bot protection pages, HTTP error pages and missing selectors are free. Set a **maximum cost per run** in the run options: the Actor stops before it would go over it.

### FAQ

**Does full page work on lazy loading sites?** Yes. The page is scrolled step by step (adjust **Scroll step delay** for slow image servers), native lazy images are switched to eager, apps that scroll inside a 100vh container are unrolled, and pages taller than Chrome's capture limit are captured in slices and stitched. **Max full page height** (default 20,000 px) stops infinite feeds.

**Does it click "Accept cookies"?** No. It hides consent banners visually with CSS and never accepts, rejects or stores consent on your behalf. Some sites show a different layout until consent is given; you will see the page as a first time visitor does, without the banner on top.

**Can it log in or use my cookies?** No. Every page opens in a fresh private browser context. Only public pages are captured.

**What happens on sites with bot protection (Cloudflare, DataDome and similar)?** The challenge page is detected and the row is returned as `bot_protected`, free of charge. The Actor never tries to solve or get around a challenge.

**Does it respect robots.txt?** Yes, per domain, including redirect targets on other domains. Disallowed pages get a free `robots_disallowed` row.

**Dark mode does nothing on some sites.** Dark mode tells the site the visitor prefers dark colors. Only sites that ship a dark theme respond to it.

**How big can a run be?** Up to 100,000 URLs per run. URLs are queued in batches and processed a few at a time, so memory stays flat. For more than 3 parallel pages, give the run more than 2 GB.

**Where are the files kept?** In the run's default key-value store (kept as long as your Apify plan keeps run storage). Monitor baselines are in the named store you choose and persist between runs; delete that store to reset a monitor.

### Limitations

- Pages behind logins, paywalls or bot challenges are not captured (by design).
- PDF and screenshots use Chromium only; Safari or Firefox specific rendering is not available.
- Video and canvas animations are captured as a single frame. CSS animations are paused for stable captures.
- Some geo dependent pages look different from your location; use a datacenter proxy with a country if needed.
- Very large full page PNGs can be several MB; use JPEG or WebP for big batches.

### API and integrations

Run it from any language with the Apify API, then read the dataset:

```bash
curl -X POST "https://api.apify.com/v2/acts/zhtech~website-screenshot-monitor/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com"],"fullPage":true,"format":"jpeg"}'
```

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('zhtech/website-screenshot-monitor').call({ urls: ['https://example.com'], device: 'phone' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].fileUrl);
```

**LLM agents and MCP**: add this Actor to the Apify MCP server (`https://mcp.apify.com`) and an agent can call it with a list of URLs and get back image or PDF links to look at. Zapier, Make, n8n and webhooks work through the standard Apify integrations; for change alerts, trigger on "run succeeded" and send the dataset items (which only contain changed pages).

### Private network protection

Every request the browser makes goes through a small built in guard proxy. Before connecting, it resolves the host and refuses localhost, private ranges (10/8, 172.16/12, 192.168/16), link local and cloud metadata (169.254.169.254), carrier grade NAT, multicast, IPv6 loopback, unique local and link local addresses, and IPv4 mapped, NAT64 and 6to4 forms of those. That covers the page itself, every redirect hop, meta refresh and script redirects, iframes, images, workers and WebSockets, and the connection goes to the exact address that was checked (no DNS rebinding window). A URL that points or redirects to such an address returns a free `blocked_private_address` row. Internal requests made by an otherwise public page are simply blocked and the page is captured without them.

### Responsible use

Capture only pages you are allowed to view publicly. The Actor respects robots.txt, refuses private network addresses (every request the page makes is checked, including redirects, so a public page cannot pull in localhost, internal ranges or cloud metadata), does not bypass bot protection and does not use logins. Built by ZH Tech.

# Actor input Schema

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

Page URLs or plain domains, one per line, e.g. "https://example.com/pricing" or "example.com". Leave empty to use a sitemap or dataset below. With no input at all the Actor captures https://example.com and https://apify.com as a demo.

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

Optional. XML sitemaps (index files and .xml.gz work) or a site home page, in which case the sitemaps listed in its robots.txt (or /sitemap.xml) are used. URLs are queued in batches, so sitemaps with thousands of pages are fine.

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

Optional. ID or name of an Apify dataset (for example the output of another Actor). Each item's URL field is captured.

## `datasetUrlField` (type: `string`):

Which field of each dataset item holds the URL.

## `includeUrlPatterns` (type: `array`):

Optional filter for sitemap and dataset URLs. Plain text ("/blog/"), globs ("https://example.com/docs/\*") or a regex in slashes ("//products/\d+/"). URLs you type in the list above are always captured.

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

Upper limit for the number of pages captured in this run (all sources together).

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

PNG is lossless (best for monitoring and design review). JPEG and WebP are much smaller. PDF prints the page to a document.

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

Capture the whole page, not just the first screen. The page is scrolled first so lazy loaded images and sections appear, then captured (pages taller than Chrome's limit are captured in slices and stitched). Charged at the full page price.

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

Optional. Captures just the first visible element that matches, e.g. "#pricing", "main" or ".hero". If nothing matches, the row says selector_not_found and is not charged.

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

1 to 100. Ignored for PNG and PDF.

## `maxFullPageHeight` (type: `integer`):

Stops endless pages (infinite scroll feeds) from producing gigantic images. Taller pages are cut here and the row has truncated = true.

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

Desktop 1920x1080, Laptop 1366x768, Tablet 820x1180 (2x), Phone 390x844 (2x, mobile layout and touch).

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

Optional. Overrides the device width in CSS pixels. 0 = use the device preset.

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

Optional. Overrides the device height in CSS pixels. 0 = use the device preset.

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

Optional. 2 gives retina sharp images (4x the pixels). 0 = use the device preset.

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

Tells the page the visitor prefers a dark color scheme (prefers-color-scheme: dark). Sites with a dark theme switch to it; sites without one look the same.

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

Hides consent popups from common platforms (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast and many more) plus fixed overlays that talk about cookies or consent. It only hides them visually; it never clicks accept or reject for you.

## `hideAds` (type: `boolean`):

Blocks requests to common ad networks and hides ad slots, so captures are cleaner and faster.

## `hideChatWidgets` (type: `boolean`):

Hides chat bubbles such as Intercom, Drift, HubSpot, Crisp, Tidio, Zendesk and Tawk.

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

Optional. Anything else you want removed from the picture, e.g. ".newsletter-modal", "#promo-bar".

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

Page loaded (default) waits for the load event. Network idle also waits until requests calm down (best for dashboards and single page apps). Both are best effort with a time cap, so a chatty page never fails the capture.

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

Pause after loading, for animations and late content.

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

Optional. Waits up to 15 seconds for this element to be visible before capturing.

## `scrollDelayMs` (type: `integer`):

Pause between scroll steps while loading lazy content. Raise it for slow image CDNs.

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

How long to wait for the page to start rendering. Timed out pages are reported and not charged.

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

Only used when the format is PDF.

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

Landscape orientation for PDF output.

## `pdfPrintBackground` (type: `boolean`):

Include background colors and images in the PDF.

## `pdfMediaType` (type: `string`):

Screen makes the PDF look like the website. Print uses the site's print stylesheet (often plain text).

## `pdfMarginMm` (type: `integer`):

Margin on all sides.

## `monitorMode` (type: `boolean`):

Compares every capture with the previous one for the same URL and settings (stored in a named key-value store that persists between runs). The first run saves baselines. Later runs output only pages that changed, with the changed percentage and a diff image. Schedule the Actor (daily, hourly) to get alerts.

## `monitorStoreName` (type: `string`):

Named key-value store that keeps the last capture of each page. Use a different name per project or client to keep monitors separate.

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

A page counts as changed when more than this share of its pixels differ (and at least 10 pixels changed). 0 catches any visible change, even one price or word (a changed ID line measured 0.055% in tests). Raise to 1 to 5 for busy pages with rotating content.

## `pixelThreshold` (type: `number`):

How different two pixels must be to count as changed (0 = exact, 1 = very lenient). 0.1 is a good default.

## `monitorIgnoreSelectors` (type: `array`):

Optional. Elements that change on every visit (dates, carousels, stock tickers, "x people viewing") are blanked out before comparing, e.g. ".carousel", "#live-counter".

## `outputUnchanged` (type: `boolean`):

By default unchanged pages produce no row (they are billed at the small monitor-unchanged price). Turn on to get a row for every page.

## `saveDiffImage` (type: `boolean`):

For changed pages, save an image with the changed pixels highlighted in red.

## `updateBaseline` (type: `string`):

On change: the next run compares with the latest changed version (alerts once per change). Never: always compare with the first capture (alerts every run until you reset the store).

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

How many pages load at once. 3 is polite and fits 2 GB of memory; use more memory for higher values.

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

Off by default (direct connection). Datacenter proxy can help with rate limits or geo specific content. Proxies are never used to get past bot protection.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://apify.com"
  ],
  "datasetUrlField": "url",
  "maxUrls": 100,
  "format": "png",
  "fullPage": false,
  "quality": 80,
  "maxFullPageHeight": 20000,
  "device": "desktop",
  "viewportWidth": 0,
  "viewportHeight": 0,
  "deviceScaleFactor": 0,
  "darkMode": false,
  "hideCookieBanners": true,
  "hideAds": true,
  "hideChatWidgets": false,
  "waitUntil": "load",
  "delayMs": 1000,
  "scrollDelayMs": 200,
  "navigationTimeoutSecs": 30,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfMediaType": "screen",
  "pdfMarginMm": 0,
  "monitorMode": false,
  "monitorStoreName": "screenshot-monitor",
  "changeThresholdPercent": 0,
  "pixelThreshold": 0.1,
  "outputUnchanged": false,
  "saveDiffImage": true,
  "updateBaseline": "on-change",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `changes` (type: `string`):

No description

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

No description

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

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

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

```

## MCP server setup

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

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/1j3PfBdYb6NroahPQ/builds/4qxLnyqryXIjKRfqM/openapi.json
