# Website Screenshot Generator (Full Page, Mobile, PDF) (`uber_byte/website-screenshot`) Actor

Take full-page website screenshots of any URL list as PNG, JPEG, WebP or PDF. Desktop/mobile viewports, dark mode, cookie banner removal, element capture.

- **URL**: https://apify.com/uber_byte/website-screenshot.md
- **Developed by:** [Marlon Lee](https://apify.com/uber_byte) (community)
- **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

## Website Screenshot Generator (Full Page, Mobile, PDF)

Take full-page website screenshots of a list of URLs in one run, as PNG, JPEG or WebP, with an optional PDF of each page. Marketers, QA teams, SEO agencies and developers use it for visual archives, responsive checks, client reports and link thumbnails.

### What you get

For every URL, the Actor saves the image (and PDF, if enabled) to the run's key-value store and adds one dataset row with:

- **Links:** `screenshotUrl` (direct link to the image), `screenshotKey`, `pdfUrl`
- **Page:** requested URL, final URL after redirects, page title, HTTP status code
- **Result:** `success` flag and `error` message
- **Image:** format, pixel width and height, file size in bytes
- **Settings used:** viewport (width, height, device scale factor, mobile flag), full page, selector, whether a cookie button was clicked
- **Timing:** time to the load event (`loadMs`), total time including waits and capture (`totalMs`), capture timestamp

The dataset's table view shows a thumbnail per row.

Capture options:

- **Bulk URLs:** paste any number of URLs. `example.com` works, the Actor adds `https://` for you.
- **Full page or first screen only**
- **Device presets:** Desktop 1920x1080, Laptop 1366x768, Tablet 820x1180 (2x, touch), Mobile 390x844 (3x, touch), or a custom width, height and pixel density (up to 4x for retina)
- **Formats:** PNG, JPEG or WebP with a quality setting, plus an optional PDF
- **Cookie banner removal:** hides the popups of common consent platforms (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, TrustArc, Sourcepoint, CookieYes, Osano, Complianz, iubenda, Google Funding Choices and more). It can also click **Accept** or **Reject** first.
- **Dark mode:** emulates `prefers-color-scheme: dark` for sites that support it
- **Lazy loading:** scrolls through the page before capture so images further down render
- **Waits:** load, DOM ready or network idle, a CSS selector to wait for, or a fixed delay
- **Element screenshots:** capture one element only, such as `header`, `#pricing` or `article`

### Use cases

- **Website monitoring and visual archives:** keep dated snapshots of your own or competitors' pages.
- **SEO and marketing reports:** capture landing pages, search result pages and ads for clients.
- **QA and responsive testing:** check how pages look on mobile, tablet and desktop, in light and dark mode.
- **Link previews and thumbnails:** generate images for directories, dashboards and newsletters.
- **Compliance and evidence:** save a PDF and PNG of a page as it looked on a given date.
- **AI and LLM pipelines:** feed page images to vision models.

### How to use

1. Open the Actor in Apify Console and paste your URLs.
2. Pick a viewport, image format and whether you want the full page.
3. Choose how to handle cookie banners, and turn on dark mode or PDF output if you need them.
4. Click **Start**.
5. Open the dataset to see thumbnails and links, or download the images from the run's key-value store. You can also fetch everything through the Apify API.

### Input example

```json
{
  "urls": ["https://apify.com", "en.wikipedia.org/wiki/Web_scraping"],
  "viewport": "mobile",
  "fullPage": true,
  "format": "webp",
  "quality": 80,
  "cookieBanner": "reject",
  "darkMode": false,
  "scrollToBottom": true,
  "waitForNetworkIdle": true,
  "delayMs": 500,
  "savePdf": false
}
```

Other options: `selector` (capture one element), `waitForSelector`, `waitUntil` (`load`, `domcontentloaded`, `networkidle`), `width` and `height` with `"viewport": "custom"`, `deviceScaleFactor`, `maxHeight` (the Actor cuts long pages at 15,000 px by default), `navigationTimeoutSecs`, `maxItems` and `proxyConfiguration`.

### Output example

A real result for `https://en.wikipedia.org/wiki/Web_scraping` (desktop, full page, WebP):

```json
{
  "url": "https://en.wikipedia.org/wiki/Web_scraping",
  "finalUrl": "https://en.wikipedia.org/wiki/Web_scraping",
  "title": "Web scraping - Wikipedia",
  "statusCode": 200,
  "success": true,
  "error": null,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/002-en-wikipedia-org-wiki-Web-scraping.webp",
  "screenshotKey": "002-en-wikipedia-org-wiki-Web-scraping.webp",
  "pdfUrl": null,
  "format": "webp",
  "width": 1920,
  "height": 8745,
  "viewport": { "width": 1920, "height": 1080, "deviceScaleFactor": 1, "isMobile": false },
  "fullPage": true,
  "selector": null,
  "consentClicked": false,
  "sizeBytes": 231520,
  "loadMs": 599,
  "totalMs": 5328,
  "takenAt": "2026-09-29T19:59:43.958Z"
}
```

`width` and `height` are the image's pixel size (viewport size times device scale factor).

If a page returns HTTP 4xx or 5xx, you still get the screenshot and a row with `success: false`. If a page can't load after retries, you get a row with `success: false` and an `error` message. Neither is charged.

### Pricing

This Actor uses pay-per-result pricing: you pay for each successful screenshot. Failed pages, blocked pages and HTTP error pages are free. The PDF, if you enable it, is included in the same screenshot price. Set a spending limit on the run and the Actor stops cleanly when it reaches it.

### FAQ

**Is it legal to take screenshots of websites?** Capturing a public page is generally fine, but the content belongs to the site owner. Check the site's terms and copyright before you republish screenshots. The Actor only visits publicly accessible pages.

**Can it screenshot pages behind a login?** No. It captures public pages only and never logs in anywhere.

**How do I take a mobile screenshot?** Set `viewport` to `mobile`. The Actor renders the page at 390x844 with 3x pixel density, touch support and a mobile Chrome user agent, so sites serve their mobile layout.

**Why is my full-page screenshot cut off?** The Actor cuts pages taller than `maxHeight` (15,000 CSS px by default, max 16,000) to stay within format and memory limits. WebP images can be at most 16,383 px tall, so WebP full-page shots at 2x or 3x density are cut shorter. It scrolls infinite-scroll feeds for up to 60 screens.

**Will cookie banners always disappear?** The Actor hides banners from the common consent platforms listed above, and "accept" or "reject" mode also clicks buttons labelled in English, German, French, Spanish, Italian, Portuguese, Dutch, Polish and Swedish. Custom-built banners on individual sites may still show.

**A site returns 403 or a "verify you are human" page. What now?** Some sites, often behind Cloudflare, block automated browsers or datacenter IPs. The default proxy is Apify datacenter; switch it to Residential. The Actor doesn't solve CAPTCHAs.

**What are the limits?**

- Chromium only, with no Firefox or Safari rendering.
- Element screenshots use the first element that matches the selector.
- Pages that need a login, a CAPTCHA or heavy bot protection won't render correctly.
- The Actor cuts very long pages at `maxHeight`.
- PDF output uses the page's screen styles at the chosen viewport width. Full-page PDFs are split into Letter-height pages. With Full page off, the PDF is a single viewport-sized page.

# Actor input Schema

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

Pages to screenshot. "example.com" is treated as https://example.com.

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

Only process the first N URLs. Leave empty for all.

## `viewport` (type: `string`):

Viewport.

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

Used when Viewport is Custom.

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

Used when Viewport is Custom.

## `deviceScaleFactor` (type: `integer`):

Pixel density (2 = retina). Leave empty to use the preset's default.

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

Capture the whole scrollable page instead of only the visible viewport.

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

Very long pages are cut at this height (CSS px).

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

Image format.

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

Quality (JPEG/WebP).

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

Optional CSS selector. If set, only the first matching element is captured, e.g. "#main" or "header".

## `savePdf` (type: `boolean`):

Additionally save a PDF of the page (screen styles, backgrounds included).

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

Emulate prefers-color-scheme: dark.

## `cookieBanner` (type: `string`):

Cookie banners.

## `scrollToBottom` (type: `boolean`):

Scroll through the page before capturing so lazy-loaded images render.

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

Navigation finished when.

## `waitForNetworkIdle` (type: `boolean`):

After load, wait up to 15 s for network activity to settle.

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

Optional CSS selector to wait for (up to 30 s) before capturing.

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

Wait this long right before capturing, e.g. for animations.

## `navigationTimeoutSecs` (type: `integer`):

Navigation timeout (s).

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

Datacenter proxy works for most sites. Switch to Residential for sites that block datacenter IPs.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://en.wikipedia.org/wiki/Web_scraping"
  ],
  "viewport": "desktop",
  "width": 1280,
  "height": 800,
  "fullPage": true,
  "maxHeight": 15000,
  "format": "png",
  "quality": 80,
  "savePdf": false,
  "darkMode": false,
  "cookieBanner": "hide",
  "scrollToBottom": true,
  "waitUntil": "load",
  "waitForNetworkIdle": true,
  "delayMs": 0,
  "navigationTimeoutSecs": 60,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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://apify.com",
        "https://en.wikipedia.org/wiki/Web_scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("uber_byte/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://en.wikipedia.org/wiki/Web_scraping",
    ] }

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

```

## MCP server setup

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