# Website Screenshot API - URL to PNG, JPEG & PDF (`pshivam/website-screenshot-scraper`) Actor

Take screenshots of any web page, or of your own HTML, in bulk: PNG, JPEG or PDF, full page or one element, any screen size, retina scale, dark mode, delay and wait settings. Files are stored with a link for each. Export the list to Excel, CSV or API.

- **URL**: https://apify.com/pshivam/website-screenshot-scraper.md
- **Developed by:** [Shivam Prajapati](https://apify.com/pshivam) (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

from $2.80 / 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.
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 API - URL to PNG, JPEG & PDF

**Take screenshots of web pages in bulk, with one call: PNG, JPEG or PDF, full page or a single element, any screen size, retina scale, dark mode, with a delay or a wait for the page to settle.** Give page links or your own HTML. Every screenshot is stored as a file with a link in the results. No login, no extra tools, no browser to run yourself. Export the list to Excel, CSV, JSON or the API.

**Actively maintained.** Last update: 2026-11-19. Every release passes 100+ automated tests, including a real Chromium that draws pages, element shots, PDFs and error pages.

### What can you use it for?

- **Website monitoring and archives.** Capture the same pages every day and keep the pictures: price pages, competitor pages, terms, landing pages.
- **Link previews and thumbnails.** One image per link for a directory, a newsletter, a report or a dashboard.
- **Reports and PDFs.** Turn HTML (invoices, reports, certificates, emails) into PDF or PNG with the browser's own rendering.
- **Visual checks.** Look at a page at phone, tablet and desktop widths, in light and dark mode, before you publish.
- **Proof and evidence.** A dated picture of a page as it looked, with the status and the final address.
- **Ads and social cards.** Draw an HTML template as an image, one per row of your data.

### What data can you get?

Give page links, your own HTML, or both. Every row is one page and holds the links to its files.

| You give | You get |
|---|---|
| `urls`: page links | One record per page, with the link of each file made |
| `html`: an HTML document | The same, for your own HTML |
| `formats`: png, jpeg, pdf | One file of each format, per page, in the run's key-value store |
| `fullPage`, `selector`, `viewportWidth`, `deviceScaleFactor`, `colorScheme`, `delaySeconds` | The picture the way you want it |

#### Fields

A field that does not apply, such as the PDF link when PDF was not asked for, is `null`.

##### The page

| Field | What it is |
|---|---|
| `source` | url for a page opened by its address, html for a document you gave. |
| `url` | The address you gave. For an HTML document, a short id made from its text. |
| `finalUrl` | The address the page ended on after redirects. Empty for HTML. |
| `httpStatus` | The HTTP status of the page. Empty for HTML. |
| `title` | The title of the page. |

##### The files

| Field | What it is |
|---|---|
| `pngUrl` | The link to the PNG file in the run's key-value store. Empty when PNG was not asked for. |
| `jpegUrl` | The link to the JPEG file. Empty when JPEG was not asked for. |
| `pdfUrl` | The link to the PDF file. Empty when PDF was not asked for. |
| `width` | The width of the image in pixels (PNG, else JPEG). |
| `height` | The height of the image in pixels (PNG, else JPEG). |
| `fileBytes` | The size of all the files of the record together, in bytes. |

##### How it was taken

| Field | What it is |
|---|---|
| `fullPage` | True when the whole page was captured. |
| `viewportWidth` | The width of the browser window used. |
| `viewportHeight` | The height of the browser window used. |
| `loadSeconds` | How long the capture took, in seconds. |
| `capturedAt` | When the screenshot was taken (UTC). |

#### Example result

```json
{"source": "url", "url": "https://www.python.org/", "finalUrl": "https://www.python.org/", "httpStatus": 200, "title": "Welcome to Python.org", "pngUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/png-www-python-org-1a2b3c4d.png", "width": 1280, "height": 800, "fileBytes": 187402, "fullPage": false, "viewportWidth": 1280, "viewportHeight": 800, "loadSeconds": 3.4, "capturedAt": "2026-11-19T10:00:06Z"}
```

### Input

| Input | What it does |
|---|---|
| `urls`, `html` | What to capture: page links, and/or an HTML document |
| `formats` | PNG, JPEG, PDF: one or several |
| `fullPage`, `selector` | The whole page, or one element of it |
| `viewportWidth`, `viewportHeight`, `deviceScaleFactor` | The size of the browser window and the pixel density (retina) |
| `colorScheme`, `delaySeconds`, `waitUntil` | Light or dark, extra wait, when the page counts as loaded |
| `jpegQuality`, `pdfFormat` | JPEG quality and PDF paper size |
| `requestTimeoutSeconds`, `skipErrorPages` | Patience and what to do with error pages |
| `onlyNew` | Skip pages that earlier runs of the same input captured |
| `maxItems`, `maxConcurrency` | How many screenshots, and how many at the same time |

### How much does it cost?

You pay per screenshot record. One record can hold a PNG, a JPEG and a PDF of the same page. There is no start fee. Pages that fail, time out, answer with an error or are refused are not returned and not charged.

| Plan | Price per 1,000 screenshots |
|---|---|
| Free | $4.00 |
| Bronze | $3.60 |
| Silver | $3.20 |
| Gold | $2.80 |

- 1,000 screenshots cost about $4 on the Free plan.
- Use `maxItems` to cap the cost of a run, and `onlyNew` to pay only for new pages on scheduled runs.

### Use it via API, on a schedule, or with your tools

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("pshivam/website-screenshot-scraper").call(run_input={
    "urls": ["https://example.com/pricing", "https://example.com/blog"],
    "formats": ["png", "pdf"],
    "fullPage": True,
    "viewportWidth": 1440,
    "colorScheme": "dark",
})
for shot in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(shot["url"], shot["pngUrl"], shot["pdfUrl"])
```

#### Use it in Clay, n8n, Make or Zapier

Use the Actor ID `pshivam/website-screenshot-scraper` and an input like this:

```json
{"urls": ["https://example.com/"], "formats": ["png"], "viewportWidth": 390, "viewportHeight": 844, "deviceScaleFactor": 2}
```

#### Watch a page

Schedule the Actor every day with the same `urls`. Each run stores a new picture per page: compare them, or keep them as a record.

### Good to know

- **Public pages only.** The Actor opens pages as an anonymous visitor. It cannot capture pages behind a login or a paywall, and it has no way to sign in.
- **It never opens addresses inside a private network.** Addresses such as localhost, 10.x.x.x, 192.168.x.x, 169.254.x.x and internal names are refused, and a page that tries to load them has those requests blocked. This keeps the Actor safe to run for anyone.
- **Images are limited by the browser.** A full-page image is limited to about 16,384 pixels in height, which is enough for most pages and too short for endless ones. A page with a lot of animation may need `delaySeconds`.
- **Cookie banners and pop-ups** appear as the site shows them to a first-time visitor. The Actor does not click them away.
- **Files.** The files are stored in the run's key-value store and the links are in the results. The store is the one of your run: download the files, or copy them to your own storage, before you delete the run.
- **Speed.** A test run of 2 pages took under 2 seconds in the browser. Plan on 1 to 3 seconds per page, a few pages at a time.
- **Independent tool.** The Actor draws what a visitor would see. Copyright and terms of use of the pages stay with their owners: check them before you republish a screenshot.

### FAQ

#### How do I take a screenshot of a web page?

Put the link in `urls` and run. The result has a link to the PNG file.

#### Can I get the whole page, a phone view or a dark version?

Yes. Set `fullPage`, a narrow `viewportWidth` such as 390, and `colorScheme` to dark.

#### Can I get a PDF?

Yes. Add pdf to `formats`. The PDF is the print version of the page, with its backgrounds.

#### Can I turn my own HTML into an image or PDF?

Yes. Paste the document into `html`. It is drawn by the same browser as a web page.

#### Can I capture one part of a page?

Yes. Give a CSS selector such as #chart or .product-card in `selector`.

#### What happens to pages that fail?

They are not returned and not charged. The run's status message lists the first few and the reason: not found, timed out, an error status, or a private address.

#### Is it legal to take screenshots of websites?

The Actor opens public pages like a visitor. You are responsible for how you use the pictures: check the terms and the copyright of the pages.

# Actor input Schema

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

The pages to capture, one link per line. Public web addresses only: addresses inside a private network (localhost, 10.x.x.x, 192.168.x.x, internal names) are refused. Leave empty to capture two example pages.

## `html` (type: `string`):

A whole HTML document to draw instead of, or as well as, the links: invoices, emails, reports, social cards. Up to 2 MB. It is drawn by the same browser, with its own styles and images.

## `formats` (type: `array`):

What to make for each page. Choose several to get all of them in one record. PNG is the default.

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

Capture the whole page from top to bottom instead of only the first screen. The browser limits an image to about 16,384 pixels in height.

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

The width of the browser window: 1280 for a laptop, 390 for a phone, 1920 for a desktop screen.

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

The height of the browser window (the first screen). Full page ignores it.

## `deviceScaleFactor` (type: `number`):

1 is a normal screen, 2 a retina screen (twice as many pixels in each direction), 3 a high-density phone.

## `delaySeconds` (type: `number`):

Extra time after the page has loaded, for animations, lazy images and scripts that draw the page.

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

When the page counts as loaded.

## `colorScheme` (type: `string`):

The colour scheme the browser reports. Pages that follow the visitor's setting show their dark version.

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

Capture only the element that matches this selector, for example #chart or .product-card, instead of the page. Applies to PNG and JPEG.

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

From 1 (smallest file) to 100 (best picture). Only for JPEG.

## `pdfFormat` (type: `string`):

The paper size of the PDF.

## `requestTimeoutSeconds` (type: `number`):

Give up on a page that has not loaded after this many seconds. A page that is given up on is not returned and not charged.

## `skipErrorPages` (type: `boolean`):

Do not return a page that answers with an error (404, 500 ...). Turn it off to capture the error page too.

## `onlyNew` (type: `boolean`):

Skip pages that earlier runs of this same input already captured, so you get and pay for new ones only. The first run works as usual and remembers what it returned, in your key-value store 'website-screenshot-scraper-only-new'.

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

Stop after this many screenshots (one record per page, whatever the number of formats). You are charged per record.

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

How many pages the browser captures at the same time. Raise it together with the memory of the run for big lists.

## Actor input object example

```json
{
  "urls": [
    "https://example.com/",
    "https://www.python.org/"
  ],
  "formats": [
    "png"
  ],
  "fullPage": false,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "deviceScaleFactor": 1,
  "delaySeconds": 1,
  "waitUntil": "load",
  "colorScheme": "light",
  "jpegQuality": 80,
  "pdfFormat": "A4",
  "requestTimeoutSeconds": 45,
  "skipErrorPages": true,
  "onlyNew": false,
  "maxItems": 50,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

Screenshots as a table.

## `files` (type: `string`):

The PNG, JPEG and PDF files of this run, in its key-value store.

## `runStats` (type: `string`):

Requests made, time spent and number of records for this run (RUN_STATS 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.python.org/"
    ],
    "formats": [
        "png"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("pshivam/website-screenshot-scraper").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.python.org/",
    ],
    "formats": ["png"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("pshivam/website-screenshot-scraper").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.python.org/"
  ],
  "formats": [
    "png"
  ],
  "maxItems": 50
}' |
apify call pshivam/website-screenshot-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pshivam/website-screenshot-scraper"
        }
    }
}
```

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/3NgMy2TcofZ0zmLAc/builds/dUdpNILmFCcIgiNlA/openapi.json
