# Website Screenshot & PDF Archive Generator (`erzia/website-screenshot`) Actor

Capture full-page website screenshots or PDFs and build a weekly competitor page archive with Apify Schedules. Get dated file links and hashes, with stable capture settings. $3 per 1,000 successful captures; failed captures are not billed.

- **URL**: https://apify.com/erzia/website-screenshot.md
- **Developed by:** [Erzia](https://apify.com/erzia) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 captures

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

### Weekly competitor page archive and visual monitoring

Save competitors' pricing, landing and product pages every week, then compare the dated images across runs. Each dataset row includes `capturedAt`, the file's `sha256`, and a download link. Download the files with the dataset manifest for a long-term archive; Apify retention settings still apply.

Create an Actor task with your competitor URLs, then add it to **Apify Schedules**. For example, choose UTC and cron **`0 9 * * 1`** to capture every Monday at 09:00 UTC. Reuse the same device, format, selectors and input each week. No schedule is created by this example.

At **$3 per 1,000 successful captures**, **20 pages weekly × 4 weeks = 80 captures/month = $0.24** in capture charges, with no start fee. A month with five scheduled Mondays costs 100 × $0.003 = $0.30. Any separately applicable Apify plan, storage or integration fees depend on your account.

Capture **full-page screenshots or PDFs** of any list of URLs in one run. Choose desktop, laptop, tablet or mobile, hide cookie banners and pop-ups, wait for the content you need. You **pay only for successful captures: $3 per 1,000.**

### What it's for

- **Weekly competitor archive**: schedule captures of competitors' pricing pages, landing pages or your own site.
- **Archiving and compliance**: keep dated PDFs or images of pages, terms and ads as evidence.
- **QA and design review**: check how pages look on mobile, tablet and desktop in one run.
- **Reports and previews**: generate thumbnails for link previews, catalogs or client reports.

### Quick start: a weekly page archive

1. Add one public page URL, choose desktop PNG and keep fullPage and stableCapture enabled.
2. Run and inspect ok, fileUrl, capturedAt and stabilizationNotes. Download the file and export the dataset manifest.
3. Save the checked configuration as a task. In Apify Schedules, add the task, select UTC and use 0 9 \* \* 1 for Mondays at 09:00. Enable the schedule and verify its next run.

```json
{
  "urls": [{"url": "https://apify.com/pricing"}],
  "device": "desktop",
  "format": "png",
  "fullPage": true,
  "stableCapture": true,
  "delaySeconds": 1
}
```

For a PDF task, change format to pdf; PDFs always include the full page. Saving a task does not create a schedule. Visual comparison and permanent file storage are separate steps.

### How it works

1. Add URLs (paste or upload a file).
2. Pick a **device** (`desktop` 1920×1080, `laptop` 1366×768, `tablet`, `mobile`) and a **format** (`png`, `jpeg` or `pdf`).
3. Optional: capture the **full page**, wait for a CSS selector, add a delay for animations, or **hide elements** such as cookie banners (`#cookie-banner, .popup`).
4. Run. Every capture is saved to the run's key-value store, and the dataset gets a row with a direct **file link**.

`stableCapture` defaults to **true**: CSS animations and transitions are disabled with an injected stylesheet, the Actor waits for `document.fonts.ready` within the configured timeout, and scrolls to the top. Each device has a fixed `deviceScaleFactor` (desktop/laptop/tablet: 1; mobile: 2). Optional `maskSelectors` paint dynamic elements black while preserving their layout, for both images and PDFs. `hideSelectors` remove elements from layout instead. Set `stableCapture: false` to disable the animation/font/scroll steps.

Stabilization is best effort: failed styles, font waits or scrolling do not fail a capture. If CSP blocks an injected stylesheet, the Actor tries the same rules through element style attributes; unsupported or blocked rules are skipped. This fallback cannot style pseudo-elements. CSP remains enforced. Any degraded step is reported in `stabilizationNotes`, and successful captures are billed as usual.

These settings reduce visual noise. They do not freeze JavaScript timers, video, live data or third-party content. PDF metadata can also affect file hashes. A different hash means the file bytes changed; it does not necessarily mean the visible page changed.

On a timeout or network error from `page.goto`, navigation is retried **once** using `waitUntil: "domcontentloaded"` and **1.5 times** the configured timeout. HTTP failures, selector failures and screenshot/storage errors are not retried. HTTP 4xx/5xx pages are reported as failed and are not billed. For HTTP 403/429/503, `captcha`, `cloudflare` or `access denied` in the title/body identifies a block page. This is a heuristic; it does not bypass protection or guarantee detection of every challenge.

The dataset view shows image previews, so you can scan results at a glance and export the list to Excel, CSV or JSON.

### Output

| Field | Example | Meaning |
|---|---|---|
| `url` | `https://example.com` | URL you provided |
| `ok` | `true` | Capture succeeded |
| `status` | `200` | HTTP status of the page |
| `finalUrl` | `https://example.com/` | URL after redirects |
| `title` | `Example Domain` | Page title |
| `format`, `device` | `png`, `desktop` | Capture settings |
| `sizeBytes` | `18211` | File size |
| `fileUrl` | `https://api.apify.com/v2/key-value-stores/.../records/screenshot-1` | Direct link to the file |
| `error` | `null` | Why a capture failed |
| `attempts` | `1` | Navigation attempts, either 1 or 2 |
| `errorType` | `null` | Failure class: `timeout`, `dns`, `http_4xx`, `http_5xx`, `blocked_or_captcha`, `other`; null on success |
| `stabilization` | `partial` | `full` when all stabilization steps completed, `partial` when a step failed, fell back or was not reached, `off` when `stableCapture: false`; independent of capture success |
| `stabilizationNotes` | `["csp_blocked_stylesheet"]` | Short notes about degraded steps; empty array if none. Optional mask/hide failures are also reported when stabilization is off |
| `capturedAt` | `2026-11-08T09:00:00.000Z` | UTC capture timestamp (failure timestamp on failed rows) |
| `sha256` | `<64 lowercase hex characters>` | SHA-256 of the exact stored file bytes; null on failure |

Illustrative selected fields only. Store/file identifiers and the zero hash are placeholders, not downloadable output or measured data.

```json
{
  "url": "https://apify.com/pricing",
  "ok": true,
  "status": 200,
  "format": "png",
  "device": "desktop",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/ILLUSTRATIVE_STORE/records/ILLUSTRATIVE_FILE",
  "capturedAt": "2026-11-09T09:00:00.000Z",
  "sha256": "0000000000000000000000000000000000000000000000000000000000000000",
  "error": null,
  "stabilization": "full",
  "stabilizationNotes": []
}
```

### Pricing

Pay per event, no subscription and no start fee:

| Event | Price |
|---|---|
| Successful screenshot or PDF | $0.003 ($3 per 1,000) |

Failed pages are **not billed**. Examples: 20 competitor pages captured weekly over four weeks = 80 captures = **$0.24**; one-off capture of 1,000 product pages = **$3.00**.

### Input example

```json
{
  "urls": [{ "url": "https://apify.com/pricing" }],
  "device": "mobile",
  "format": "png",
  "fullPage": true,
  "hideSelectors": ["#cookiebanner"],
  "stableCapture": true,
  "maskSelectors": [".live-clock", ".rotating-banner"],
  "waitForSelector": "main",
  "delaySeconds": 1
}
```

### FAQ

**Can I get a PDF instead of an image?** Yes, set `format` to `pdf`. PDFs always include the full page.

**How long are files kept?** Files live in the run's key-value store and follow your Apify data retention settings. Download or move them to your storage if you need them longer.

**Can it capture pages behind a login or CAPTCHA?** No. It does not log in, solve CAPTCHAs or bypass bot protection. Pages that block automated browsers may fail or show their block page.

**Can I run it on a schedule?** Yes. Save a task and configure Apify Schedules separately. For long-term archives, download each fileUrl and export the dataset manifest before retention expires. API, webhooks or automation integrations can support a separate transfer workflow; no Drive upload, Slack notification or visual-change alert is configured by this Actor.

### Related competitor research tools

Monitor new Google Play reviews daily with a separate app-review workflow. [Google Play Reviews & App Data Scraper](https://apify.com/erzia/googleplay-reviews-scraper).

### API access

Use the [Actor API examples](https://apify.com/erzia/website-screenshot/api/python) to pass explicit input and retrieve results. UI prefills are not API inputs.

### Use with AI agents

Connect an MCP-compatible client to https://mcp.apify.com?tools=actors,erzia/website-screenshot. Inspect Actor details and pricing before running. Pass the full quick-start input explicitly. Read the dataset after the run; starting an Actor does not create a recurring schedule. Authentication and any task/schedule setup are separate. Guide: https://docs.apify.com/mcp

### Support

Open an issue on the [Issues tab](https://apify.com/erzia/website-screenshot/issues/open) with the run link, affected URL, device, format and selector settings. Include stabilizationNotes for inconsistent captures.

# Actor input Schema

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

Enter public http(s) page URLs as objects, for example \[{"url":"https://apify.com/pricing"}]. Each URL is captured separately. Login and CAPTCHA solving are not supported. Keep the same URLs for repeated archives. Guide: https://apify.com/erzia/website-screenshot

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

Choose one preset and reuse it across archive runs. Desktop is 1920x1080; laptop is 1366x768. Mobile and tablet presets are also available. Changing the device changes the rendered layout. Example: "desktop".

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

Choose png, jpeg or pdf. PDFs always include the full page; fullPage applies to images. JPEG quality is controlled by quality. Each successful image or PDF costs $0.003. Example: "png".

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

Capture the whole page instead of the first screen. Ignored for PDF. Example: true.

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

Used only for JPEG.

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

Optional CSS selector to wait for before capturing.

## `delaySeconds` (type: `integer`):

Extra wait after the page loads, for animations.

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

Optional CSS selectors for elements to remove from page layout, such as a banner you have inspected on the target page. Use maskSelectors instead to preserve layout. Leave empty for a first run.

## `timeoutSeconds` (type: `integer`):

Navigation timeout. On a timeout or network error, retry once with domcontentloaded and 1.5 times this timeout.

## `stableCapture` (type: `boolean`):

Best-effort stabilization: disable CSS animations/transitions, wait for fonts within the timeout, and scroll to the top. Device scale is fixed per preset. Check stabilization and stabilizationNotes in output. Live content can still vary; a changed sha256 is not proof of a visible change. Example: true.

## `maskSelectors` (type: `array`):

Optional CSS selectors to paint black while preserving layout, for images and PDFs. Inspect the target page before adding selectors. Masking dynamic content can reduce visual noise; it does not detect page changes.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://example.com"
    }
  ],
  "device": "desktop",
  "format": "png",
  "fullPage": true,
  "quality": 80,
  "delaySeconds": 0,
  "timeoutSeconds": 30,
  "stableCapture": true
}
```

# Actor output Schema

## `screenshots` (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://example.com"
        }
    ]
};

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

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

```

## MCP server setup

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