# Website Screenshot: Full-Page PNG of Any Public URL (`politecrawl/website-screenshot`) Actor

Takes a full-page or viewport PNG screenshot of each public web page you list, in headless Chromium, at the screen size you choose. Reads only what robots.txt allows.

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

## Pricing

$4.00 / 1,000 results

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 of Any Public URL

### What it does

Give it a list of public web pages and it saves a PNG screenshot of each one. Every page is opened once in headless Chromium at the window size you choose. The tool captures the whole page, top to bottom, or only the visible window. Each screenshot goes to the run's key-value store, and the dataset gets one row per page with a link to the PNG, the page's title, its status and the image's size.

### Run it on a schedule

Use Apify Schedules to capture the same pages every day or week and keep a visual record of how they change. Apify's integrations, such as Google Drive, Make, Zapier or a webhook, can pick up each run's results.

### Input

- **Pages** (`urls`): addresses of public pages, one per line, such as `https://www.example.com/`. An address without `http://` or `https://` gets `https://`. Default: `https://books.toscrape.com/` and `https://quotes.toscrape.com/`, so a run with no changes gives real results.
- **Full page** (`fullPage`): on by default, to capture the whole page, up to 15,000 pixels tall. Off captures only the window.
- **Window width** (`viewportWidth`): 1280 pixels by default, from 320 to 3840. Use 390 for a phone-sized page.
- **Window height** (`viewportHeight`): 800 pixels by default, from 240 to 2160.
- **Wait after load** (`waitSeconds`): 1 second by default, from 0 to 10, for pages that draw late.
- **Most results** (`maxItems`): the most pages the run captures. Default 100. Each screenshot saved is one charged result.

### Sample output

One real item from a test run:

```json
{
  "url": "https://books.toscrape.com/",
  "finalUrl": "https://books.toscrape.com/",
  "statusCode": 200,
  "title": "All products | Books to Scrape - Sandbox",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/53BBNiSbrQ5QFUTK7/records/screenshot-001-books.toscrape.com.png?signature=1RNda8xIPaJ6ZPPgglHBF",
  "screenshotKey": "screenshot-001-books.toscrape.com.png",
  "fullPage": true,
  "width": 1280,
  "height": 2549,
  "cutOff": false,
  "bytes": 669831
}
```

### Price

You pay per result: the `result` event is charged once for each screenshot in the dataset. The price is shown on the Actor's page. A page that does not answer, answers with an error, or refuses is not saved and not charged.

### Limits

- It captures pages as a fresh visitor sees them: it never logs in, fills no forms and clicks no cookie banners, so a banner may show in the image.
- A full-page screenshot stops at 15,000 pixels; the row then says `cutOff: true`.
- It reads each site's `robots.txt` first and skips a page it does not allow, or whose `robots.txt` cannot be read. It opens one page at a time, at least one second apart, longer when `robots.txt` asks for it.
- A page that answers 401, 403, 429 or shows a CAPTCHA or bot check is skipped with no retry, and the run's status message names it. If every page refuses, the run ends as failed.
- It uses no proxy, so pages that block cloud servers are out of reach.
- The screenshots stay in the run's key-value store as long as Apify keeps the run's storage.
- Use it on pages you may capture, under each site's terms.

### FAQ

**Where are the images?** Each row's `screenshotUrl` opens the PNG. They are also in the run's key-value store, under the keys in `screenshotKey`.

**Why was a page skipped?** The run's status message and log say why: its `robots.txt`, an error answer, a refusal, or no answer.

# Actor input Schema

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

Addresses of the public pages to capture, one per line, such as https://www.example.com/. An address without http:// or https:// gets https://. The run reads each site's robots.txt first and skips a page it does not allow.

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

On: capture the whole page, top to bottom, up to 15,000 pixels tall. Off: capture only the visible window.

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

The browser window's width in pixels, from 320 to 3840. Use 390 for a phone.

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

The browser window's height in pixels, from 240 to 2160. It is the screenshot's height when Full page is off.

## `waitSeconds` (type: `integer`):

Seconds to wait after the page has loaded before the screenshot, from 0 to 10, for pages that draw late.

## `maxItems` (type: `integer`):

The run captures at most this many pages. Each screenshot saved is one charged result.

## Actor input object example

```json
{
  "urls": [
    "https://books.toscrape.com/",
    "https://quotes.toscrape.com/"
  ],
  "fullPage": true,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "waitSeconds": 1,
  "maxItems": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `run` (type: `string`):

No description

# 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://books.toscrape.com/",
        "https://quotes.toscrape.com/"
    ]
};

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

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

```

## MCP server setup

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