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

Takes screenshots of any list of web pages: full page or viewport, desktop, laptop, tablet or phone, PNG, JPEG or WebP, with cookie banners hidden, ads blocked, dark mode and optional PDFs.

- **URL**: https://apify.com/mina_safwat/website-screenshot-generator.md
- **Developed by:** [Mina](https://apify.com/mina_safwat) (community)
- **Categories:** Developer tools, SEO 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 $3.00 / 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.

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

### What does Website Screenshot Generator do?

**Website Screenshot Generator takes screenshots of any list of web pages** in a real Chromium browser and saves each one as a **PNG, JPEG or WebP image** you can open with a link. Paste URLs, pick a device (desktop, laptop, tablet, iPhone or Android), choose **viewport or full-page** capture, and get one row per page with the image link, page title, HTTP status, final URL, pixel size and file size.

It hides cookie banners, blocks ads, can switch pages to **dark mode**, scrolls to load lazy images and can also save a **PDF** of each page. Because it runs on the Apify platform, you can call it through the **API**, **schedule** it (for example a daily snapshot of your homepage or competitors' pricing pages), connect it to **Make, Zapier, n8n, Google Drive or Slack**, and monitor every run.

### Why use Website Screenshot Generator?

- **Visual monitoring**: keep a daily archive of landing pages, pricing pages or competitor sites and see what changed.
- **QA and design reviews**: check how pages look on desktop, tablet and phones without opening each one.
- **Reports and documentation**: drop thumbnails or full-page captures into reports, tickets or slide decks.
- **SEO and marketing**: capture search landing pages, ads destinations and partner pages as proof.
- **Archiving and compliance**: store a dated image and PDF of what a page showed at a given time.
- **Bulk thumbnails**: generate previews for a directory or link list in one run.

You pay only for real screenshots: pages that don't exist, time out, refuse access, show a bot check (a "press and hold" or "continue shopping" captcha, Cloudflare's "Just a moment…") or come out blank are listed separately and never billed.

### How to take website screenshots

1. Click **Try for free** (or **Start**) on this page.
2. Paste the web pages into **Web pages**, one per line. `example.com` works as well as `https://example.com`.
3. Pick a **Device**, or keep the custom 1280 × 800 window.
4. Turn on **Full page** if you want the whole scrolling page, and pick an **Image format**.
5. Click **Start**. When the run finishes, open the **Output** tab to see every screenshot with its link, or download the table.

### Input

Everything except **Web pages** is optional. See the **Input** tab for the full form.

| Field | Default | What it does |
|---|---|---|
| `urls` | – | Pages to capture: strings or `{"url": "..."}` objects; links without `https://` are accepted. Duplicates are captured once. |
| `device` | `custom` | `custom` (uses width/height), `desktop` 1920 × 1080, `laptop` 1440 × 900, `tablet` (iPad, 2×), `iphone` (iPhone 15 Pro, 3×), `android` (Pixel 7, 2.625×). Tablet and phone presets send that device's browser identity and touch support and keep its pixel density. |
| `width` / `height` | 1280 / 800 | Window size for the custom device. |
| `fullPage` | `false` | Capture the whole scrolling page instead of the window. |
| `maxHeight` | 10000 | Full pages stop at this height (in page pixels). Images are also kept under 16,383 pixels tall in total. |
| `format` | `png` | `png`, `jpeg` or `webp`. |
| `quality` | 80 | JPEG/WebP quality, 1–100. |
| `waitUntil` | `load` | `load`, `domcontentloaded` or `networkidle`. A page that never gets there is captured anyway, at most 15 s after its HTML arrived. |
| `delay` | 1 | Extra seconds to wait before capturing. |
| `waitForSelector` | – | Wait until an element matching this CSS selector is visible. |
| `hideCookieBanners` | `true` | Hides common consent pop-ups with CSS. Nothing is clicked, so no consent is given. |
| `blockAds` | `true` | Blocks about 40 well-known ad and tracking networks. |
| `darkMode` | `false` | Asks pages for their dark theme. |
| `scrollToLoadLazyImages` | `true` | Scrolls a full page first so lazy images load. |
| `timeoutSecs` | 30 | How long to wait for a page to load. |
| `pdf` | `false` | Also save an A4 PDF of each page. |
| `proxyConfiguration` | no proxy | Use Apify Proxy for sites that block cloud servers. |

Example input:

```json
{
    "urls": ["https://example.com", "www.wikipedia.org", { "url": "https://apify.com" }],
    "device": "iphone",
    "fullPage": true,
    "format": "webp",
    "quality": 80,
    "darkMode": false
}
```

### Output

Each captured page gives one row in the dataset, and its image (and PDF, if asked) in the run's key-value store. `screenshotUrl` is a link that opens the image directly in the browser, with no Apify token needed. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
    "url": "https://www.wikipedia.org/",
    "finalUrl": "https://www.wikipedia.org/",
    "statusCode": 200,
    "title": "Wikipedia",
    "screenshotKey": "screenshot-wikipedia-org-72e64cab",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/6KAyf9feLhsjGqOUN/records/screenshot-wikipedia-org-72e64cab?signature=mj1tgf9kt2OGl3zznr2s",
    "format": "png",
    "width": 1280,
    "height": 800,
    "fileSizeBytes": 190710,
    "device": "custom",
    "fullPage": false,
    "capturedAt": "2026-10-20T15:41:55+00:00"
}
```

Pages that gave no screenshot are listed, with the reason, in the **FAILED_INPUTS** record of the key-value store, for example `{"input": "https://example.com/missing", "reason": "the page does not exist (HTTP 404)"}`.

### Data fields

| Field | Type | Description |
|---|---|---|
| `url` | string | The page as requested (with `https://` added if it was missing). |
| `finalUrl` | string | The address after redirects. |
| `statusCode` | number | HTTP status of the page. |
| `title` | string or null | The page title. |
| `screenshotKey` | string | Key of the image in the run's key-value store. |
| `screenshotUrl` | string | Direct link to the image. |
| `format` | string | `png`, `jpeg` or `webp`. |
| `width`, `height` | number | Image size in pixels, read from the saved file. Phone and tablet presets include their pixel density. |
| `fileSizeBytes` | number | Image file size. |
| `device` | string | The device preset used. |
| `fullPage` | boolean | Whether the whole page was captured. |
| `croppedAtMaxHeight` | boolean | Full-page rows only: the page was taller than the height limit and was cut. |
| `pdfKey`, `pdfUrl`, `pdfSizeBytes` | string, string, number | Only when **Also save a PDF** is on. |
| `capturedAt` | string | Capture time, ISO 8601 in UTC. |

