# Website Screenshot and PDF (`fecklesspleb/website-screenshot`) Actor

Capture website screenshots in bulk with headless Chrome: viewport or full page, PNG or JPEG, desktop or mobile, optional PDF of each page. Hide cookie banners with CSS selectors, add a delay or scroll for lazy images. Public link to every file. $0.80 per 1,000 screenshots.

- **URL**: https://apify.com/fecklesspleb/website-screenshot.md
- **Developed by:** [Scott Williams](https://apify.com/fecklesspleb) (community)
- **Categories:** Developer tools, Automation, SEO tools
- **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

## Website Screenshot and PDF

Take screenshots of websites in bulk with headless Chrome (Playwright). Capture the visible viewport or the full scrollable page as PNG or JPEG, on a desktop or mobile profile, and optionally save a PDF of each page. Hide cookie banners and chat widgets with CSS selectors, add a delay for animations, or scroll first to load lazy images. Every file goes to an Apify key-value store and the dataset lists a public link, page title, HTTP status and final URL.

**At a glance:** $0.80 per 1,000 screenshots, plus $0.00005 per run start. Pay per result with no subscription, set a maximum cost per run, export to JSON, CSV or Excel, or call it from the Apify API, Make, Zapier or n8n.

robots.txt is respected (RFC 9309). Failed pages are not charged.

### Use cases

- Visual monitoring: capture your pages daily and compare them.
- Archive landing pages, pricing pages or campaigns for records.
- Thumbnails and previews for link directories and dashboards.
- QA: check desktop and mobile layouts across many URLs in one run.
- Save pages as PDF for reports or offline reading.
- Feed screenshots to vision models for page analysis.

### Input

```json
{
  "urls": [{"url": "https://example.com"}, {"url": "https://www.python.org/"}],
  "device": "desktop",
  "fullPage": true,
  "format": "jpeg",
  "hideSelectors": ["#cookie-banner"],
  "savePdf": false
}
```

### Output example

Real output from a test run (links are signed Apify storage URLs that open without a token):

```json
{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "statusCode": 200,
  "title": "Example Domain",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/example-com-71054856.png?signature=...",
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/example-com-71054856.pdf?signature=...",
  "key": "example-com-71054856.png",
  "format": "png",
  "fullPage": false,
  "device": "desktop",
  "viewport": "1280x800",
  "sizeBytes": 72228,
  "loadSecs": 1.2,
  "capturedAt": "2026-10-28T03:25:44.129252+00:00"
}
```

### Pricing

Pay per screenshot: **$0.80 per 1,000 screenshots** ($0.0008 each), plus the standard Apify run start event of $0.00005 per run. The optional PDF is included. Failed or blocked pages are free. Set **Maximum cost per run** and the Actor stops cleanly at that amount.

### Limits

- No login, no CAPTCHA solving and no proxy rotation. Sites that block automated browsers will fail (and are not charged).
- Redirects inside the browser are checked against robots.txt at the final URL.
- Full-page captures of extremely long pages are capped by Chrome's maximum image size.

### Memory

The Actor needs **at least 512 MB** of memory; the default is 1024 MB. Python, the browser driver and Chromium together use about 250-300 MB, so runs at 256 MB crash with "Page crashed". At 512 MB it captures 1 page at a time, at 1024 MB 2 at a time, and one more page per extra 384 MB (up to **Max concurrency**). Very heavy pages or long full-page captures may need 1024 MB or more.

### Is this legal?

The Actor only loads public pages you list, identifies itself in its user agent and obeys robots.txt. Screenshots can contain copyrighted material and personal data shown on a page: use them only where you have the right to, and follow each site's terms.

# Changelog

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

# Actor input Schema

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

Pages to capture.

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

Sets the default viewport and a mobile browser profile.

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

Capture the whole scrollable page instead of only the viewport.

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

JPEG files are much smaller.

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

Only used for JPEG.

## `savePdf` (type: `boolean`):

Save a printable PDF of each page as well (no extra charge).

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

Overrides the device default.

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

Overrides the device default.

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

When the page counts as loaded. networkidle waits for network quiet and is slower.

## `delaySecs` (type: `number`):

Wait after load, for animations and late content.

## `scrollToBottom` (type: `boolean`):

Triggers lazy-loaded images before a full-page capture.

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

Elements to hide before capture, for example cookie banners or chat widgets: #cookie-banner, .intercom-launcher

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

Pages slower than this fail (and are not charged).

## `keyValueStoreName` (type: `string`):

Save files to a named store (kept indefinitely) instead of the run's default store.

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

Pages captured in parallel. Requests to one host are spaced at least 1 s apart.

## `maxResults` (type: `integer`):

Stop after this many. 0 means no cap.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.python.org/"
    }
  ],
  "device": "desktop",
  "fullPage": false,
  "format": "png",
  "jpegQuality": 80,
  "savePdf": false,
  "waitUntil": "load",
  "delaySecs": 0,
  "scrollToBottom": false,
  "hideSelectors": [],
  "timeoutSecs": 30,
  "maxConcurrency": 3,
  "maxResults": 0
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

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