# SiteVerdict — Website Screenshot & PDF Renderer (`siteverdict/siteverdict-screenshot-pdf-render`) Actor

Full-page PNG/JPEG screenshots and print-ready PDFs of any public URL. Desktop, tablet and mobile presets, dark mode, wait-for-selector, lazy-load scroll, cookie banners rejected via the site's own button, visual change alerts. SSRF guard on all browser traffic.

- **URL**: https://apify.com/siteverdict/siteverdict-screenshot-pdf-render.md
- **Developed by:** [Aman Thakran](https://apify.com/siteverdict) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## SiteVerdict — Website Screenshot & PDF Renderer

**Full-page screenshots and print-ready PDFs of any public web page — on desktop, tablet or phone, in light or dark mode — with cookie banners dismissed the honest way and optional alerts when a page visually changes.**

Paste URLs, pick formats, get files. Each capture is saved to the run's key-value store with a public link, plus an evidence record (final URL after redirects, HTTP status, timestamps, console errors, what was clicked) so you have a dated record for client reports or your own files (not a certified legal capture).

### What you get

- **PNG, JPEG and/or PDF** per URL (full page or first screen; A4/Letter/Legal/A3, landscape, backgrounds, print or screen CSS).
- **Device presets**: desktop 1920/1440, laptop 1280, tablet 820×1180 @2x, phones 390×844 @3x and 412×915 — or any custom viewport and scale.
- **Dark mode** (`prefers-color-scheme: dark`) for sites that have a dark theme.
- **Wait controls**: load / DOM ready / network idle, wait for a CSS selector, extra delay, scroll to load lazy images.
- **Cookie banners**: if the site shows a clearly labelled **"Reject all" / "Only necessary"** button (or a known consent-platform reject button), we click it. We never click "Accept", never fake consent cookies.
- **Hide your own clutter**: CSS selectors to hide (chat widgets, sticky promos) in your capture.
- **Visual change monitoring**: schedule the Actor; each PNG is compared with the previous run, you get `% pixels changed`, a red-highlighted diff image, and an optional Slack/HTTPS alert.
- **Evidence**: final URL + redirect chain, HTTP status, start/load timestamps, page height, console errors, failed requests, the honest User-Agent used, SHA-256 of every file.

### Who it is for

- **Agencies & SEO/CRO teams**: before/after snapshots of client pages on every device; monthly visual reports.
- **Compliance & legal**: dated captures of terms, prices and claims with hashes and redirect chains.
- **Product & QA teams**: visual regression monitoring of public pages with alerts.

### Quick start

```json
{
  "urls": [{ "url": "https://www.gov.uk/" }],
  "formats": ["png", "pdf"],
  "device": "mobile-iphone",
  "colorScheme": "dark"
}
```

Monitoring (schedule daily):

```json
{
  "urls": [{ "url": "https://example.com/pricing" }],
  "changeDetection": true,
  "changeThresholdPercent": 1,
  "alertWebhookUrl": "https://hooks.slack.com/services/…"
}
```

### Output (one item per URL)

```json
{
  "url": "https://www.gov.uk/",
  "finalUrl": "https://www.gov.uk/",
  "status": "ok",
  "httpStatus": 200,
  "title": "Welcome to GOV.UK",
  "device": "desktop-1440",
  "viewport": { "width": 1440, "height": 900, "deviceScaleFactor": 1 },
  "colorScheme": "light",
  "files": [
    { "format": "png", "key": "shot-0001-www.gov.uk-desktop-1440.png", "url": "https://api.apify.com/v2/key-value-stores/…/records/shot-0001-www.gov.uk-desktop-1440.png", "bytes": 412337, "width": 1440, "height": 3120, "clippedAtMaxHeight": false, "sha256": "…" }
  ],
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/…/records/shot-0001-www.gov.uk-desktop-1440.png",
  "change": { "baseline": false, "changed": true, "diffPercent": 3.42, "diffImageUrl": "…-diff.png" },
  "evidence": { "startedAt": "…", "loadedAt": "…", "elapsedMs": 4210, "consoleErrors": 0, "blockedPrivateRequests": 0, "cookieBanner": { "action": "rejected", "via": "button label", "label": "Reject additional cookies" }, "redirectChain": ["https://www.gov.uk/"], "pageHeight": 3120, "userAgent": "Mozilla/5.0 (X11; Linux x86_64) … HeadlessChrome/… SiteVerdictBot/1.0.0 SiteVerdict/screenshot-pdf-render (+hello@webrevenuescan.com)" },
  "charged": ["screenshot-captured"]
}
```

Every URL you send gets exactly one dataset row. Statuses that are **never charged**: `blocked` (robots.txt, bot protection/CAPTCHA, HTTP 401/403, private address — including a redirect to one) and `error` (timeouts, 4xx/5xx, missing wait selector). URLs that are not processed also get a free row: `skipped_budget` (your maximum total charge was reached first; the status message says "N not processed (max total charge reached)"), `invalid_url` (not an http(s) URL) and `skipped_limit` (more than 2,000 URLs in one run). A URL is only rendered when the budget covers all of its files (e.g. PNG + PDF), so you are never charged past your maximum.

### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| `screenshot-captured` | $0.002 | each PNG or JPEG file delivered |
| `pdf-rendered` | $0.003 | each PDF delivered |

Examples: **1,000 desktop screenshots ≈ $2**; 100 pages as PNG + PDF ≈ $0.50; daily monitoring of 20 pages for 30 days ≈ $1.20. Change detection and alerts are included.

### FAQ

**Does it get past Cloudflare / CAPTCHAs?** No, by design. Challenge pages are reported as `blocked` and are free. We use an honest `HeadlessChrome … SiteVerdictBot` User-Agent and no rotating/residential proxies or fingerprint tricks (the only proxy is a local SSRF guard inside the run).

**Why was a page `blocked` by robots.txt?** We obey robots.txt for our `SiteVerdictBot` token. Site owners can allow it with `User-agent: SiteVerdictBot` / `Allow: /`.

**Can I screenshot pages behind a login?** No. Public pages only.

**How does the cookie-banner step work?** After load we look for a known consent-platform reject button (OneTrust, Cookiebot, Didomi, Usercentrics, Google Funding Choices, Quantcast, Complianz, CookieYes, Osano, Klaro, iubenda, TrustArc) or a visible button whose entire label is a reject phrase (EN/DE/FR/ES/IT/NL/PT). If there is none, the banner stays — the capture shows what a first-time visitor sees. The evidence records what happened.

**MCP / agents?** Yes: `capture_screenshot` (see MCP-TOOL.md).

### Limits

- Max 2,000 URLs per run; full-page height capped at 20,000 px (default 16,000); navigation timeout up to 90 s.
- Very long infinite-scroll pages are clipped; video/canvas content is captured as rendered at that moment.
- Sites that require a login, solve-a-challenge or geo-specific access are not captured.

### Sources & compliance

- **Target sites:** public pages only, fetched with an honest User-Agent (`HeadlessChrome/<version> … SiteVerdictBot/1.0.0 SiteVerdict/screenshot-pdf-render (+hello@webrevenuescan.com)`), robots.txt (RFC 9309) checked for the page and every main-frame redirect (a disallowed redirect target may already have been requested by the browser; nothing is captured or charged). Bot protection is never bypassed. You are responsible for how you use captures of third-party pages (copyright, trademarks, terms of the site).
- **Security:** every browser connection (page, every redirect hop, frames, images, scripts, XHR, WebSockets, popups) goes through a local egress guard that refuses private, loopback, link-local/cloud-metadata and reserved addresses and connects only to the address it checked (so a DNS name cannot switch to an internal address after the check). A page or redirect that leads to such an address is reported `blocked` with nothing captured. Known limit: a public page's own redirect is requested from that public server before we see where it points — we refuse the next hop, never the public request itself. No downloads, no service workers, no permissions, WebRTC limited to proxied traffic; user CSS selectors are validated before injection; webhook HTTPS only.
- **Personal data / UK GDPR & PECR:** screenshots can show personal data that a page publishes. Capture only what you need, store it securely, and delete it when no longer needed. Rejecting cookie banners means fewer tracking cookies are set during capture. Not legal advice.
- **Software:** Playwright (Apache-2.0) with Chromium, pixelmatch (ISC), pngjs (MIT).

Built by SiteVerdict (BharatFare Travel and Technologies Ltd, UK). Contact: hello@webrevenuescan.com.

# Changelog

This Actor's version history is a separate document: https://apify.com/siteverdict/siteverdict-screenshot-pdf-render/changelog.md

# Actor input Schema

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

Public pages to capture.

## `formats` (type: `array`):

Any combination of png, jpeg and pdf. Each file is charged separately.

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

Viewport preset. Mobile/tablet presets use touch + mobile layout.

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

Capture the whole scrollable page (capped by Max full-page height). Off = first screen only.

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

Emulates prefers-color-scheme, so sites with a dark theme render dark.

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

Page readiness before capture.

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

CSS selector that must be visible before capture, e.g. #main or .price.

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

Wait after load (animations, fonts).

## `rejectCookieBanners` (type: `boolean`):

Clicks the site's OWN 'Reject all' / 'Only necessary' button when it is easy to identify. Never clicks Accept. Off = page as a first-time visitor sees it.

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

Optional: elements to hide in YOUR capture, e.g. a chat widget (.intercom-launcher).

## `scrollToLoadLazy` (type: `boolean`):

Scrolls the page once before a full-page capture.

## `blockAds` (type: `boolean`):

Skips requests to a short list of ad servers (faster, cleaner captures).

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

Overrides the preset width.

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

Overrides the preset height.

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

2 = retina-sharp images (4x pixels).

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

JPEG only.

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

Longer pages are clipped (flagged in the output).

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

PDF only.

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

PDF only.

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

Keep background colours/images.

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

'print' uses the site's print stylesheet; 'screen' looks like the browser view.

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

All sides.

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

Per page.

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

Pages rendered in parallel.

## `changeDetection` (type: `boolean`):

Compare each PNG with the previous run's (same URL, device and colour scheme) and report % of pixels changed, with a diff image. Schedule the Actor to monitor pages.

## `monitorName` (type: `string`):

Separate baselines for different monitors.

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

Pages changing more than this are flagged and alerted.

## `alertWebhookUrl` (type: `string`):

Optional. Receives a message listing changed pages. HTTPS only. Stored encrypted.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.gov.uk/"
    }
  ],
  "formats": [
    "png"
  ],
  "device": "desktop-1440",
  "fullPage": true,
  "colorScheme": "light",
  "waitUntil": "load",
  "delayMs": 500,
  "rejectCookieBanners": true,
  "hideSelectors": [],
  "scrollToLoadLazy": true,
  "blockAds": false,
  "jpegQuality": 80,
  "maxFullPageHeight": 16000,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfMedia": "print",
  "pdfMarginMm": 10,
  "navigationTimeoutSecs": 45,
  "maxConcurrency": 2,
  "changeDetection": false,
  "monitorName": "default",
  "changeThresholdPercent": 0.5
}
```

# Actor output Schema

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

No description

## `output` (type: `string`):

No description

## `files` (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": [
        {
            "url": "https://www.gov.uk/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("siteverdict/siteverdict-screenshot-pdf-render").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://www.gov.uk/" }] }

# Run the Actor and wait for it to finish
run = client.actor("siteverdict/siteverdict-screenshot-pdf-render").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://www.gov.uk/"
    }
  ]
}' |
apify call siteverdict/siteverdict-screenshot-pdf-render --silent --output-dataset

```

## MCP server setup

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

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/2RhrNVu03SfMeWuBw/builds/maiTSWGdjde8AV1X2/openapi.json
