# Website Screenshot - Full Page, Element & HTML to Image (`menkiks/website-screenshot`) Actor

Take screenshots of any website by URL: visible area, full page with lazy-loaded content, a single element, or raw HTML. PNG, JPEG or PDF. Batch thousands of URLs, get a direct link to every file, and pay only for screenshots that are delivered.

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

## Pricing

from $2.90 / 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 - Full Page, Element & HTML to Image

Takes a screenshot of any web page from its URL and gives you a direct link to the file: the visible area, the full page, a single element, or your own HTML, as PNG, JPEG or PDF.

You pay per delivered screenshot. Pages that fail are not charged.

### Who it is for

- **Monitoring and archiving.** Schedule a run and keep a dated picture of your pricing page, a competitor's landing page, or a legal notice.
- **Previews and thumbnails at scale.** Send a list of thousands of URLs and get one image per URL for a directory, a link preview, or a QA report.
- **Images from your own HTML.** Render social cards, invoices or report pages from markup you generate, without running a browser yourself.

### What you get that a basic screenshot tool does not

- **Full-page captures that finish.** Very long pages are rendered in a single pass up to a height you choose (16,000 px by default), instead of stalling. The output tells you when a page was cut.
- **Lazy-loaded content included.** The page is scrolled before the capture so images and sections that load on scroll are there.
- **Fixed headers stay where they belong.** A sticky header appears once at the top, not repeated down the image. Sections sized to the screen height keep their size.
- **A hard time limit per page.** A page that is still loading at the limit is captured as it is and marked `partial`. A page that shows nothing is reported as failed, and is free.
- **A stable output row for every URL**, including the ones that failed, with the HTTP status and a machine-readable reason.
- **Emoji and CJK fonts installed**, so text does not turn into empty boxes.

### Input

Only `urls` is needed. Every other field is optional.

```json
{
    "urls": ["https://example.com"],
    "fullPage": false,
    "format": "png"
}
```

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `urls` | array of strings | | Pages to capture. One screenshot and one output row per URL. Up to 10,000 per run. |
| `fullPage` | boolean | `false` | Capture the whole page instead of the visible area. |
| `format` | `png`, `jpeg`, `pdf` | `png` | File format. JPEG is smaller and faster for long pages. PDF is an A4 document. |
| `quality` | integer 1-100 | `80` | JPEG quality. |
| `viewportWidth` | integer 320-3840 | `1280` | Browser width in CSS pixels. 390 gives a phone layout. |
| `viewportHeight` | integer 200-4000 | `800` | Browser height. Height of the image unless `fullPage` is on. |
| `scale` | 1 or 2 | `1` | 2 gives retina images, twice as wide and tall. |
| `maxFullPageHeight` | integer 800-20000 | `16000` | Tallest full-page capture in CSS pixels. Longer pages are cut and flagged. |
| `selector` | string | | CSS selector of a single element to capture instead of the page. |
| `waitUntil` | `load`, `domcontentloaded`, `networkidle` | `load` | When the page counts as ready. |
| `delayMs` | integer 0-30000 | `0` | Extra wait before the capture. |
| `waitForSelector` | string | | Element that must be visible before the capture. |
| `timeoutSecs` | integer 10-180 | `60` | Hard limit for one page. |
| `maxRetries` | integer 0-3 | `1` | Retries after a network or rendering error. Timeouts are not retried. |
| `hideSelectors` | array of strings | | Elements to hide first, such as cookie banners or chat widgets. |
| `darkMode` | boolean | `false` | Ask the page for its dark color scheme. |
| `failOnHttpError` | boolean | `false` | Report pages that answer 4xx or 5xx as failed, free of charge, instead of capturing the error page. |
| `html` | string | | Raw HTML to render and capture, in addition to any URLs. |

### Output

Each run writes one row per requested page to the dataset and one file per delivered screenshot to the key-value store. This is the row for `https://example.com` with the default input:

