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

Capture website screenshots from a list of URLs: full page, above the fold or fixed height, desktop/tablet/mobile, PNG/JPEG/WebP or PDF, one element by CSS selector. Cookie banners dismissed, sticky headers fixed, emojis rendered. Failed pages are free. $0.003 per screenshot.

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

## Pricing

from $2.40 / 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

### What does Website Screenshot API do?

**Website Screenshot API** captures **screenshots of websites from a list of URLs**: the **full page**, only the part **above the fold**, or a **fixed height**, on a **desktop, laptop, tablet or mobile** screen, as **PNG, JPEG or WebP**, plus an optional **PDF** of each page. It can also capture **one element** (a header, a pricing table, a chart) by CSS selector.

Each screenshot is stored in the run's key-value store, and every URL gets one dataset row with a **ready-to-open image link**, the final URL after redirects, the HTTP status, the page title, the image size in pixels and bytes, and a plain-English error when something went wrong. **Pages that fail are free**: DNS errors, timeouts, HTTP errors and bot-protection pages are never charged.

### Why use this screenshot API?

Screenshot tools often fail in the same ways: cookie banners cover the page, sticky headers appear in the middle of a full-page image, emojis come out as empty boxes, lazy-loaded images are blank, one slow website hangs the whole run, and failed pages still cost money. This Actor was built to handle each of those:

- **Cookie banners dismissed**: it clicks "Accept" on common consent managers (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, TrustArc and more) and hides any consent layer that remains.
- **Sticky headers fixed**: in full-page shots, the header is pinned to the top of the page instead of being drawn again further down.
- **Lazy images loaded**: the page is scrolled quickly to the bottom and back to the top before the capture.
- **Above the fold or fixed height**: capture only the visible screen, or the top N pixels, not just the full page.
- **Emojis and Asian scripts render**: color emoji and CJK fonts are installed.
- **Hard timeout per page**: a page that is not done within the page timeout becomes a free row, and the run moves on.
- **Ads, trackers and chat widgets blocked** by default, so pages load faster and chat bubbles stay out of the picture.
- **Files are stored before the row is written**, so every link in the dataset already works when your API call returns.

### How to take website screenshots

1. Paste one or more URLs into **Page URLs** (one per line; `example.com` works too).
2. Choose **What to capture** (full page, viewport only or fixed height) and a **Device**.
3. Pick an **Image format**. PNG is lossless; JPEG and WebP are 3-10x smaller.
4. Optionally set **Wait until** to "Network idle" for single-page apps, a **Wait for element** selector, or an **Extra delay**.
5. Click **Start**. Open each image from the **Screenshots** table, or download them all from the key-value store.

#### Use it through the API

Call the Actor from any language, from n8n, Make or Zapier, or from an AI agent through the Apify MCP server. A synchronous run returns the dataset rows, and each row's `screenshotUrl` is a public link you can download right away.

### How much does a website screenshot cost?

This Actor uses **pay-per-event** pricing. You pay **$0.003 per screenshot** ($3 per 1,000), and **$0.003 per PDF** only if you turn on "Also save a PDF". **Failed and blocked pages are free**: DNS errors, timeouts, HTTP errors, bot-protection pages and skipped URLs are never charged. There is no monthly fee and no extra per-run fee apart from Apify's tiny start fee. Apify Scale and Business subscribers pay less per screenshot (SILVER $0.0027, GOLD $0.0024).

**Worked example:** a daily job that captures 250 product pages as full-page JPEGs costs 250 x $0.003 = **$0.75 per day**, or about **$22.50 per month**. If 12 of those pages are offline one day, that day costs 238 x $0.003 = $0.71.

Set **Max cost per run** in the run options to cap your spending: the Actor checks the budget **before** it opens each page, and URLs that no longer fit become free `skipped` rows instead of being charged.

#### Heavy pages

Very heavy pages (large web apps, long news homepages) can need more than the default 60-second **Page timeout** on the default 2 GB of memory. If such a page fails with a timeout (free), raise **Page timeout** to 120-180 seconds, give the run more memory, or capture "Viewport only", which is much lighter.

### Input example

```json
{
    "urls": ["https://example.com", "https://www.python.org"],
    "captureMode": "fullPage",
    "device": "desktop",
    "format": "png"
}
```

### Output example

