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

Capture full-page screenshots or PDFs of up to 5,000 URLs per run: PNG, JPEG or WebP, desktop, tablet and mobile, one element only, dark mode. Cookie banners hidden, lazy images loaded, one file link per URL. Failed URLs are free.

- **URL**: https://apify.com/magicfingers/website-screenshot-api.md
- **Developed by:** [abdulrahman alrashid](https://apify.com/magicfingers) (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 $3.20 / 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 API: Full Page, Mobile, PDF

Website Screenshot API turns a list of URLs into full-page screenshots (PNG, JPEG or WebP) or PDFs in one run. Each page gives one stored file with a link and one row with its size, final URL, status code and title. You pay only for files that were captured and stored; URLs that fail are listed separately and cost nothing.

### What is Website Screenshot API?

Website Screenshot API is a bulk screenshot generator for web pages. It opens each URL in a real Chromium browser, waits until the page has loaded, hides cookie consent banners and chat widgets, scrolls down so lazy-loaded images appear, and captures the result. Use it to:

- put page shots into client reports, audits and dashboards;
- archive how a page looked on a given day, for QA or compliance;
- build previews for directories, marketplaces and link lists;
- give an AI agent a picture of a page;
- turn a URL into a PDF for reading or printing.

It replaces a screenshot API subscription: there is no monthly fee, you pay per stored file, and you can run it on a schedule or call it from your own code.

### What can it capture?

- **Full page or viewport:** the whole page height (up to 20,000 px, see Limits) or only the visible screen.
- **One element:** only the first element that matches a CSS selector, for example a pricing table or a chart.
- **Formats:** PNG (lossless), JPEG and WebP (smaller files, quality 1 to 100) and PDF (the page printed to A4 with its background colours and images).
- **Devices:** desktop, desktop HD, tablet and mobile presets, or your own viewport width and height.
- **Dark mode:** pages that support `prefers-color-scheme: dark` are shown in their dark theme.
- **Clean shots:** cookie banners and chat widgets hidden, lazy images loaded, extra elements hidden with your own selectors.

### How to take a full-page screenshot of a website

1. Paste the pages into **URLs**, one per line (up to 5,000 per run). Bare domains such as `apify.com` work.
2. Keep **Format** at PNG and **Full page** on, or choose JPEG, WebP or PDF and a **Device**.
3. Click **Start**. A typical page takes 5 to 20 seconds, and up to 3 pages are captured at a time with the default 2,048 MB of memory.
4. Open the **Output** tab: the **Overview** view shows a preview of each capture with its link. Export the rows to JSON, CSV or Excel, or download the files from the run's key-value store.

### How much does it cost to take 1,000 screenshots?

You pay one event per stored image or PDF. URLs that fail (the domain does not exist, the page does not load in time, the address is private, the element is not found, the URL is a file download) are listed in the `FAILED` record and are not charged. There is no extra charge for full-page captures, PDF, element capture or retries.

| Event | Charged when | Free plan | Bronze | Silver | Gold |
|---|---|---|---|---|---|
| Screenshot (`screenshot`) | One image or PDF captured, stored with a link and saved as a row. URLs that fail (DNS errors, timeouts, blocked addresses, missing elements, file downloads) are not charged. | 4.00 USD per 1,000 events | 4.00 USD per 1,000 events | 3.60 USD per 1,000 events | 3.20 USD per 1,000 events |
| Actor start (`apify-actor-start`) | Charged by Apify when the run starts: once up to 1 GB of memory, then once for each extra GB. | 0.05 USD per 1,000 runs | 0.05 USD per 1,000 runs | 0.05 USD per 1,000 runs | 0.05 USD per 1,000 runs |

Example: 1,000 screenshots on the Bronze plan cost 1,000 x 0.004 USD = 4.00 USD, plus 0.00005 USD for the run start. Platform usage (compute, storage, traffic) is included in these prices.

Free plan: the 5 USD of monthly Apify credit covers about 1,250 screenshots a month when no other Actor is used.

At the default 2,048 MB of memory the run start counts twice (2 x 0.00005 USD), as the table above describes.

Set a maximum cost per run in the run options. The Actor never stores a capture it cannot bill: it stops starting new URLs at the limit, keeps every row saved so far and writes its summary.

Pages that answer with an error status (404, 500) but show content are captured and charged, with `statusCode` set, because the error page is often what you want to see. Bot challenge pages are captured and charged too, and the row names the challenge in `botChallenge` (see Limits).

### Input example

Full-page PNG screenshots of two pages on desktop:

```json
{
    "urls": ["https://apify.com", "https://en.wikipedia.org/wiki/Kuwait"],
    "format": "png",
    "fullPage": true,
    "device": "desktop"
}
```

The infobox of a Wikipedia article as a mobile JPEG:

```json
{
    "urls": ["https://en.wikipedia.org/wiki/Kuwait"],
    "device": "mobile",
    "format": "jpeg",
    "fullPage": false,
    "selector": "table.infobox"
}
```

URL to PDF:

```json
{
    "urls": ["https://example.com"],
    "format": "pdf"
}
```

### Output example

The row of the infobox capture above, from a test run (the store ID in the link is replaced by `STORE_ID`):

```json
{
    "url": "https://en.wikipedia.org/wiki/Kuwait",
    "finalUrl": "https://en.wikipedia.org/wiki/Kuwait",
    "statusCode": 200,
    "title": "Kuwait - Wikipedia",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/en.wikipedia.org-wiki-Kuwait-e9e0d840.jpg",
    "key": "en.wikipedia.org-wiki-Kuwait-e9e0d840.jpg",
    "format": "jpeg",
    "device": "mobile",
    "width": 620,
    "height": 4072,
    "bytes": 389888,
    "truncated": false,
    "pdfPages": null,
    "contentType": "text/html",
    "botChallenge": null,
    "warnings": [],
    "loadMs": 7785,
    "capturedAt": "2026-11-12T23:06:02.810Z"
}
```

Every row has these fields:

| Field | Type | Description |
|---|---|---|
| `url` | string | The URL as requested, after a missing https:// was added and the host was written in lower case. |
| `finalUrl` | string | The URL the browser ended on, after all redirects. |
| `statusCode` | integer or null | HTTP status of the final page. Pages that answer 4xx or 5xx but show content are captured and charged, with this field set. |
| `title` | string or null | Title of the page (at most 300 characters); null when the page has none. |
| `screenshotUrl` | string | Link to the stored image or PDF in the run's key-value store. It works as long as the store is kept (see data retention in the README). |
| `key` | string | Key of the file in the key-value store: host, path, a short hash of the URL and settings, and the extension. |
| `format` | string | File format: png, jpeg, webp or pdf. |
| `device` | string | Device preset used: desktop, desktop-hd, tablet or mobile (custom viewport sizes keep the preset name). |
| `width` | integer or null | Image width in pixels, read from the stored file (CSS pixels times the device pixel density); null for PDF. |
| `height` | integer or null | Image height in pixels, read from the stored file; null for PDF. |
| `bytes` | integer | Size of the stored file in bytes. |
| `truncated` | boolean | True when the page (or element) was taller than the size limit and the image shows only its top part, or when a PDF reached 100 pages. |
| `pdfPages` | integer or null | Number of pages of the PDF; null for images. |
| `contentType` | string or null | Media type of the final page as sent by the server, for example text/html. Other types (plain text, JSON, images) are captured as the browser shows them. |
| `botChallenge` | string or null | Name of the bot challenge or block page the capture shows (for example Cloudflare challenge), or null. Such pages are captured as they appear; no attempt is made to pass them. |
| `warnings` | array | Notes about the capture, for example that the network never went idle, that the page was cut at the height limit, or that requests to private addresses were blocked. |
| `loadMs` | integer | Milliseconds from the start of navigation until the page reached the event in Wait for (or that wait ran out). Delays, scrolling and the capture come after. |
| `capturedAt` | string | Time the file was stored (ISO 8601, UTC). |

The run also writes two records to its key-value store: `SUMMARY` (URLs captured, failed, charged, truncated and not processed, with the device, viewport and User-Agent used) and `FAILED` (each URL that gave no capture, with the reason and the number of attempts).

### Devices and viewports

| Device | Viewport (CSS px) | Pixel density | Image width |
|---|---|---|---|
| `desktop` (default) | 1366 x 768 | 1x | 1,366 px |
| `desktop-hd` | 1920 x 1080 | 1x | 1,920 px |
| `tablet` | 820 x 1180 | 2x | 1,640 px |
| `mobile` | 390 x 844 | 2x | 780 px |

Tablet and mobile also emulate a touch screen and the mobile viewport, so responsive pages show their mobile layout. **Viewport width** (320 to 3,840 px) and **Viewport height** (320 to 4,320 px) replace the preset size and keep its pixel density. With **Full page** off, the image is exactly the viewport.

### Hiding cookie banners and waiting for content

- **Cookie banners and chat widgets:** with **Hide cookie banners and chat widgets** on (the default), the Actor hides the banners of common consent tools (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, Sourcepoint, TrustArc, CookieYes, Complianz, Borlabs, iubenda and others) and common chat widgets (Intercom, HubSpot, Drift, Crisp, Zendesk, Tidio and others) with CSS. Nothing is clicked: no consent is given or refused on your behalf, so the page loads as it does for a visitor who has not answered the banner. When a banner had locked scrolling, the lock is lifted so the full page can be captured. Banners of tools that are not on the list stay visible; add their selectors to **Extra elements to hide**.
- **Wait for:** `load` (the default) waits for images and scripts; `domcontentloaded` is faster; `networkidle` waits until there is no network traffic for half a second, at most 15 more seconds. Pages with live connections (chat, tickers, analytics beacons) never go idle: they are captured anyway, with a note in `warnings`.
- **Extra delay:** 1,000 ms by default, for animations and late content.
- **Wait for element:** wait until a CSS selector is visible before the capture, for example a chart that loads later.
- **Lazy images:** with **Scroll to load lazy images** on, the Actor scrolls down one screen at a time (up to 15 seconds and the height limit) and back to the top before a full-page or PDF capture. For an element capture it scrolls only to that element.
- **Animations:** CSS animations and transitions are stopped at the moment of the capture, so carousels and fade-ins do not blur the image.
- Video, analytics, advertising and session-recording requests are blocked while the page loads; images and fonts load normally.

### Use with schedules, the API and MCP clients

- **Schedules:** save your input as a task and add a schedule in Apify Console to capture the same pages every day or week. Set **Named store** to keep the files: the same URL with the same settings keeps the same key, so each run replaces the previous capture and the link stays the same.
- **API:** start the Actor with the Apify API or the JavaScript and Python clients, wait for the run, then read the dataset items; each row's `screenshotUrl` opens the file. Make, Zapier and n8n can start it and pass the links on.
- **AI agents and MCP clients:** the Actor can be called as a tool from MCP clients that use the Apify MCP server; the agent gets one row per URL with a link to the image.

File links point to the key-value store of the run. Apify keeps a run's own store for the data retention period of your plan; a **Named store** is kept until you delete it.

### Safety

- Only public `http` and `https` addresses are captured. Private, local, link-local and cloud metadata addresses are refused, for the page itself, for every redirect, and for every request the page makes (images, frames, scripts, WebSockets). The browser reaches the internet only by way of a local guard that resolves each host name, checks every address and connects to the checked address.
- The browser identifies itself honestly: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<version>.0.0.0 Safari/537.36 WebsiteScreenshotAPI/0.1 (+https://apify.com/magicfingers/website-screenshot-api)`. It does not hide that it is an automated headless browser.
- Service workers and downloads are switched off; pop-up windows are closed.

### Limits

- **No log-in pages:** the Actor captures pages as an anonymous visitor sees them. It does not log in, keep cookies between runs or fill forms.
- **Height limit:** full-page captures are cut at 20,000 px of page height and the row is marked `truncated`. Very wide or high-density captures are cut earlier so an image stays under 40 million pixels (for example 10,416 px for a 3,840 px wide page), and WebP images at 16,383 pixels per side, the format's own limit. Infinite-scroll pages stop at the limit.
- **Bot challenges:** pages behind a bot challenge or block page (Cloudflare, DataDome, Akamai and others) are captured as they appear, and `botChallenge` names what was recognised. No attempt is made to pass or solve a challenge, and no stealth techniques are used.
- **Pages that scroll inside a box:** some pages scroll an inner container instead of the page itself; a full-page capture then shows only the first screen of that container.
- **PDF:** A4 pages with 10 mm margins, printed with the page's print styles, at most 100 pages (`truncated` is true at 100 pages). Element capture is not available for PDF.
- **File size:** a capture above 50 MB fails and is not charged; use JPEG or WebP for very long pages.
- **File downloads:** URLs that make the browser download a file (PDF files, ZIP archives, CSV exports) fail with "not a web page" and are not charged. Plain text, JSON and images are captured as the browser shows them.
- **Timeouts:** each attempt has **Page timeout** seconds (60 by default). Timeouts, network errors and browser crashes are tried 3 times in total; DNS errors, blocked addresses and missing elements are not repeated.
- **Banner list:** banners and widgets that are not on the bundled list are not hidden unless you add their selectors.

### FAQ

**Am I charged for URLs that fail?** No. Only stored files are charged. Failed URLs are listed in the `FAILED` record with the reason.

**Why does my screenshot show a "Just a moment..." page?** The site shows a bot challenge to automated browsers. The row has `botChallenge` set. The Actor does not try to pass it; try a proxy with a country close to the site, or contact the site owner.

**Why is the image shorter than the page?** The page is taller than the height limit (`truncated` is true), or it scrolls inside an inner box.

**Can I capture a page behind a log-in?** No. Only public pages that open without an account.

**How long do the file links work?** As long as the store is kept: the retention period of your plan for the run's own store, or until you delete it for a named store.

**Can I see a page from another country?** Yes. Set **Proxy** to Apify Proxy and choose a country.

### Other Actors by the same author

- [Tech Stack Detector](https://apify.com/magicfingers/techstack-detector): the CMS, shop platform, analytics, hosting and email provider of a list of websites.
- [Website Contact Extractor](https://apify.com/magicfingers/website-contact-extractor): the emails, phone numbers and imprint data companies publish on their own websites.
- All Actors: [apify.com/magicfingers](https://apify.com/magicfingers)

# Changelog

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

# Actor input Schema

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

Web pages to capture, one per line (1 to 5,000 URLs per run). A bare domain such as apify.com is read as https://apify.com. Only public http and https addresses are captured. Duplicates are skipped.

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

File format of each capture: PNG (lossless), JPEG or WebP (smaller files, see Quality) or PDF (the page printed to A4 with its backgrounds, up to 100 pages).

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

Capture the whole page height instead of the visible viewport only. Captures are cut at 20,000 px of page height (less for very wide or high-density captures and for WebP; see the README) and marked truncated. Ignored when Element selector is set.

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

Viewport preset: desktop 1366 x 768, desktop-hd 1920 x 1080, tablet 820 x 1180 at 2x pixel density, mobile 390 x 844 at 2x pixel density (tablet and mobile also emulate touch and the mobile viewport).

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

Custom viewport width that replaces the preset width (unit: CSS pixels, 320 to 3,840). Leave empty to use the device preset.

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

Custom viewport height that replaces the preset height (unit: CSS pixels, 320 to 4,320). With Full page off, this is the height of the image.

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

Ask the page for its dark colour scheme (prefers-color-scheme: dark). Pages without a dark theme look the same.

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

Capture only the first element that matches this CSS selector, for example table.infobox or #pricing. When no element matches, the URL fails (not charged). Not available with PDF.

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

Hide common cookie consent banners and chat widgets with CSS before the capture. Nothing is clicked: no consent is given or refused on your behalf.

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

More CSS selectors to hide before the capture, one per line, for example .newsletter-popup or #promo-bar (up to 50).

## `scrollToLoad` (type: `boolean`):

Before a full-page, element or PDF capture, scroll down the page one screen at a time (up to 15 seconds and the height limit) so lazy-loaded images and sections appear, then scroll back to the top.

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

Page event to wait for before the capture: load (all images and scripts loaded, the default), domcontentloaded (the HTML is parsed, fastest) or networkidle (no network traffic for 0.5 s; waits at most 15 s more, then captures anyway).

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

Extra wait after the page event, before the capture, for animations and late content (unit: milliseconds, 0 to 15,000).

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

Wait until an element matching this CSS selector is visible before the capture. When it does not appear within the page timeout, the URL fails (not charged).

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

Image quality for JPEG and WebP (1 to 100; WebP at 100 is lossless). Ignored for PNG and PDF.

## `pageTimeoutSecs` (type: `integer`):

Longest time for one attempt at one URL, from opening it to the stored file (unit: seconds, 15 to 180). Timeouts and network errors are tried 3 times in total.

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

Most pages captured at the same time (1 to 10). The run also allows about one page per 600 MB of memory, so at the default 2,048 MB it captures up to 3 pages at a time.

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

Optional name of a key-value store that keeps the files after the run's retention period (letters, digits and hyphens, at most 63 characters). It is created when missing. The same URL with the same settings keeps the same key, so a scheduled run replaces the previous capture and its link stays the same. Empty: the run's own store, kept for the retention period of your plan.

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

Optional proxy for the pages, for example Apify Proxy with a country to see the page as visitors from that country do. No proxy is used by default.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "format": "png",
  "fullPage": true,
  "device": "desktop",
  "darkMode": false,
  "hideCookieBanners": true,
  "scrollToLoad": true,
  "waitUntil": "load",
  "delayMs": 1000,
  "quality": 85,
  "pageTimeoutSecs": 60,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

One row per captured URL: file link, format, size, final URL, status code and title, as JSON.

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

Keys of the run's key-value store: each stored image or PDF (for example en.wikipedia.org-wiki-Kuwait-3f9a1c2b.png) plus the SUMMARY and FAILED records. With a named store, the files are in that store instead.

## `summary` (type: `string`):

Counts of captured, failed, charged, truncated and not processed URLs, the device, viewport and User-Agent used.

## `failed` (type: `string`):

URLs that gave no capture, with the reason and the number of attempts. They are not charged.

# 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://apify.com"
    ]
};

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

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

```

## MCP server setup

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