# Website Screenshot API (`site-shot/website-screenshot-api`) Actor

Capture screenshots of public web pages by URL: full page or first screen, PNG, JPEG or WebP. A capture that returned no readable image, timed out without a picture or hit an HTTP error page is reported as failed and is not billed.

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

## Pricing

from $2.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

Capture screenshots of public web pages by URL. Give the Actor a list of addresses and it returns an image for each page it could capture: the full scrollable page or just the first screen, as PNG, JPEG or WebP.

You pay per screenshot that was delivered. A capture that returned no readable image, timed out without producing a picture, or landed on an HTTP error page is reported as failed and is **not billed**.

### What it is for

- Keeping dated visual records of pages: prices, listings, terms, ads, search results.
- Checking how pages look after a release, a migration or a content change.
- Thumbnails and previews for directories, dashboards and reports.
- Giving an AI agent a picture of a page next to its text.

### How to use it

1. Paste the page addresses into **Page URLs**, one per line. `example.com` is read as `https://example.com`.
2. Leave **Full page** on to capture the whole page, or turn it off for the first screen only.
3. Start the run. Every page the run got to becomes one row in the dataset: a captured page has a link to its image, a failed page has the reason.

From the API, send the same input as JSON:

```json
{
    "urls": ["https://apify.com", "https://example.com/pricing"],
    "fullPage": true,
    "width": 1280,
    "format": "png"
}
```

### Input

| Field | What it does | Default | Range |
| --- | --- | --- | --- |
| `urls` | Pages to capture. | required | 1 to 1,000 per run |
| `fullPage` | Whole scrollable page instead of the first screen. | `true` | |
| `width` | Browser window width in pixels. | 1280 | 320 to 3840 |
| `height` | Browser window height in pixels. | 800 | 200 to 4000 |
| `format` | `png`, `jpeg` or `webp`. | `png` | |
| `delayMs` | Extra wait after the page has loaded, for content drawn by JavaScript. | 1000 | 0 to 20000 |
| `hideCookieBanners` | Hide most cookie-consent banners. A banner the site draws itself can remain. | `true` | |
| `blockAds` | Block ads from common ad networks. | `false` | |
| `maxHeight` | Cut a full-page capture at this height in pixels. | 16000 | 200 to 20000 |
| `scaledWidth` | Resize the finished image to this width. | off | 50 to 3840 |

### Output

One dataset row per page that was processed, in the order results arrive. Up to four pages are captured at a time, so the order can differ from your list; `index` is the page's position in `urls`, starting at 1.

```json
{
    "index": 2,
    "url": "https://example.com/pricing",
    "status": "succeeded",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/screenshot-0002.png?signature=<signature>",
    "screenshotKey": "screenshot-0002.png",
    "format": "png",
    "bytes": 184302,
    "pageStatusCode": 200,
    "error": null,
    "fullPage": true,
    "width": 1280,
    "height": 800,
    "capturedAt": "2026-11-20T10:00:00.000Z"
}
```

- The image is stored in the run's default key-value store under `screenshotKey`. The number in the key is the same as `index`. JPEG files have the `.jpg` extension.
- Use `screenshotUrl` as it is given; it can carry a signature.
- `width` and `height` are the window size you asked for, not the size of the image. `url` is the address as it was requested, so `example.com` appears as `https://example.com/`.
- `capturedAt` is the time the capture finished.
- A failed page has `"status": "failed"`, no image, and the reason in `error`. Failed pages are rows too, so the number of rows is not the number of billed screenshots: count the rows with `status` `succeeded`.
- An address listed twice is captured and billed twice.
- Images are kept as long as the run's storage is kept under your plan's data retention. Copy the files you need to keep.

### What counts as a failed capture

A failed row is never billed. A capture fails when:

- the page did not finish loading within the time limit (about three minutes) and no picture of it was taken;
- the page answered with an HTTP error, 400 or above, such as 403, 404 or 503;
- the address is not a public web page (`localhost`, private network addresses, non-web schemes);
- the result came back without a readable image or without the page's HTTP status;
- the image is too large to deliver (lower `maxHeight` or set `scaledWidth`);
- the address does not exist or the site could not be reached;
- the capture service was busy or unreachable (a request that never got through is tried three times; one that broke off part-way is not repeated);
- the screenshot could not be stored.

