# Website Screenshot API: Full-Page Screenshots and PDF (`greenrun/website-screenshot`) Actor

Screenshots of public web pages as PNG, JPEG, WebP or PDF: full page or viewport, device presets, hidden cookie banners, one element. robots.txt respected, no proxies or stealth. Pages that are blocked, missing or fail to load are free.

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

## Pricing

from $3.00 / 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 Screenshots and PDF

Screenshots of public web pages as PNG, JPEG, WebP or PDF: full page or viewport, device presets, hidden cookie banners, one element. robots.txt respected, no proxies or stealth. Pages that are blocked, missing or fail to load are free.

Give it a list of web pages and get **a full-page screenshot or a PDF of each one**, stored in your run with a direct link, together with the page title, the final URL, the HTTP status and the image size. Pick **desktop, laptop, tablet, mobile or Android**, hide **cookie banners** and your own elements, capture **one element** such as a pricing table, or switch on **dark mode**. **You pay only for pages that were captured; pages blocked by robots.txt or by the site, missing pages and pages that fail to load are free**, with the reason in the row. Made for visual monitoring, archiving, design reviews, reports and AI agents that need to see a page.

### What it does

- **Captures** the full scrollable page (up to a height you set) or the first screen, as PNG, JPEG, WebP or an A4 PDF printed by Chrome.
- **Emulates devices**: desktop 1920x1080, laptop 1440x900, iPad Pro 11, iPhone 15 and Pixel 7, with their pixel density and touch, or your own viewport size.
- **Hides cookie banners** of common consent platforms (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, CookieYes and others) with CSS, without clicking or accepting anything, plus any selectors you list.
- **Scrolls first** so lazy-loaded images appear in full-page captures, and skips analytics, ads and chat widgets so pages load faster and look clean.
- **Captures one element** with a CSS selector, for example `#pricing` or `main`.
- **Returns** title, final URL, HTTP status, image width and height, page height and a link to the file.

### Why use it

- **Pay only for captures.** A page that robots.txt disallows, a 404, a 403, a bot check page or a page that does not load costs nothing, and each says why in `error`.
- **Honest browser.** No stealth plugins, no proxies, no CAPTCHA solving: the browser says who it is, robots.txt is checked before the page and before every main-frame navigation, including redirects.
- **Safe for automation.** Requests from the page to private or local network addresses are blocked, so a page cannot make the browser read internal services.
- **Built for AI agents.** Clear status messages, a predictable price per screenshot, and limited permissions, so it works as a tool in the Apify MCP server.

### How to use

#### In Apify Console

1. Paste the pages into **Web pages**, one per line.
2. Choose **Format**, **Device** and whether you want the **Full page**.
3. Optional: list chat widgets or sticky headers in **Hide these elements**, or capture **one element**.
4. Press **Start**. The **Screenshots** view shows thumbnails with links; the files are in the run's key-value store.

#### From an AI agent (MCP)

Connect any MCP client to the Apify MCP server with only this Actor as a tool:

```
https://mcp.apify.com?tools=greenrun/website-screenshot
```

#### Through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/greenrun~website-screenshot/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://docs.apify.com", "https://www.python.org"], "device": "mobile", "format": "webp"}'
```

### Input

| Field | Default | Description |
|---|---|---|
| `urls` | | Public web pages, one per line. |
| `format` | `png` | `png`, `jpeg`, `webp` or `pdf` (A4). |
| `fullPage` | `true` | The whole page (up to `maxHeight`) or only the first screen. |
| `device` | `desktop` | `desktop`, `laptop`, `tablet`, `mobile` or `android`. |
| `viewportWidth`, `viewportHeight` | | Optional size that overrides the device. |
| `hideCookieBanners` | `true` | Hide common consent banners with CSS and do not load consent platform scripts. |
| `blockTrackers` | `true` | Do not load analytics, tag managers, ads and chat widgets. |
| `hideSelectors` | | CSS selectors to hide, for example `#intercom-container`. |
| `selector` | | Capture only the first element matching this CSS selector. |
| `darkMode` | `false` | Ask the page for its dark color scheme. |
| `quality` | `80` | JPEG and WebP quality (1-100). |
| `waitUntil` | `load` | `load` (at most 10 s after the HTML), `domcontentloaded` or `networkidle` (up to 5 s more). |
| `delaySecs` | `0.5` | Extra wait after loading (0-30). |
| `scrollToLoad` | `true` | Scroll first so lazy images load (full page only). |
| `maxHeight` | `10000` | Full-page and element captures stop at this height in CSS pixels (500-30000). |
| `timeoutSecs` | `30` | Time limit for one page (5-180). |
| `maxConcurrency` | `2` | Pages captured at the same time (1-8). |