One dataset row per URL (real output from a cloud run; the link signature is shortened):

```json
{
    "url": "https://www.python.org",
    "inputIndex": 1,
    "status": "ok",
    "device": "desktop",
    "captureMode": "fullPage",
    "format": "png",
    "loadTimeSecs": 1.99,
    "finalUrl": "https://www.python.org/",
    "httpStatus": 200,
    "title": "Welcome to Python.org",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/zu5Y3eDUn9ku3jLaR/records/0001-4863eab2-www-python-org.png?signature=...",
    "screenshotKey": "0001-4863eab2-www-python-org.png",
    "width": 1440,
    "height": 2785,
    "bytes": 546677,
    "pageHeight": 2785,
    "truncated": false,
    "cookieBanner": null,
    "capturedAt": "2026-10-09T02:56:31Z",
    "error": null
}
```

A failed page is a free row with `status: "failed"`, an `errorType` (`dns`, `http-error`, `bot-protection`, `timeout`, `selector-not-found`...) and an `error` message that says what to do, for example: *"The page answered HTTP 404 Not Found. Check that the URL is correct. Not charged."*

### Options

#### Capture

- **What to capture**: full page (cut at **Max height**, 16,000 px by default), viewport only, or fixed height from the top.
- **Device**: desktop 1440x900, laptop 1280x800, tablet 820x1180 or mobile 390x844 (mobile browser with touch). **Viewport width/height** override the preset; **Pixel density** 1-3 gives sharp retina images.
- **Capture one element**: a CSS selector such as `header`, `#pricing` or `.chart`.
- **Image format** PNG, JPEG or WebP with **quality**, **Dark mode**, and **Also save a PDF** (A4, Letter, Legal or A3).

#### Page loading

- **Wait until**: Load (default), Network idle (best for React/Vue/Angular apps, capped so endless trackers never hang), or DOM ready (fastest).
- **Wait for element**, **Extra delay**, **Scroll to load lazy images**, **Page timeout**.
- **Dismiss cookie banners**, **Hide large pop-ups**, **Hide elements** by CSS selector, **Block ads, trackers and chat widgets**, **Fix sticky headers**.
- **Capture error pages**: off by default, so error pages are free rows. Turn it on to screenshot 404/500 pages too, for example for uptime monitoring.
- **Proxy**: Apify Proxy (datacenter) by default.

### Related Actors from Kanto Labs