The result is checked before anything is saved: a page that answered with an HTTP error, and a time-out notice that the renderer marks as one, are not stored as your page. What is not checked is the picture itself: a page that loaded and answered normally is captured as it is. If the site shows a login wall, a consent screen, a bot check or an empty page, that is what the screenshot shows, and it is billed. If the page was still loading when time ran out but a picture of it was taken, that picture is delivered and billed.

A page that failed is not captured again in the same run. If the capture service refuses the Actor's requests altogether, the run stops and is marked failed; pages not yet started are not captured and not billed. If the service is only busy or unreachable, each affected page fails without a charge and the run carries on with the next page.

### How full-page capture works

The page is opened in a Chromium browser and scrolled first, which brings in most images that load on scroll; endless feeds and slow images can still be missing. The whole page is then captured in one shot rather than stitched from pieces, so a header fixed to the top appears once. Very long pages are cut at `maxHeight`; WebP images cannot be taller than 16,383 px.

### Pricing

The Actor uses pay-per-event pricing. Apart from the platform's small Actor start event, charged once per run, the only charge is the **screenshot** event: once for each page that ends with `"status": "succeeded"`. Failed pages and pages that were never started add nothing.

If you set a maximum cost for the run, the Actor stops starting new captures when the limit is reached and says so in the run's status message. The pages it did not get to have no rows.

If the run is aborted, captures in progress are dropped and not billed; screenshots already delivered stay and are billed. If the platform restarts the run, it continues with the pages that have no row yet.

On the platform's free plan a run processes the first 25 pages of the list. The rest is skipped without rows.

### Limits

- Public pages only: nothing behind a login and no private network addresses.
- No custom cookies, headers, scripts or user agent in this version.
- One image per page; no video and no PDF.
- Up to 1,000 pages per run. For larger lists, split them across runs.

### FAQ

**The screenshot is missing content that I see in my browser.**
Raise `delayMs` so the page has time to draw. Pages that build their content with JavaScript after loading often need 2,000 to 5,000 ms.

**I got "The page answered with HTTP 403".**
The site refused the request. Nothing was billed.

**Can I capture the mobile layout?**
Set `width` to 390 and `height` to 844. The page is laid out in a 390 px wide window, so responsive designs switch to their narrow layout. The browser still identifies itself as a desktop browser, so a site that picks its mobile version by user agent serves the desktop one.

**Something else is wrong.**
Open an issue on the Issues tab with the run ID and the address that failed.

# Actor input Schema

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

Public web pages to capture, one per line. A bare domain such as example.com is read as https://example.com.

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

Capture the whole scrollable page instead of the first screen. The page is scrolled first so that images loading on scroll have a chance to appear.

## `width` (type: `integer`):

Browser window width. A width of 390 gives the narrow layout of a responsive site.

## `height` (type: `integer`):

Browser window height. With Full page on, this is only the window the page is loaded in.

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

PNG and WebP are lossless; WebP files are smaller than PNG. JPEG is lossy and is the smallest on photo-heavy pages.

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

Extra wait after the page has loaded, for pages that draw their content with JavaScript.

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

Hide most cookie-consent banners before the capture. A banner the site draws itself can remain.

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

Block ads from common ad networks before the capture.

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

Cuts a full-page capture at this height. WebP images cannot be taller than 16,383 px.

## `scaledWidth` (type: `integer`):

Resize the finished image to this width, keeping proportions. Leave empty for full resolution.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "fullPage": true,
  "width": 1280,
  "height": 800,
  "format": "png",
  "delayMs": 1000,
  "hideCookieBanners": true,
  "blockAds": false,
  "maxHeight": 16000
}
```

# Actor output Schema

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

One row per processed page: status, image link, page HTTP status and, for a failed page, the reason.

## `images` (type: `string`):

The image files, stored under the screenshotKey of each row.

# 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("site-shot/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("site-shot/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 site-shot/website-screenshot-api --silent --output-dataset

```

## MCP server setup

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