# 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, Automation
- **Features:** Limited permissions
- **Stats:** 8 total users, 5 monthly users, 90.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.88 / 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.
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

## 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.

> AI-agent ready: this Actor is callable and payable by AI agents via [x402](https://docs.apify.com/platform/integrations/x402) (USDC on Base), no Apify account required.

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(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 omao/website-screenshot --silent --output-dataset

```

## MCP server setup

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