- [Video Frame Extractor](https://apify.com/kantolabs/video-frame-extractor): keyframes, thumbnails and scene frames from video files.
- [Website Tech Stack Detector](https://apify.com/kantolabs/website-tech-stack-detector): which CMS, analytics, frameworks and CDN a site uses.
- [Website SEO Audit](https://apify.com/kantolabs/website-seo-audit): an on-page SEO score with prioritized issues.

### FAQ

#### Can I take a full-page screenshot of a website?

Yes. "Full page" is the default. Pages taller than **Max height** (16,000 px by default, up to 30,000) are cut there, and the row says `truncated: true`.

#### How do I capture only the part above the fold?

Set **What to capture** to "Viewport only". The image is exactly one screen (for example 1440x900 on desktop). For a custom height, use "Fixed height from the top".

#### Why did a page fail, and was I charged?

Every failed page has an `error` message with the reason and how to fix it, and it is **never charged**. The most common reasons are a mistyped URL (DNS error), a page that answers 404, and sites behind strong bot protection (Cloudflare challenge, DataDome, CAPTCHA). This Actor does not solve CAPTCHAs.

#### Can it screenshot pages behind a login?

No. It captures pages that are publicly visible without logging in.

#### Is it legal to screenshot websites?

Capturing a public web page, the way a browser shows it to any visitor, is generally fine for monitoring, archiving, QA and previews. You are responsible for how you use the images, including copyright in the page content and the site's terms of use.

#### I found a bug or need a feature

Open an issue in the **Issues** tab with the URL and your input. Issues are answered quickly.

# Actor input Schema

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

Web pages to capture, one per line. 'example.com' is read as https://example.com. Each URL gives one screenshot (one dataset row). Pages that fail to load, answer an HTTP error or show a bot-protection page are free rows with the reason.

## `captureMode` (type: `string`):

Full page = the whole scrolling page (up to 'Max height'). Viewport = only the visible screen ('above the fold'). Fixed height = the top of the page down to 'Fixed height' pixels.

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

Screen size and browser type. Desktop 1440x900, laptop 1280x800, tablet 820x1180 (2x), mobile 390x844 (2x, mobile browser, touch). Viewport width/height below override the preset size.

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

Custom browser width in CSS pixels. Leave empty to use the device preset.

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

Custom browser height in CSS pixels (this is the height of a 'Viewport only' screenshot). Leave empty to use the device preset.

## `fixedHeight` (type: `integer`):

Height of the screenshot when 'What to capture' is 'Fixed height from the top'.

## `maxHeight` (type: `integer`):

Very long pages are cut at this height (the row then says truncated: true).

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

1 = normal, 2 = retina/sharp (4x the pixels). Leave empty to use the device preset (desktop 1, tablet and mobile 2).

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

PNG = lossless, JPEG and WebP = much smaller files (see 'Quality').

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

1-100. Ignored for PNG.

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

When the page counts as loaded. 'Load' suits most sites. 'Network idle' waits until requests stop (best for single-page apps; capped at 15 s so endless trackers never hang the run). 'DOM ready' is fastest.

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

Optional. Waits until this element is visible before capturing, e.g. '#main' or '.product-grid'. If it never appears, the row fails free.

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

Optional pause right before the capture, for animations or late widgets. 0-60000.

## `scrollToLoadLazyContent` (type: `boolean`):

Full page / fixed height: scrolls down quickly (at most 15 s) so lazy-loaded images appear, then back to the top before the capture.

## `dismissCookieBanners` (type: `boolean`):

Clicks 'Accept' on common consent managers (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, TrustArc...) and hides cookie layers that remain.

## `hidePopups` (type: `boolean`):

Also hides any fixed overlay covering more than 30% of the screen (newsletter / sign-up modals). Off by default because a few sites use a fixed full-screen layout.

## `blockAdsAndTrackers` (type: `boolean`):

Blocks common ad, analytics and chat-widget scripts and video/audio files. Pages load faster and chat bubbles stay out of the image. Turn off to capture the page exactly as a visitor sees it, ads included.

## `unstickHeaders` (type: `boolean`):

Full page / fixed height: pins sticky and fixed headers to the top of the page so they are not drawn again further down the image.

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

Elements to hide before the capture, e.g. '.chat-widget', '#promo-bar'.

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

Optional. Screenshot only this element (the first match), e.g. 'header', '#pricing', '.chart'. Overrides 'What to capture'. Not found = free row.

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

Tells the site the visitor prefers a dark color scheme (only sites that support it change).

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

Also prints each page to a PDF (charged as a separate 'PDF' event, same price as a screenshot).

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

Paper size of the PDF.

## `captureErrorPages` (type: `boolean`):

Off: pages answering HTTP 4xx/5xx or a bot-protection/CAPTCHA page are free rows without an image. On: they are captured and charged like any page (useful for uptime monitoring).

## `ignoreHttpsErrors` (type: `boolean`):

Capture sites with expired or self-signed certificates.

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

Hard limit per page for loading and capturing. A page that is not done in time is a free row - one slow site never blocks the run.

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

0 = automatic (3 pages at the default 2 GB, 6 at 4 GB). Lower it for very heavy pages.

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

Apify Proxy (datacenter) is used by default. Turn it off to connect directly.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://www.python.org"
  ],
  "captureMode": "fullPage",
  "device": "desktop",
  "fixedHeight": 2000,
  "maxHeight": 16000,
  "format": "png",
  "quality": 80,
  "waitUntil": "load",
  "delayMs": 0,
  "scrollToLoadLazyContent": true,
  "dismissCookieBanners": true,
  "hidePopups": false,
  "blockAdsAndTrackers": true,
  "unstickHeaders": true,
  "darkMode": false,
  "savePdf": false,
  "pdfFormat": "A4",
  "captureErrorPages": false,
  "ignoreHttpsErrors": false,
  "pageTimeoutSecs": 60,
  "maxConcurrency": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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": [
        "https://example.com",
        "https://www.python.org"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kantolabs/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": [
        "https://example.com",
        "https://www.python.org",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("kantolabs/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": [
    "https://example.com",
    "https://www.python.org"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call kantolabs/website-screenshot --silent --output-dataset

```

## MCP server setup

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