# Website Screenshot — Full-Page PNG & JPEG Capture (`omao/website-screenshot`) Actor

Capture pixel-perfect screenshots of any web page: full-page or viewport, PNG or JPEG, custom size. One screenshot per URL, stored with a public image URL. Fast, no setup.

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

## Pricing

$3.00 / 1,000 screenshot captureds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Website Screenshot — Full-Page PNG & JPEG Capture

**Capture pixel-perfect screenshots of any web page — at scale, with zero setup.** Give this actor a list of URLs and get back one screenshot per URL, stored with a **public image URL** you can drop into a report, an email, a dashboard or an API response. Full-page or viewport, PNG or JPEG, custom size. No headless browser to run, no infrastructure to babysit.

A fast, reliable screenshot API for anyone who needs images of web pages on demand.

### Who uses this

- 🖼️ **Link previews & thumbnails** — generate preview images for shared URLs.
- 📊 **Monitoring & QA** — visually snapshot pages, competitors or deployments over time.
- 📰 **Archiving & compliance** — keep dated visual records of web pages.
- 🧑‍💻 **Developers & no-coders** — a screenshot API you call by URL, no Puppeteer to host.
- 📈 **Marketers & agencies** — capture landing pages, ads and SERPs for decks and audits.

### Features

- 🖥️ **Full-page** or viewport-only capture
- 🎨 **PNG** (lossless) or **JPEG** (smaller, with quality control)
- 📐 Custom **viewport size** (width × height)
- ⏱️ Control **when** to capture: `load`, `domcontentloaded`, `networkidle`, or `commit`
- 💤 Optional **extra delay** for late-loading animations
- 🛟 **Robust** — per-URL errors are reported, never fatal to the run

### What you get — one row per URL

| Field | Description |
|---|---|
| `screenshotUrl` | 🌐 **Public URL of the stored image** |
| `url` | Normalized URL captured |
| `format` | `png` or `jpeg` |
| `fullPage`, `viewportWidth`, `viewportHeight` | Capture settings used |
| `httpStatus`, `pageTitle`, `byteSize` | Page metadata |
| `ok`, `error` | Status & error message when a capture fails |

### Example

**Input**
```json
{
  "urls": ["https://apify.com", "example.com"],
  "fullPage": true,
  "format": "jpeg",
  "quality": 80,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "waitUntil": "networkidle"
}
````

**Output (one item)**

```json
{
  "url": "https://apify.com",
  "ok": true,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../records/apify-com.jpeg",
  "format": "jpeg", "fullPage": true,
  "viewportWidth": 1280, "viewportHeight": 800,
  "httpStatus": 200, "pageTitle": "Apify: Full-stack web scraping"
}
```

### Why this screenshot tool

- ✅ **Public image URLs** — use them anywhere, no extra hosting.
- 🌍 **Many URLs per run** — pass a list, get a batch of images.
- 🎛️ **Precise control** — format, quality, full-page, size and wait strategy.
- ⚡ **Fast & affordable** — pay only for successful screenshots.
- 🛟 **Reliable at scale** — one bad URL never breaks the batch.

### Input options

- `urls` *(required)* — pages to capture (`https://` added automatically if missing).
- `format` — `png` (lossless) or `jpeg` (smaller; set `quality` 1-100).
- `fullPage` — capture the whole scrollable page or just the viewport.
- `viewportWidth` / `viewportHeight` — viewport size in pixels.
- `waitUntil` — `load`, `domcontentloaded`, `networkidle` or `commit`.

### FAQ

**Full-page or just the visible area?** Both — set `fullPage` to `true` for the whole scrollable page or `false` for the viewport.

**PNG or JPEG?** Both — PNG is lossless; JPEG is smaller with adjustable `quality`.

**Where is the image stored?** In the run's key-value store, returned as a **public `screenshotUrl`** you can link directly.

**Can I capture many pages at once?** Yes — pass a list of URLs; each row carries its own image and metadata.

