# Website Screenshot API - Full Page, Mobile & PDF (`clearscrape/website-screenshot-api`) Actor

Screenshot any list of URLs with headless Chrome: full page, viewport or element, desktop/tablet/iPhone/Android, PNG/JPEG/PDF, dark mode, cookie banners and ads hidden. Public image links. From $1.50 per 1,000; failed URLs free.

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

## Pricing

from $1.50 / 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, Mobile & PDF

Capture **screenshots of any list of URLs** with real headless Chrome: **full page, viewport or a single element**, **desktop, laptop, tablet, iPhone and Android** presets, **PNG, JPEG or PDF**, dark mode, auto-hidden **cookie banners** and **ads**, and lazy-load scrolling. Each URL gets a dataset row with a **public image link**. **From $1.50 per 1,000 screenshots** ($2.00 for full page or PDF), and failed URLs are free.

### What it does

- **Capture modes:** full scrollable page (with a height cap for endless pages), the visible viewport, or one element by CSS selector (e.g. `#pricing`, `.infobox`).
- **Devices:** Desktop 1920×1080, Laptop 1366×768, Tablet (iPad), iPhone (393×852 @3x), Android (Pixel 8), or custom width/height/pixel density, with matching mobile user agents and touch emulation.
- **Formats:** PNG (lossless), JPEG (quality 1–100, smaller files), PDF (A4/Letter/Legal/A3, selectable text, backgrounds included).
- **Clean shots:**
  - Clicks "accept" on common consent tools (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast…) and hides leftover cookie banners.
  - Blocks ad, analytics and chat-widget domains.
  - Hide any element with CSS selectors; inject your own CSS or JavaScript.
- **Timing control:** wait for DOM ready, load or network idle; extra delay; wait for a selector; scroll first so lazy images load.
- **Dark mode** (prefers-color-scheme), locale / Accept-Language, custom user agent.
- **Reliable:** retries on load errors, server errors and bot walls, automatic Apify datacenter-proxy fallback, per-URL error isolation. Failed URLs appear in the dataset with an `error` message and are **not charged**.

### Use cases

- **Website monitoring and visual QA:** daily snapshots of landing pages, competitor pricing pages or your own releases.
- **SEO and agencies:** client reports, SERP landing-page audits, before/after redesigns.
- **Archiving and compliance:** PDFs of terms, ads or product pages with a timestamp.
- **AI agents and LLM pipelines:** give a vision model a picture of a page.
- **Directories and link previews:** thumbnails for thousands of sites.

### Input example

```json
{
  "urls": ["https://example.com", "https://www.python.org"],
  "device": "iphone",
  "fullPage": true,
  "format": "jpeg",
  "jpegQuality": 80,
  "hideCookieBanners": true,
  "blockAds": true,
  "darkMode": false
}
```

### Output example

```json
{
  "url": "https://www.python.org",
  "finalUrl": "https://www.python.org/",
  "statusCode": 200,
  "title": "Welcome to Python.org",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/screenshot-00001-www-python-org-4863eab2.png",
  "screenshotKey": "screenshot-00001-www-python-org-4863eab2.png",
  "format": "png",
  "device": "desktop",
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "fullPage": true,
  "imageWidth": 1920,
  "imageHeight": 2593,
  "bytes": 427367,
  "loadTimeMs": 2515,
  "attempts": 1,
  "takenAt": "2026-10-18T04:50:00Z",
  "error": null
}
```

The image files are also listed under the run's **Storage → Key-value store → Screenshots** tab.

### Pricing (pay per event)

- **$1.50 per 1,000 screenshots** of the viewport or a single element.
- **+$0.50 per 1,000** for full-page screenshots and PDFs, which render the whole page and take several times the work. So **$2.00 per 1,000** full pages.
- Failed URLs (DNS errors, timeouts, server errors, blocked pages) are free.
- No start fee beyond Apify's standard $0.00005 actor-start event.

### FAQ

**Full-page screenshots of endless pages?** They're cut at "Max full-page height" (10,000 px by default) to keep files reasonable.

