# Website Screenshot Generator (`fetch_cat/website-screenshot-generator`) Actor

Capture bulk website screenshots and downloadable PDFs with full-page, element, mobile, dark-mode, and overlay-hiding controls.

- **URL**: https://apify.com/fetch\_cat/website-screenshot-generator.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** Developer tools, SEO tools, Automation
- **Stats:** 9 total users, 7 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.24 / 1,000 capture extracteds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Website Screenshot Generator

Capture downloadable screenshots and PDFs from public web pages in bulk, with full-page, element, mobile, dark-mode, overlay-hiding, timing, and proxy controls.

Use it to create visual QA evidence, SEO audit snapshots, client reports, web archives, or browser-rendered page captures that can be downloaded from Apify key-value store records and tracked in a dataset.

### At a glance

- **Bulk page capture**: Save PNG, JPEG, or PDF outputs for one or many public URLs.
- **Viewport control**: Capture desktop, mobile, tablet, or custom browser dimensions.
- **Full-page screenshots**: Capture the visible viewport or the full scrollable page.
- **Element screenshots**: Use a CSS selector to capture only the first matching visible element.
- **Cleaner captures**: Hide cookie banners, ads, sticky headers, and other matching elements before capture.
- **Rendering controls**: Wait for client-rendered elements, choose light or dark mode, and tune JPEG quality.
- **Automation-ready records**: Save output keys, public API record URLs, status codes, dimensions, page titles, and errors.
- **Failure-safe batches**: Preserve completed captures and write a `RUN_SUMMARY` before the run time budget expires.

### Ready-to-run examples

Open an example, review the input, and run it as-is or adjust the URLs:

- **[Full-page website screenshot](https://apify.com/fetch_cat/website-screenshot-generator/examples/full-page-website-screenshot)**: Capture a whole public page as a PNG.
- **[Mobile landing page screenshots](https://apify.com/fetch_cat/website-screenshot-generator/examples/mobile-landing-page-screenshots)**: Use a mobile viewport for responsive QA.
- **[CSS selector element screenshot](https://apify.com/fetch_cat/website-screenshot-generator/examples/css-selector-element-screenshot)**: Capture a specific visible page element.
- **[Web page to PDF capture](https://apify.com/fetch_cat/website-screenshot-generator/examples/web-page-to-pdf-capture)**: Save public pages as PDF files.
- **[Bulk URL screenshot capture](https://apify.com/fetch_cat/website-screenshot-generator/examples/bulk-url-screenshot-capture)**: Capture several URLs in one run.

### What can it do?

Website Screenshot Generator launches a browser, visits each public URL, waits for your chosen page-load milestone, saves a screenshot or PDF to the default key-value store, and writes one dataset row per requested URL.

- **Capture images**: Save viewport or full-page PNG/JPEG screenshots.
- **Capture PDFs**: Render pages to A4 PDF with backgrounds.
- **Capture elements**: Save screenshots for a selector such as `h1`, `.hero`, or `main`.
- **Wait for rendering**: Choose `domcontentloaded`, `load`, or `networkidle`, then add a small delay for late widgets.
- **Wait for content**: Require a CSS selector to become visible before taking the capture.
- **Remove overlays**: Hide selected cookie banners, ads, or sticky elements without modifying the source website.
- **Track failures**: Error rows include the URL, final URL when known, dimensions, format, timestamp, and error message.

### Common workflows

- **Visual regression baselines**: Capture public pages before and after releases or redesigns.
- **SEO audit evidence**: Save screenshots of landing pages, search templates, public forms, or documentation pages.
- **Client deliverables**: Generate PNG/JPEG screenshots or PDF snapshots for reports.
- **Content monitoring**: Schedule captures and compare page appearance over time.
- **Agent visual context**: Pair screenshots with extracted page text for QA, research, and RAG review workflows.

### What data do you get?

The actor saves screenshots/PDFs in the default key-value store and writes a dataset row for each requested URL.

| Field | Description |
| --- | --- |
| `url` | Requested public URL |
| `finalUrl` | Final browser URL after redirects |
| `statusCode` | HTTP response status code when available |
| `title` | Browser page title |
| `screenshotKey` | Key-value store key for PNG/JPEG captures |
| `screenshotUrl` | API URL for the saved screenshot record |
| `pdfKey` | Key-value store key for PDF captures |
| `pdfUrl` | Direct API URL for the saved PDF record |
| `width` | Capture width in pixels |
| `height` | Capture height in pixels |
| `fullPageHeight` | Measured document height for full-page image requests |
| `truncated` | Whether a full-page image exceeded `maxFullPageHeight` and was safely clipped |
| `format` | Output format: `png`, `jpeg`, or `pdf` |
| `capturedAt` | ISO timestamp for the capture attempt |
| `error` | Error message when capture failed |

### Pricing

This Actor uses pay-per-event pricing. A run is charged once for startup and once for each screenshot or PDF that is successfully saved. Failed capture attempts are not charged as successful captures.

| Charge | Free | Bronze | Silver | Gold | Platinum | Diamond |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| Run start, once per run | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 |
| 1 successful capture | $0.0004688 | $0.00040765 | $0.00031797 | $0.00024459 | $0.00016306 | $0.00011414 |
| 1,000 successful captures | $0.4688 | $0.40765 | $0.31797 | $0.24459 | $0.16306 | $0.11414 |

Apify may also charge platform usage for compute, storage, proxies, or data transfer outside this Actor pricing. Check the Actor run and the Apify Pricing tab for the exact cost shown to your account.

### Input configuration

| Setting | JSON key | Use it for | Example |
| --- | --- | --- | --- |
| Page URLs | `startUrls` | Required public HTTP/HTTPS pages to capture. | `[{"url":"https://example.com"}]` |
| Screenshot type | `screenshotType` | Capture `viewport` or `fullPage` images. Ignored for PDF output. | `fullPage` |
| Output format | `outputFormat` | Choose `png`, `jpeg`, or `pdf`. | `png` |
| Viewport | `viewport` | Set browser width, height, device scale, and mobile mode. | `{"width":1366,"height":768,"isMobile":false}` |
| Wait until | `waitUntil` | Choose page load milestone before capture. | `load` |
| Extra delay in milliseconds | `delayMs` | Wait after load for animations or late-rendered widgets. | `1000` |
| Element selector | `selector` | Capture only the first matching visible element for image output. | `main` |
| Wait for selector | `waitForSelector` | Wait until client-rendered content becomes visible. | `.results` |
| Hide elements | `hideSelectors` | Hide matching overlays before capture. | `[".cookie-banner",".sticky-ad"]` |
| JPEG quality | `jpegQuality` | Set JPEG quality from 1 to 100. | `85` |
| Color scheme | `colorScheme` | Emulate `light`, `dark`, or `no-preference`. | `dark` |
| Maximum full-page height | `maxFullPageHeight` | Cap tall screenshots and report truncation instead of risking oversized-image failures. | `20000` |
| Timeout per page | `captureTimeoutSecs` | Bound each navigation and capture attempt. | `60` |
| Retries per page | `maxRetries` | Retry transient proxy, navigation, and rendering failures. | `2` |
| Capture time budget | `runTimeSecs` | Stop starting new work early enough to save partial results and a summary. | `570` |
| Maximum concurrent pages | `maxConcurrency` | Control browser pages captured in parallel. | `2` |
| Proxy configuration | `proxyConfiguration` | Apify Proxy settings. Datacenter proxy is used by default because direct browser egress is unavailable in the cloud runtime. | `{"useApifyProxy":true}` |

### Example input

```json
{
  "startUrls": [
    { "url": "https://example.com" },
    { "url": "https://docs.apify.com" }
  ],
  "screenshotType": "fullPage",
  "outputFormat": "png",
  "viewport": {
    "width": 1366,
    "height": 768,
    "deviceScaleFactor": 1,
    "isMobile": false
  },
  "waitUntil": "load",
  "delayMs": 1000,
  "hideSelectors": [".cookie-banner"],
  "maxFullPageHeight": 20000,
  "captureTimeoutSecs": 60,
  "maxRetries": 2,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### Example output

```json
{
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "statusCode": 200,
  "title": "Example Domain",
  "screenshotKey": "0001-example-com.png",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/0001-example-com.png",
  "pdfKey": null,
  "pdfUrl": null,
  "width": 1366,
  "height": 768,
  "fullPageHeight": 768,
  "truncated": false,
  "format": "png",
  "capturedAt": "2026-07-03T10:00:00.000Z",
  "error": null
}
```

### Tips for reliable captures

- **Start with one URL**: Confirm the site renders correctly before adding a large list.
- **Use `load` first**: Switch to `networkidle` only when the page needs extra network quiet time.
- **Add a small delay**: Use `delayMs` for animations, cookie banners, or client-rendered content.
- **Prefer a selector for app content**: `waitForSelector` is more predictable than a long fixed delay.
- **Hide known overlays**: Add their CSS selectors to `hideSelectors`; the Actor does not try to guess consent choices.
- **Keep concurrency modest**: Lower `maxConcurrency` for very long pages, PDFs, or memory-heavy sites.
- **Use the default proxy**: Cloud captures use Apify Proxy because direct browser egress can be rejected by the runtime. Country and proxy-group choices remain configurable.
- **Check the key-value store**: Screenshot and PDF files are stored there; the dataset keeps their keys and URLs.
- **Check `RUN_SUMMARY`**: It reports requested, successful, failed, and time-budget-stopped counts for automation.

### Limits and practical notes

- The actor captures public HTTP/HTTPS pages.
- Private, loopback, link-local, and reserved network destinations are rejected, including redirects and browser subrequests.
- Private, login-gated, paywalled, or bot-blocked pages may fail or show limited content.
- CSS selector captures require the target element to be visible within the timeout.
- PDF output ignores `screenshotType` and `selector`.
- Full-page image captures taller than `maxFullPageHeight` are clipped and return `truncated: true`; this prevents browser failures on effectively unbounded pages.
- A batch can finish with partial results when individual pages fail or the capture time budget is reached. The Actor fails only when no page was captured successfully.
- Some sites render different content by country, cookie state, viewport, or bot detection.

### API usage

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~website-screenshot-generator/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"startUrls":[{"url":"https://example.com"}],"screenshotType":"fullPage","outputFormat":"png"}'
```

#### Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/website-screenshot-generator').call({
  startUrls: [{ url: 'https://example.com' }],
  screenshotType: 'fullPage',
  outputFormat: 'png'
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("fetch_cat/website-screenshot-generator").call(run_input={
    "startUrls": [{"url": "https://example.com"}],
    "screenshotType": "fullPage",
    "outputFormat": "png",
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

### MCP and AI agents

Use this actor from MCP-compatible tools through Apify MCP Server.

MCP URL:

```text
https://mcp.apify.com/?tools=fetch_cat/website-screenshot-generator
```

Claude CLI:

```bash
claude mcp add --transport http apify 'https://mcp.apify.com/?tools=fetch_cat/website-screenshot-generator'
```

MCP client configuration:

```json
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=fetch_cat/website-screenshot-generator"
    }
  }
}
```

Example prompts:

- "Capture full-page screenshots for these public landing pages."
- "Save a PDF snapshot of this documentation page."
- "Capture the hero section from this URL using a CSS selector."

### FAQ

#### Are the image and PDF files downloadable?

Yes. Each successful row includes `screenshotUrl` or `pdfUrl`, and the file also appears in the run's key-value store.

#### Can it capture mobile and dark-mode pages?

Yes. Set a mobile viewport and `isMobile: true`; use `colorScheme: "dark"` for sites that honor the preferred color scheme.

#### Are failed pages charged as successful captures?

No. The `capture` event is charged only when the output file and its dataset row are saved successfully. The one-time run-start charge still applies.

#### Why was a full-page image truncated?

The page exceeded `maxFullPageHeight`. The row reports the measured `fullPageHeight` and returns `truncated: true` so automation can identify the clipped image.

#### Can cookie banners always be removed automatically?

No universal method can reliably remove every consent interface. Add the site's known CSS selectors to `hideSelectors` for a deterministic capture.

### Legality and responsible use

This actor captures publicly accessible web pages.

Use screenshots and PDFs responsibly, follow the target website's terms, Apify's terms, and applicable laws, and do not use the actor to bypass access controls.

### Related actors

Explore related actors from the same Apify account:

- [Website Content Crawler Lite](https://apify.com/fetch_cat/website-content-crawler-lite)
- [Web Page to Markdown Extractor](https://apify.com/fetch_cat/web-page-to-markdown-extractor)
- [Website Contact Finder](https://apify.com/fetch_cat/website-contact-finder)
- [Google News Scraper](https://apify.com/fetch_cat/google-news-scraper)
- [Bing SERP & Search Results Scraper](https://apify.com/fetch_cat/bing-search-results-scraper)

### Support

If a URL produces an error row, start with a single page, use `waitUntil: "load"`, add a small `delayMs`, and inspect `statusCode`, `finalUrl`, and `error`.

For a reproducible support report, include the run ID or run URL, the exact input JSON, the expected output, the actual output the Actor returned, and one reproducible public URL when it is safe to share. Do not include passwords, session cookies, private URLs, or other secrets.

### Privacy and data handling

This Actor runs with Apify limited permissions and only processes data needed for the documented run. It uses the inputs you provide and the public records needed to produce the documented dataset to produce the output dataset and sends requests to the website URLs you provide; results are stored in Apify run storage for your account. FetchCat does not use your inputs or outputs for advertising, does not use them for model training, and does not retain them outside the Apify run except for transient support debugging when you explicitly share run details. You are responsible for using the Actor lawfully, respecting the target site's terms, and avoiding unnecessary personal or sensitive data in inputs.

# Actor input Schema

## `startUrls` (type: `array`):

Public HTTP or HTTPS pages to capture. Add one URL per page.

## `screenshotType` (type: `string`):

Capture only the visible viewport or the full scrollable page. Ignored for PDF output.

## `outputFormat` (type: `string`):

Choose PNG, JPEG, or PDF output.

## `viewport` (type: `object`):

Browser viewport used for capture.

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

Page load milestone to wait for before capture.

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

Optional delay after the selected load milestone, useful for animations or late-rendered widgets.

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

Optional CSS selector. When set, only the first matching visible element is captured for image output.

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

Optional CSS selector that must become visible before capture. Use this for client-rendered content.

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

Optional CSS selectors to hide before capture, for example cookie banners or sticky overlays.

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

JPEG quality from 1 to 100. Used only when output format is JPEG.

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

Preferred browser color scheme for sites that support light or dark mode.

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

Maximum captured full-page image height in pixels. Taller pages are safely truncated and marked in the output.

## `captureTimeoutSecs` (type: `integer`):

Maximum seconds allowed for each page navigation and screenshot attempt.

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

Retry transient navigation, proxy, and rendering failures. Validation and certificate failures are not retried.

## `runTimeSecs` (type: `integer`):

Stop starting new captures after this many seconds so the Actor can save partial results and a run summary before the platform timeout.

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

How many browser pages to capture in parallel. Keep this low for long pages or PDFs.

## `proxyConfiguration` (type: `object`):

Apify Proxy configuration. Datacenter proxy is used in cloud runs for reliable browser egress; select country or proxy groups when needed.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "screenshotType": "viewport",
  "outputFormat": "png",
  "viewport": {
    "width": 1366,
    "height": 768,
    "deviceScaleFactor": 1,
    "isMobile": false
  },
  "waitUntil": "load",
  "delayMs": 0,
  "hideSelectors": [],
  "jpegQuality": 85,
  "colorScheme": "no-preference",
  "captureTimeoutSecs": 60,
  "maxRetries": 2,
  "runTimeSecs": 570,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `runSummary` (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 = {
    "startUrls": [
        {
            "url": "https://example.com"
        }
    ],
    "viewport": {
        "width": 1366,
        "height": 768,
        "deviceScaleFactor": 1,
        "isMobile": false
    },
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/website-screenshot-generator").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 = {
    "startUrls": [{ "url": "https://example.com" }],
    "viewport": {
        "width": 1366,
        "height": 768,
        "deviceScaleFactor": 1,
        "isMobile": False,
    },
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/website-screenshot-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "viewport": {
    "width": 1366,
    "height": 768,
    "deviceScaleFactor": 1,
    "isMobile": false
  },
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call fetch_cat/website-screenshot-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fetch_cat/website-screenshot-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/1t6UpULNFg4aAUeTR/builds/sJQyclWWY6OfHu5zi/openapi.json