### How much does it cost to take website screenshots?

The Actor is priced per saved screenshot, with two opt-in extras; see the **Pricing** tab for the exact prices:

| Event | Charged when |
|---|---|
| Screenshot | once for each saved screenshot (one dataset row) |
| Full-page screenshot | on top of the screenshot, when **Full page** is on, since a whole page takes about three times the work of a window |
| PDF | for each PDF saved when **Also save a PDF** is on |

Pages that fail, show a bot check or come out blank are not charged. If you set a maximum cost per run, the Actor stops before a screenshot it could not pay for. Each run starts one browser, so a run of many pages is far cheaper per page than many runs of one page each. Apify's free plan includes monthly credit, which is enough to try the Actor on hundreds of pages.

### Tips

- **Memory: 2 GB by default, 4 GB for long lists.** On Apify, memory also buys CPU, and rendering pages is CPU work. At the default 2 GB the browser opens 2 pages at a time. At 4 GB it opens 4 at a time and captures about one page every 3–4 seconds in the window, or every 10 seconds as full pages: about twice as fast for a similar cost per page on long lists. For a handful of pages 4 GB only costs more.
- **Long lists**: pages still waiting when the run's timeout is near are listed in FAILED_INPUTS ("ran out of time") so the run always ends with its results saved. Raise the run timeout for lists of hundreds of pages.
- **JPEG or WebP for full pages.** A full-page PNG of a news site can be 5 MB; WebP at quality 80 is usually 10 times smaller.
- **Use `networkidle` only for apps** that load their content late; it is the slowest option.
- **Blocked sites**: some sites (big marketplaces, some news sites) refuse cloud servers with HTTP 403 or show a bot check. Those pages are listed in FAILED_INPUTS and never billed as screenshots of the bot check. Turn on Apify Proxy with the residential group for them; retries through a proxy use a new IP. Some sites block even residential IPs.
- **Use a selector** (`waitForSelector`) when a page shows a spinner before its main content.
- Endless feeds are cut at **Maximum full-page height**; lower it to get smaller files.