**What if a page fails to load?** That single URL is reported with an `error`; the rest of the batch still completes.

**What does it cost?** Pay-per-screenshot — you're only charged for successful captures.

***

*Tip: schedule this on your key pages to build a visual history, or wire the `screenshotUrl` straight into your app's link previews.*

# Actor input Schema

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

Web pages to capture. One screenshot per URL (https:// added if missing).

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

Capture the entire scrollable page (true) or just the viewport (false).

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

Output image format.

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

JPEG quality 1-100 (ignored for PNG).

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

Browser viewport width in pixels.

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

Browser viewport height in pixels.

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

When to consider navigation finished before capturing.

## `timeoutSeconds` (type: `integer`):

Max seconds to wait for each page to load.

## `delaySeconds` (type: `integer`):

Wait these seconds after load before capturing (for late animations).

## `healthCheckMode` (type: `boolean`):

Internal monitoring: capture a canary page and FAIL if broken (no billing).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "example.com"
  ],
  "fullPage": true,
  "format": "png",
  "quality": 80,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "waitUntil": "networkidle",
  "timeoutSeconds": 30,
  "delaySeconds": 0,
  "healthCheckMode": false
}
```

# Actor output Schema

## `screenshots` (type: `string`):

All captured screenshots (URL, public image URL, format, size, status).

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

# Run the Actor and wait for it to finish
run = client.actor("omao/website-screenshot").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 omao/website-screenshot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=omao/website-screenshot",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Website Screenshot — Full-Page PNG & JPEG Capture",
        "description": "Capture pixel-perfect screenshots of any web page: full-page or viewport, PNG or JPEG, custom size. One screenshot per URL, stored with a public image URL. Fast, no setup.",
        "version": "0.1",
        "x-build-id": "arhUvdL0eECG73eEV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/omao~website-screenshot/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-omao-website-screenshot",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/omao~website-screenshot/runs": {
            "post": {
                "operationId": "runs-sync-omao-website-screenshot",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/omao~website-screenshot/run-sync": {
            "post": {
                "operationId": "run-sync-omao-website-screenshot",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "Web pages to capture. One screenshot per URL (https:// added if missing).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "fullPage": {
                        "title": "Full page",
                        "type": "boolean",
                        "description": "Capture the entire scrollable page (true) or just the viewport (false).",
                        "default": true
                    },
                    "format": {
                        "title": "Image format",
                        "enum": [
                            "png",
                            "jpeg"
                        ],
                        "type": "string",
                        "description": "Output image format.",
                        "default": "png"
                    },
                    "quality": {
                        "title": "JPEG quality",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "JPEG quality 1-100 (ignored for PNG).",
                        "default": 80
                    },
                    "viewportWidth": {
                        "title": "Viewport width",
                        "minimum": 240,
                        "maximum": 3840,
                        "type": "integer",
                        "description": "Browser viewport width in pixels.",
                        "default": 1280
                    },
                    "viewportHeight": {
                        "title": "Viewport height",
                        "minimum": 240,
                        "maximum": 4320,
                        "type": "integer",
                        "description": "Browser viewport height in pixels.",
                        "default": 800
                    },
                    "waitUntil": {
                        "title": "Wait until",
                        "enum": [
                            "load",
                            "domcontentloaded",
                            "networkidle",
                            "commit"
                        ],
                        "type": "string",
                        "description": "When to consider navigation finished before capturing.",
                        "default": "networkidle"
                    },
                    "timeoutSeconds": {
                        "title": "Navigation timeout (s)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Max seconds to wait for each page to load.",
                        "default": 30
                    },
                    "delaySeconds": {
                        "title": "Extra delay before capture (s)",
                        "minimum": 0,
                        "maximum": 30,
                        "type": "integer",
                        "description": "Wait these seconds after load before capturing (for late animations).",
                        "default": 0
                    },
                    "healthCheckMode": {
                        "title": "Health-check mode",
                        "type": "boolean",
                        "description": "Internal monitoring: capture a canary page and FAIL if broken (no billing).",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
