# Website Screenshot: Full-Page PNG or JPEG of Any URL (`thoob/website-screenshot`) Actor

Takes screenshots of web pages with headless Chromium and returns a PNG or JPEG per URL in the key-value store, with final URL, HTTP status, title and image size. Only screenshots of pages that answered with a status below 400 are billed.

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

## Pricing

from $1.00 / 1,000 screenshot takens

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: Full-Page PNG or JPEG of Any URL

This actor opens each URL in headless Chromium and saves a PNG or JPEG screenshot. It is for developers, QA teams, archivists and analysts who need visual records of public web pages in bulk.

### What you get

- One row per input URL with `url`, `finalUrl`, `httpStatus` and `title`
- The image in the run's default key-value store, with `screenshotKey` and a public `screenshotUrl`
- Capture settings: `format`, `fullPage`, `viewportWidth`, `viewportHeight` (the viewport actually used), `device`, `selector`, and `bytes` (image size)
- `error` when something failed, plus `sourceUrl` and `retrievedAt`

### Input

```json
{
  "urls": ["https://ponodata.com", "https://apify.com"],
  "fullPage": false,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "device": "desktop",
  "selector": "",
  "format": "png",
  "waitUntil": "load",
  "delayMs": 0,
  "maxRecords": 0
}
```

- `urls` (required): http or https URLs. A bare domain gets `https://`. Duplicates are dropped with a warning.
- `fullPage`: capture the whole page instead of the viewport.
- `viewportWidth` 320 to 3840, `viewportHeight` 240 to 2160.
- `device`: `desktop` (default), `tablet` or `mobile`. Tablet and mobile use the fixed sizes below, emulate a touch screen, and ignore `viewportWidth` and `viewportHeight`.
- `selector`: optional CSS selector, up to 500 characters. Only the first matching element is captured and `fullPage` is ignored. If no match is visible within 10 seconds, the row gets the error `selector not found: ` followed by the selector.
- `format`: `png` or `jpeg`. `jpegQuality` (1 to 100, default 80) applies to JPEG only.
- `waitUntil`: `load`, `domcontentloaded` or `networkidle`. `delayMs` (0 to 10000) adds a wait after that. With `networkidle` the capture waits up to 15 seconds after load for the network to go quiet, then captures anyway and says so in the log.
- `delay`: same as `delayMs`.
- `selectorsToHide`: CSS selectors, one per line, hidden before the capture. If they cannot be applied, the capture goes ahead with a log warning.
- `scrollToBottom`: scroll to the end of the page before the capture so lazy content loads.
- `delayAfterScrolling` (0 to 10000, default 2500): wait after scrolling, before the capture.
- `waitUntilNetworkIdleAfterScroll`: after scrolling, wait until no requests are in flight for a short quiet period.
- `waitUntilNetworkIdleAfterScrollTimeout` (1000 to 60000, default 30000): longest wait for that quiet period, then the capture goes ahead with a log warning.
- `maxRecords`: cap on billed screenshots. 0 means no cap.

Inputs written for other screenshot actors that use `delay`, `networkidle0` or `networkidle2` run unchanged here. Both `networkidle0` and `networkidle2` behave as `networkidle`.

| Device | Viewport | Scale |
|---|---|---|
| desktop | `viewportWidth` x `viewportHeight` (default 1280 x 800) | 1 |
| tablet | 820 x 1180 | 2 |
| mobile | 390 x 844 | 2 |

### Output

Illustration only, values may differ:

```json
{
  "url": "https://ponodata.com",
  "finalUrl": "https://ponodata.com/",
  "httpStatus": 200,
  "title": "Pono Data",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../records/screenshot-1-ponodata-com.png",
  "screenshotKey": "screenshot-1-ponodata-com.png",
  "format": "png",
  "fullPage": false,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "device": "desktop",
  "selector": null,
  "bytes": 184233,
  "error": null,
  "sourceUrl": "https://ponodata.com/",
  "retrievedAt": "2025-01-15T12:00:00Z"
}
```

### Who uses it

- QA testers who capture staging pages at set `viewportWidth`, `viewportHeight` and `device` values to check layouts.
- Content and SEO teams who archive how pages looked, using `title`, `finalUrl` and `retrievedAt` as the record.
- Compliance reviewers who keep dated captures of landing pages or terms pages.
- Developers who capture one component with `selector` for docs or change reviews.