### Output

Two rows from runs on the Apify platform on 21 November 2026 (a captured page and a missing one), the link shortened:

```json
{
  "index": 1,
  "input": "https://www.python.org/",
  "url": "https://www.python.org/",
  "status": "captured",
  "finalUrl": "https://www.python.org/",
  "httpStatus": 200,
  "title": "Welcome to Python.org",
  "format": "png",
  "device": "desktop",
  "fullPage": true,
  "selector": null,
  "width": 1920,
  "height": 2571,
  "pageHeight": 2571,
  "truncated": false,
  "sizeBytes": 394025,
  "key": "0001-www.python.org.png",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/7eL0FBWnjjsa4Ap3C/records/0001-www.python.org.png?signature=...",
  "loadTimeMs": 203,
  "capturedAt": "2026-11-21T16:32:28Z",
  "warnings": [],
  "error": null,
  "billableEvents": {"screenshot": 1},
  "workGbSecs": 1.7
}
```

```json
{
  "index": 1,
  "input": "https://www.python.org/zz-audyt-404-a",
  "url": "https://www.python.org/zz-audyt-404-a",
  "status": "not_found",
  "finalUrl": "https://www.python.org/zz-audyt-404-a",
  "httpStatus": 404,
  "width": null,
  "height": null,
  "key": null,
  "screenshotUrl": null,
  "capturedAt": "2026-11-21T16:28:40Z",
  "warnings": [],
  "error": "HTTP 404: not found",
  "billableEvents": {"screenshot": 0},
  "workGbSecs": 0.8
}
```

The files are in the run's key-value store under `key`; `RUN-REPORT` there counts the results and lists the pages that were not charged, with the reason, and any pages the run did not process (`notProcessedInputs`). Each row shows its Screenshot events in `billableEvents` and the work on the page in `workGbSecs` (see Pricing).

`status` is `captured` (charged), or `blocked` (robots.txt, the site refused access or showed a bot check, or a private address), `not_found` or `error`, which are free when the page did not load. Long pages cut at `maxHeight` or a size limit have `truncated: true` and a warning.

### Pricing

Pay per event, no subscription:

| Event | Price | When |
|---|---|---|
| Actor start | $0.0045 per GB of memory | Once per run: $0.009 at the default 2 GB. |
| Screenshot | $0.003 | A page that loaded and was captured. A slow page or a large file counts more Screenshots (below). |

**How Screenshots are counted.** One Screenshot covers 28.8 GB-seconds of work on a page: 14.4 seconds at the default 2 GB of memory (7.2 s at 4 GB), with the run time shared equally between the pages captured at the same time, and a file of up to 2 MB. A page that takes longer counts one more Screenshot for each started 28.8 GB-s, and each MB of the file above 2 MB counts as 1 GB-s. Most pages take 1 to 9 GB-s (python.org 1.7, the long Wikipedia article on Poland 8.1 in a run on 21 November 2026); long waits (`delaySecs`, `networkidle`, slow servers) and more memory make pages count more: example.com with `delaySecs` 30 took 62.4 GB-s, so 3 Screenshots. Each row shows its count in `billableEvents` and its work in `workGbSecs`.

Example: 1,000 typical full-page screenshots at 2 GB cost about $3.00, plus $0.009 per run.

Free: pages that robots.txt disallows, pages that refuse access or show a bot check, missing pages and pages that fail before they load. A page is charged once it has loaded (HTTP status below 400, no bot check, your `selector` found); if its capture then fails, the row is `error` and keeps its Screenshots.