### FAQ, disclaimers and support

**Is it legal to take screenshots of websites?** Capturing publicly visible pages is generally fine, but what you do with the images may be covered by copyright, terms of service and privacy law. Screenshots can show personal data such as names or faces; only keep and use them where you have a legitimate reason. If you are unsure, ask a lawyer.

**Does it accept cookie banners for me?** No. It only hides known banners with CSS; it never clicks "Accept". Banners made by a site itself may still show.

**Can it capture pages behind a login?** No. It sees pages as a logged-out visitor.

**Why is a page missing from my results?** Look at the FAILED_INPUTS record: it says whether the page did not exist, timed out, was refused, showed a bot check or was blank. A run fails only when no page could be captured because of timeouts, blocks or errors; pages that simply don't exist end in a successful run with a status message.

**How long are screenshots kept?** As long as the run's storage is kept under your Apify data-retention settings. Copy them elsewhere (for example with the Google Drive integration) to keep them longer.

**Found a bug or need a feature?** Open an issue on the **Issues** tab and it will be looked at. Custom solutions are available on request.

# Actor input Schema

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

Links to capture, one per line. Links without https:// work too (example.com). API callers can also pass objects such as {"url": "https://example.com"}. Pages that do not exist, time out, refuse access, show a bot check or come out blank are listed in the FAILED_INPUTS record and are not billed.

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

Window size to capture with. Tablet and phone presets also send that device's browser identity and touch support, so sites serve their mobile layout, and keep its pixel density (an iPhone screenshot is 1179 pixels wide).

## `width` (type: `integer`):

Browser window width, used with the Custom size device.

## `height` (type: `integer`):

Browser window height, used with the Custom size device. Full-page screenshots grow past it.

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

Captures the whole scrolling page instead of just the window, up to the maximum height below.

## `maxHeight` (type: `integer`):

Full-page screenshots stop at this height, so endless feeds don't produce giant images. Images are also kept under 16,383 pixels tall in total (5,461 page pixels on an iPhone at 3×). Rows report croppedAtMaxHeight when a page was taller.

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

PNG keeps every pixel; JPEG and WebP files are several times smaller.

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

Compression quality from 1 to 100 for JPEG and WebP. Ignored for PNG.

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

When the page counts as ready. If a page never reaches this point (some sites keep loading forever), it is captured anyway, at most 15 seconds after its HTML arrived.

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

Waits this long after the page is ready, for animations and late content.

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

Optional. Waits until an element matching this CSS selector is visible, for example #main or .product-grid. A page where it never appears is listed in FAILED_INPUTS.

## `hideCookieBanners` (type: `boolean`):

Hides the cookie and consent pop-ups of common consent tools (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics and others) with CSS. Nothing is clicked, so no consent is given. Best effort: home-made banners may still show.

## `blockAds` (type: `boolean`):

Blocks requests to about 40 well-known ad and tracking networks, which makes pages load faster and cleaner.

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

Asks pages for their dark theme (prefers-color-scheme: dark). Sites without one look the same.

## `scrollToLoadLazyImages` (type: `boolean`):

For full-page screenshots, scrolls down the page first so images that load on scroll appear in the picture.

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

How long to wait for a page to load. A page that has not even started rendering by then is listed in FAILED_INPUTS.

## `pdf` (type: `boolean`):

Also saves each page as an A4 PDF (as the browser would print it) next to the screenshot. News sites can produce PDFs of tens of megabytes.

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

Not needed for most sites. Turn on Apify Proxy (residential, optionally with a country) for sites that block cloud servers or show different content by country.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://www.wikipedia.org"
  ],
  "device": "custom",
  "width": 1280,
  "height": 800,
  "fullPage": false,
  "maxHeight": 10000,
  "format": "png",
  "quality": 80,
  "waitUntil": "load",
  "delay": 1,
  "hideCookieBanners": true,
  "blockAds": true,
  "darkMode": false,
  "scrollToLoadLazyImages": true,
  "timeoutSecs": 30,
  "pdf": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `files` (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://example.com",
        "https://www.wikipedia.org"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("mina_safwat/website-screenshot-generator").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.wikipedia.org"
  ]
}' |
apify call mina_safwat/website-screenshot-generator --silent --output-dataset

```

## MCP server setup

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

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/HjEx3PH0rRUDssjUN/builds/ilKPThltyayktEn0f/openapi.json