### Pricing

Pay per event `screenshot`. You are charged only for screenshots of pages that answered with a status below 400. Every other row is free: pages blocked by robots.txt, navigation errors, timeouts, and pages with status 400 and up (no image is taken or stored for them). Blank pages, missing selectors and error pages are never billed. When your spend cap is reached, the run stops cleanly and stores no image it did not charge for.

### Limits

- Full-page captures are clipped at 16384 px tall.
- Each page gets 45 seconds to load. Two pages are captured in parallel.
- Content that loads only on scroll may be missing.
- A page with no text and no visible media is treated as blank: no image is taken and the row gets the error `blank page, nothing billed`.

### FAQ

#### What format does `urls` take?

A list of full page addresses, such as `https://example.com/pricing`. Only `urls` is required. `fullPage`, `format`, `device` and the viewport settings are optional.

#### What does a row with an error mean?

A row with `error` set, or with an `httpStatus` of 400 or above, means the page was unreachable or returned an error page. Those rows are not billed.

#### Where are the images stored?

Each image is saved in the run's key-value store under `screenshotKey`, and `screenshotUrl` points to it. `bytes` gives the image size.

#### Can it run on a schedule or through the API?

Yes. Use Apify Schedules for recurring captures, or start runs through the Apify API with the same input JSON.

### Compliance

- Public sources only: no login, no CAPTCHA solving, no proxy.
- Honest User-Agent on every device: the browser's own user agent with `PonoDataActors/1.0 (+https://ponodata.com)` appended.
- robots.txt is obeyed. It is read once per site; disallowed URLs are never opened and become free rows with error `blocked by robots.txt`. If robots.txt answers with a server error, that site is skipped.
- Found on the page only: the image shows what the page rendered. Nothing hidden is decoded or rewritten.

# Actor input Schema

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

http or https URLs, one per line. A bare domain gets https://. Duplicates are dropped with a warning.

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

Capture the whole page instead of the viewport. Full-page captures are clipped at 16384 px tall.

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

Browser viewport width in pixels.

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

Browser viewport height in pixels.

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

Device preset. tablet and mobile use fixed viewports and ignore viewportWidth and viewportHeight.

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

Optional CSS selector. If set, only the first matching element is captured and fullPage is ignored.

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

PNG or JPEG.

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

JPEG quality from 1 to 100. Used for JPEG only.

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

Page event that ends navigation before the capture.

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

Extra wait after load, before the screenshot.

## `delay` (type: `integer`):

Same as delayMs. Accepted so inputs written for other screenshot actors work as is.

## `selectorsToHide` (type: `string`):

CSS selectors, one per line. Matching elements are hidden before the capture.

## `scrollToBottom` (type: `boolean`):

Scroll to the end of the page before the capture so lazy content loads.

## `delayAfterScrolling` (type: `integer`):

Wait after scrolling, before the capture. Used only with scrollToBottom.

## `waitUntilNetworkIdleAfterScroll` (type: `boolean`):

After scrolling, wait until no requests are in flight for a short quiet period. Used only with scrollToBottom.

## `waitUntilNetworkIdleAfterScrollTimeout` (type: `integer`):

Longest wait for a quiet network after scrolling. When it runs out, the capture goes ahead and the log says so.

## `maxRecords` (type: `integer`):

Cap on delivered, billed screenshots. 0 means no cap. Free rows are not counted. The platform spend cap is honored regardless.

## Actor input object example

```json
{
  "urls": [
    "https://ponodata.com",
    "https://apify.com"
  ],
  "fullPage": false,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "device": "desktop",
  "selector": "",
  "format": "png",
  "jpegQuality": 80,
  "waitUntil": "load",
  "scrollToBottom": false,
  "delayAfterScrolling": 2500,
  "waitUntilNetworkIdleAfterScroll": false,
  "waitUntilNetworkIdleAfterScrollTimeout": 30000,
  "maxRecords": 0
}
```

# Actor output Schema

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

One row per input URL.

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

Keys of the screenshot images in the default key-value store.

# 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://ponodata.com",
        "https://apify.com"
    ]
};

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

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

```

## MCP server setup

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