# Website Screenshot API – PNG/JPEG, full page, mobile – $2.5/1k (`henrycrawl/website-screenshot-api`) Actor

Screenshot any public URL as PNG or JPEG: viewport or full page, custom size, delay, iPhone/Android/iPad emulation. Each row gives a public image URL, width, height and bytes. Works with AI agents via Apify MCP. Pay per screenshot; errors free.

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

## Pricing

$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

Need a picture of a web page for a report, a monitor, a thumbnail or an AI agent that "looks" at a site? This actor opens each public URL in a real Chromium browser and saves a PNG or JPEG screenshot. Each row gives you a ready-to-open image URL plus width, height and file size.

### Features

- **Viewport or full page** (full page capped by `maxHeight`, default 10,000 px)
- **Custom viewport** width and height for desktop
- **Device emulation:** iPhone 13, Android (Pixel 7), iPad, with real screen size, pixel ratio and user agent
- **Delay** before capture and **wait until** `load` / `domcontentloaded` / `networkidle`
- **PNG or JPEG** (with quality setting)
- Parallel capture, slow pages are captured as rendered so far

### Output fields

| Field | Description |
|---|---|
| `url` / `finalUrl` | Requested URL and the URL after redirects |
| `statusCode` | HTTP status of the page |
| `title` | Page title |
| `screenshotUrl` | Public link to the image (stored in the run's key-value store) |
| `key` | Record key of the image in the key-value store |
| `format` | `png` or `jpeg` |
| `width`, `height` | Image size in pixels (read from the image itself) |
| `bytes` | Image file size |
| `device`, `fullPage`, `viewport` | Capture settings used |
| `loadSeconds` | Time to load and capture |
| `type`, `status` | `result` / `OK`, or `error` with a code (`BLOCKED`, `HTTP_ERROR`, `LOAD_FAILED`, `SCREENSHOT_FAILED`) |

**Public pages only.** Pages that need a login, answer 401/403/429, or show a captcha or bot check are not bypassed. They return a free `BLOCKED` row and no screenshot.

### Example output (real run)

```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/LklLssaTse2miac1x/records/screenshot-a7a6c5c71f06be5e.png?signature=10IxasYtBZooA5xjLuMYx",
 "key": "screenshot-a7a6c5c71f06be5e.png",
 "format": "png",
 "width": 1280,
 "height": 800,
 "bytes": 98133,
 "device": "desktop",
 "fullPage": false,
 "viewport": {"width": 1280, "height": 800},
 "loadSeconds": 0.52,
 "type": "result",
 "status": "OK"
}
```

Images stay in the run's key-value store for its normal data retention period. Download them if you need them longer.

### Pricing

**$2.50 per 1,000 screenshots** (pay per event, $0.0025 per screenshot). Blocked and error rows are free. `maxResults` caps what you pay in a run.

### Use with AI agents (MCP)

Give Claude, Cursor or any MCP client a "take a screenshot of this site" tool:

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

The agent gets back a public image URL it can open or pass on.

### Example input

```json
{
  "urls": ["https://www.python.org/", "https://www.wikipedia.org/"],
  "device": "iphone",
  "fullPage": true,
  "maxHeight": 6000,
  "delaySecs": 1,
  "format": "png",
  "maxResults": 50
}
```

# Actor input Schema

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

Public web pages to screenshot (one per line). Pages behind login, captcha or bot walls are NOT bypassed: they return a free BLOCKED row.

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

Emulated device. Mobile/tablet devices use their own screen size, pixel ratio and user agent (viewport width/height are ignored).

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

Capture the whole scrollable page instead of only the visible viewport (capped by Max height).

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

Desktop browser width.

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

Desktop browser height (= image height when Full page is off).

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

Full-page screenshots are cut at this height.

## `delaySecs` (type: `integer`):

Extra wait after the page loads (for animations, lazy images).

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

Page load event to wait for before capturing.

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

PNG (lossless) or JPEG (smaller).

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

1-100, only for JPEG.

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

Max time to load a page; a slow page is captured as rendered so far.

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

Pages captured in parallel (more needs more memory).

## `maxResults` (type: `integer`):

Maximum number of screenshots for the whole run (you are only charged for delivered screenshots; error rows are free).

## Actor input object example

```json
{
  "urls": [
    "https://example.com/",
    "https://www.wikipedia.org/",
    "https://www.python.org/",
    "https://developer.mozilla.org/en-US/",
    "https://www.debian.org/",
    "https://www.rust-lang.org/",
    "https://go.dev/",
    "https://nodejs.org/en",
    "https://www.djangoproject.com/",
    "https://www.postgresql.org/",
    "https://www.sqlite.org/",
    "https://httpbin.org/"
  ],
  "device": "desktop",
  "fullPage": false,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "maxHeight": 10000,
  "delaySecs": 0,
  "waitUntil": "load",
  "format": "png",
  "jpegQuality": 80,
  "timeoutSecs": 30,
  "maxConcurrency": 3,
  "maxResults": 20
}
```

# Actor output Schema

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

One row per result, plus free error rows (type = error).

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

Counts for this run (SUMMARY record).

# 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.wikipedia.org/",
        "https://www.python.org/",
        "https://developer.mozilla.org/en-US/",
        "https://www.debian.org/",
        "https://www.rust-lang.org/",
        "https://go.dev/",
        "https://nodejs.org/en",
        "https://www.djangoproject.com/",
        "https://www.postgresql.org/",
        "https://www.sqlite.org/",
        "https://httpbin.org/"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("henrycrawl/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://www.wikipedia.org/",
        "https://www.python.org/",
        "https://developer.mozilla.org/en-US/",
        "https://www.debian.org/",
        "https://www.rust-lang.org/",
        "https://go.dev/",
        "https://nodejs.org/en",
        "https://www.djangoproject.com/",
        "https://www.postgresql.org/",
        "https://www.sqlite.org/",
        "https://httpbin.org/",
    ],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("henrycrawl/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://www.wikipedia.org/",
    "https://www.python.org/",
    "https://developer.mozilla.org/en-US/",
    "https://www.debian.org/",
    "https://www.rust-lang.org/",
    "https://go.dev/",
    "https://nodejs.org/en",
    "https://www.djangoproject.com/",
    "https://www.postgresql.org/",
    "https://www.sqlite.org/",
    "https://httpbin.org/"
  ],
  "maxResults": 20
}' |
apify call henrycrawl/website-screenshot-api --silent --output-dataset

```

## MCP server setup

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