**Runs of mostly free pages stop early.** Blocked, missing and unreachable pages are free, so the time they take is paid only by the Actor start and by the pages captured in the same run. When that time is used up, the run stops and lists the pages it did not process in `RUN-REPORT` under `notProcessedInputs`; start them in a new run.

You can cap the cost of a run with the maximum charge in the run options (at least $0.05); the run stops cleanly at that limit and the status message says so.

### Limits

- No login, cookies, proxies, stealth or CAPTCHA solving: pages behind them come back as `blocked` or `error`, for free.
- Cookie banners are hidden, not accepted, so content that a site shows only after consent stays hidden.
- Some sites refuse requests from data centers (for example with HTTP 403); those pages are free.
- Memory: the default 2 GB is the cheapest per page. More memory makes pages faster, but each second costs more, so one Screenshot covers less time (7.2 s at 4 GB, 3.6 s at 8 GB).
- Very long pages and elements are cut at `maxHeight` (10,000 px by default), at 40 megapixels per image (about 20,800 px at 1920 px wide) and, for WebP, at 16,383 px. The row has `truncated: true` and says where it was cut.

### FAQ

**Do you keep the screenshots?** No. Files and rows stay in your run's key-value store and dataset in your own Apify account, under your data retention settings.

**Why was a page not charged?** Each free row has its reason in the `error` field, and the `RUN-REPORT` record in the key-value store counts them.

**Something is wrong with a result?** Open an issue on the Actor's **Issues** tab with the page URL.

# Actor input Schema

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

Public web pages (http or https), one per line. Each page gives one file in the key-value store and one row with its link.

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

PNG (sharp, larger), JPEG or WebP (smaller, with quality below), or PDF (the page printed by Chrome, A4).

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

Capture the whole scrollable page (up to Max height). Off: only the first screen.

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

Screen size and type: desktop 1920x1080, laptop 1440x900, tablet (iPad Pro 11), mobile (iPhone 15), Android (Pixel 7). Tablet and phones use their pixel density and touch.

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

Optional: override the device width.

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

Optional: override the device height (the first screen when Full page is off).

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

Hide the consent banners of common platforms (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, CookieYes and others) with CSS. Nothing is clicked or accepted.

## `blockTrackers` (type: `boolean`):

Do not load analytics, tag managers, ad networks and chat widgets (Google Tag Manager, Hotjar, Intercom and similar). Faster and cleaner screenshots; turn off if a page needs them to show its content. Videos are never loaded.

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

CSS selectors of elements to hide before the capture, for example chat widgets or sticky headers: #intercom-container, .newsletter-popup.

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

Optional CSS selector: capture only the first matching element instead of the page, for example #pricing or main.

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

Ask the page for its dark color scheme (prefers-color-scheme: dark).

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

1-100; higher is sharper and larger.

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

When the page counts as loaded: the load event (default, at most 10 s after the HTML), the HTML only (faster), or network idle (up to 5 s more, for pages that load data late).

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

Wait this long after loading, for animations and late images (0-30).

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

With Full page: scroll through the page first so lazy-loaded images appear in the capture.

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

Full-page captures of very long pages stop at this height; the row then has truncated: true.

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

A page that does not load within this time fails for free.

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

Pages captured at the same time in one browser. Each needs memory: keep 1-2 per 2 GB.

## Actor input object example

```json
{
  "urls": [
    "https://docs.apify.com",
    "https://www.python.org"
  ],
  "format": "png",
  "fullPage": true,
  "device": "desktop",
  "hideCookieBanners": true,
  "blockTrackers": true,
  "darkMode": false,
  "quality": 80,
  "waitUntil": "load",
  "delaySecs": 0.5,
  "scrollToLoad": true,
  "maxHeight": 10000,
  "timeoutSecs": 30,
  "maxConcurrency": 2
}
```

# Actor output Schema

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

No description

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

No description

## `report` (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://docs.apify.com",
        "https://www.python.org"
    ]
};

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

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

```

## MCP server setup

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