```json
{
    "url": "https://example.com/",
    "finalUrl": "https://example.com/",
    "status": "succeeded",
    "httpStatus": 200,
    "title": "Example Domain",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<STORE_ID>/records/screenshot-0001-example-com-62b58f10.png",
    "screenshotKey": "screenshot-0001-example-com-62b58f10.png",
    "format": "png",
    "fullPage": false,
    "width": 1280,
    "height": 800,
    "pageHeight": 843,
    "truncated": false,
    "partial": false,
    "warnings": [],
    "sizeBytes": 74812,
    "loadTimeMs": 157,
    "totalTimeMs": 328,
    "attempts": 1,
    "capturedAt": "2026-11-14T22:24:03.083Z",
    "errorType": null,
    "errorMessage": null
}
```

| Field | Type | Meaning |
| --- | --- | --- |
| `url` | string or null | The requested URL after cleanup. Null for the `html` input. |
| `finalUrl` | string or null | Where the browser ended after redirects. |
| `status` | string | `succeeded` when a file was delivered, otherwise `failed`. |
| `httpStatus` | integer or null | Status code of the page. Null when the server never answered. |
| `title` | string or null | The page title. |
| `screenshotUrl` | string or null | Direct link to the file. |
| `screenshotKey` | string or null | Key of the file in the run's key-value store. |
| `format` | string | `png`, `jpeg` or `pdf`. |
| `fullPage` | boolean | Whether the whole page was captured. |
| `width`, `height` | integer or null | Image size in pixels. Null for PDF. |
| `pageHeight` | integer or null | Full height of the page in CSS pixels, captured or not. |
| `truncated` | boolean | A full-page capture was cut at the maximum height. |
| `partial` | boolean | Captured before the page finished loading, or before the awaited element appeared. |
| `warnings` | array of strings | `load-timeout`, `wait-for-selector-timeout`, `truncated`, or `http-<status>`. |
| `sizeBytes` | integer or null | File size. |
| `loadTimeMs` | integer or null | Time until the page was ready. |
| `totalTimeMs` | integer | Time spent on the page, including retries and upload. |
| `attempts` | integer | Number of tries. |
| `capturedAt` | string | UTC start time, ISO 8601. |
| `errorType` | string or null | `invalid-url`, `navigation-error`, `timeout`, `http-error`, `selector-not-found`, `capture-error` or `max-charge-reached`. |
| `errorMessage` | string or null | The reason in plain words. |

### Price

Pay per event. Platform usage (compute, storage, data transfer) is included in the price, so the bill is the number of screenshots times the price and nothing else.

| Event | Free and Bronze | Silver | Gold |
| --- | --- | --- | --- |
| Screenshot delivered | $3.50 per 1,000 | $3.20 per 1,000 | $2.90 per 1,000 |
| Full-page add-on, charged on top for `fullPage` captures | $2.50 per 1,000 | $2.30 per 1,000 | $2.10 per 1,000 |
| Actor start | $0.00005 per GB of memory | same | same |

What typical jobs cost on the Free or Bronze tier:

- 100 screenshots of the visible area: **$0.35**
- 1,000 screenshots of the visible area: **$3.50**
- 1,000 full-page screenshots: **$6.00**
- One screenshot from an API call: **$0.0037**, start included

Not charged: pages that time out without rendering, network errors, invalid URLs, selectors that match nothing, and error pages when `failOnHttpError` is on. Set a maximum cost for the run in the run options and the Actor stops when it is reached.

### Limits you should know

- **No proxy.** Requests leave from Apify's data-center addresses. Some sites answer those with a bot check or a 403 page. You get a screenshot of that page with its `httpStatus` and an `http-403` warning. Turn on `failOnHttpError` to skip and not pay for them.
- **No login.** There is no way to pass cookies, headers or credentials, so only public pages can be captured.
- **Cookie banners are not removed automatically.** Use `hideSelectors` for the sites you capture often.
- **Full-page height is capped** at `maxFullPageHeight` (20,000 px at most). At `scale` 2 the cap drops to keep the image under 32 megapixels: 6,250 px for a 1280 px wide page. Runs with less than 4 GB of memory are capped at 8,000 px.
- **Animations are switched off.** Pages are asked for reduced motion and CSS animations are fast-forwarded, which keeps captures sharp. Content that only appears through a scroll-driven script effect can come out blank.
- **Pages that scroll inside a panel** (some web apps) are expanded on a best-effort basis.
- **PDF output is paginated A4**, not one long page.
- **Files live in the run's key-value store** and follow your account's data retention. Download them, or use a named store, if you need them for longer.