**A site shows a login wall or captcha.** The Actor retries and falls back to a datacenter proxy, but it does not log in or solve captchas. For geo-specific content, choose Apify Residential proxy in the Proxy field.

**How long are images kept?** In the run's default key-value store, per your Apify data-retention settings. Copy them elsewhere (Dropbox, S3, Google Drive integrations) for long-term storage.

**Faster runs?** Raise memory and "Parallel pages" (about 3 pages per GB), use viewport shots instead of full page, and JPEG instead of PNG.

### Daily health check

A self-test (example.com) runs daily on Apify, so rendering problems get caught early.

### Legal and fair-use notes

Only capture pages you have the right to capture, and respect websites' terms and copyright when you publish screenshots.

# Actor input Schema

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

Pages to capture, one per line. 'https://' is added if missing. Duplicates are removed.

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

Viewport preset. Desktop 1920x1080, Laptop 1366x768, Tablet 820x1180 (iPad), iPhone 393x852 @3x, Android 412x915 (Pixel 8), or Custom (set width/height below).

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

Capture the whole scrollable page instead of just the visible viewport.

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

PNG (lossless), JPEG (smaller files) or PDF (printable, selectable text).

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

1-100, only for JPEG.

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

Clicks 'accept' on common consent tools (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast...) and hides leftover banners.

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

Blocks common ad, analytics and chat-widget domains. Cleaner, faster screenshots.

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

Emulates prefers-color-scheme: dark.

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

Elements to hide before capturing, e.g. .newsletter-popup, #chat-widget.

## `elementSelector` (type: `string`):

CSS selector of a single element to capture (e.g. #pricing). Leave empty for the page.

## `customCss` (type: `string`):

CSS injected before capturing.

## `customJs` (type: `string`):

JavaScript expression evaluated in the page before capturing (e.g. to close a modal).

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

When navigation counts as finished. 'Network idle' is best for heavy single-page apps but slower.

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

Wait this long after loading (for animations/fonts).

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

Optional CSS selector that must appear before capturing.

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

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

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

Max time for a page to load.

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

Overrides the device width (required for Custom).

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

Overrides the device height.

## `deviceScaleFactor` (type: `integer`):

Pixel density (1 = normal, 2 = retina). Higher = sharper but bigger files.

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

Very long pages are cut at this height.

## `pdfPageFormat` (type: `string`):

Paper size for PDF output.

## `userAgent` (type: `string`):

Override the browser user agent.

## `locale` (type: `string`):

Browser locale / Accept-Language, e.g. en-US, de-DE, en-AU.

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

Pages captured at once. About 1-2 per GB of memory (full-page shots of long pages use a lot of memory).

## `maxRetries` (type: `integer`):

Retries for pages that fail to load or block the request.

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

Not needed for most sites. If pages block direct access, the Actor switches to Apify datacenter proxy automatically; choose Residential for geo-specific or heavily protected sites.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://www.wikipedia.org"
  ],
  "device": "desktop",
  "fullPage": true,
  "format": "png",
  "jpegQuality": 80,
  "hideCookieBanners": true,
  "blockAds": true,
  "darkMode": false,
  "waitUntil": "load",
  "delayMs": 500,
  "scrollToLoadLazy": true,
  "navigationTimeoutSecs": 45,
  "maxFullPageHeight": 10000,
  "pdfPageFormat": "A4",
  "locale": "en-US",
  "maxConcurrency": 3,
  "maxRetries": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per URL: preview, page title, status, image size and link (failed URLs show an error and are not charged).

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

The PNG/JPEG/PDF files in the default key-value store.

## `runStats` (type: `string`):

RUN_STATS record: captured, failed, retries and bytes.

# 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("clearscrape/website-screenshot-api").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("clearscrape/website-screenshot-api").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 clearscrape/website-screenshot-api --silent --output-dataset

```

## MCP server setup

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

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/jN1Scq81LUxZC3pGD/builds/3Ub1rp58C245oBahe/openapi.json