### Use it from the API

Run and get the results in one call. Replace `<TOKEN>` with your Apify API token:

```bash
curl -X POST "https://api.apify.com/v2/actors/menkiks~website-screenshot/run-sync-get-dataset-items?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://example.com"], "fullPage": true, "format": "jpeg"}'
```

The response is the array of output rows. Open `screenshotUrl` to download the image.

With the JavaScript client:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('menkiks/website-screenshot').call({ urls: ['https://example.com'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].screenshotUrl);
```

### Use it from an AI agent

Add the Actor as a tool through the Apify MCP server:

```
https://mcp.apify.com?tools=menkiks/website-screenshot
```

The agent calls it with the same input as above and reads `screenshotUrl`, `status` and `errorType` from each row. The input, dataset and output schemas are published with the Actor, so the agent knows every field before it runs anything.

# Changelog

This Actor's version history is a separate document: https://apify.com/menkiks/website-screenshot/changelog.md

# Actor input Schema

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

Pages to capture, one per line. Each URL produces one screenshot and one row in the output. A missing https:// is added for you.

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

Capture the whole page from top to bottom instead of only the visible area. The page is scrolled first so lazy-loaded images and sections appear. Billed as a screenshot plus the full-page add-on.

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

File format of the capture. JPEG files are smaller and faster to produce for long pages. PDF saves the page as an A4 document.

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

JPEG quality from 1 to 100. Ignored for PNG and PDF.

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

Browser window width in CSS pixels. Use 390 for a phone layout, 768 for a tablet, 1280 or 1920 for desktop.

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

Browser window height in CSS pixels. This is the height of the image unless Full page is on.

## `scale` (type: `integer`):

1 for standard screens, 2 for sharp retina images that are twice as wide and tall. At scale 2 a full-page capture is limited to a shorter height.

## `maxFullPageHeight` (type: `integer`):

Tallest full-page capture, in CSS pixels. Longer pages are cut at this height and marked as truncated in the output. Also stops endless feeds from growing forever.

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

CSS selector of a single element to capture, for example #pricing or .chart. Leave empty to capture the page.

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

When the page counts as ready. Load waits for images and styles and suits most sites. DOM content loaded is faster. Network idle waits until requests stop, which helps single-page apps.

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

Additional wait after the page is ready and before the capture, for animations or late content.

## `waitForSelector` (type: `string`):

CSS selector that must be visible before the capture. If it does not show up in time, the page is still captured and marked as partial.

## `timeoutSecs` (type: `integer`):

Hard limit for one page, in seconds. A page that is still loading at half this time is captured as it is and marked as partial. A page that shows nothing is reported as failed and is not charged.

## `maxRetries` (type: `integer`):

How many times to retry a page after a network or rendering error. Timeouts are not retried.

## `hideSelectors` (type: `array`):

CSS selectors of elements to hide before the capture, such as cookie banners, chat widgets or ads.

## `darkMode` (type: `boolean`):

Ask the page for its dark color scheme. Only affects sites that support it.

## `failOnHttpError` (type: `boolean`):

When on, pages that answer with an HTTP error (404, 403, 500 and so on) are reported as failed and are not charged. When off, the error page itself is captured.

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

Raw HTML to render and capture, in addition to any URLs. Useful for social cards, invoices or reports built from your own markup.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "fullPage": false,
  "format": "png",
  "quality": 80,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "scale": 1,
  "maxFullPageHeight": 16000,
  "waitUntil": "load",
  "delayMs": 0,
  "timeoutSecs": 60,
  "maxRetries": 1,
  "darkMode": false,
  "failOnHttpError": false
}
```

# Actor output Schema

## `results` (type: `string`):

One row per URL with the direct link to its screenshot, the HTTP status, image size, and the error for pages that failed.

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

The PNG, JPEG or PDF files, stored in the default key-value store under keys starting with screenshot-.

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

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

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

```

## MCP server setup

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