# Website Screenshot & PDF API (`dabooti/website-screenshot-api`) Actor

Bulk screenshots and PDFs of any web page: full-page or one element, desktop, tablet and phone presets, cookie banners and ads hidden, lazy images loaded. Every row has a direct image URL. PNG, JPEG or WebP.

- **URL**: https://apify.com/dabooti/website-screenshot-api.md
- **Developed by:** [Danial Maqbool](https://apify.com/dabooti) (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 $1.00 / 1,000 screenshots

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 & PDF API

Take screenshots and PDFs of any public web pages in bulk. Paste a list of URLs, pick a device, and get one clean image per page: full-page or first screen, or just one element. Cookie banners, ad-block walls, chat bubbles and ads are removed before the capture, lazy images are loaded, and every row in the dataset has a **direct link to the image** (and to the PDF, if you turn PDFs on).

No login, API key or proxy is needed for most sites.

### What you can use it for

- **Visual monitoring and archiving**: schedule daily captures of your pages, competitors' pages or landing pages and keep a visual history.
- **SEO and competitor snapshots**: capture search landing pages, pricing pages and product pages across many domains at once.
- **QA across devices**: see how a page looks on desktop, laptop, tablet and 20 phone and tablet presets (iPhone 17, Pixel 10, Galaxy S24, iPad Pro and more) in one run.
- **Link previews and thumbnails**: first-screen JPEG or WebP captures, or small thumbnails with a 0.5 pixel ratio.
- **Compliance and evidence**: full-page PNG plus a PDF of the same page, with the capture time, final URL and HTTP status in each row.
- **AI and vision pipelines**: feed page images to vision models, OCR or layout analysis, with a stable image URL per page.

### Why this one

- **Long pages come out right.** Chrome repeats the top of the page when a single capture is taller than 16,384 pixels, which silently corrupts long full-page screenshots in many tools. This Actor captures tall pages in strips and joins them, so a 20,000 or 30,000 px page is one correct image.
- **Clean captures.** Consent pop-ups from OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, TrustArc, Sourcepoint, iubenda, CookieYes, Complianz and more are hidden, plus generic cookie bars found by their wording. They are hidden with CSS and never clicked, so no consent is given on your behalf. Ads and trackers from 141 networks are blocked, empty ad slots are collapsed, "please disable your ad blocker" walls are hidden, and chat launchers are removed.
- **Fully loaded pages.** The page is scrolled step by step so lazy images and scroll-animated sections load, then it waits for images and web fonts before capturing.
- **Animations handled properly.** Fade-ins finish instantly; looping animations such as logo carousels are paused where they are instead of being reset to an empty first frame.
- **Devices and formats.** Desktop, laptop, tablet, mobile, 21 named device presets or any custom size, any pixel ratio from 0.5x to 4x, PNG, JPEG or WebP, dark mode.
- **Element capture.** Give a CSS selector and get just that element, for example a pricing table or a chart.
- **PDF in the same run.** Save a PDF of each page next to the image (A4, Letter, Legal, A3, A5 or Tabloid), or PDFs only.
- **Direct file URLs.** Each row links straight to the image and the PDF in the run's key-value store, ready to embed or download.
- **Fair billing.** You pay per saved file. Pages that fail, time out, return an error status or do not exist are returned as free rows with the reason.

### What data you get

| Field | Description |
|---|---|
| `url`, `finalUrl` | The URL you gave (https:// added to bare domains) and the URL after redirects |
| `title`, `httpStatus` | Page title and HTTP status code |
| `screenshotUrl`, `screenshotKey` | Direct link to the image and its key in the key-value store |
| `pdfUrl`, `pdfKey` | Direct link to the PDF and its key (when PDFs are on) |
| `format`, `device` | Image format and device preset |
| `width`, `height` | Size of the saved image in pixels |
| `fullPage` | Whether the whole page was captured |
| `fileSizeBytes`, `pdfSizeBytes` | File sizes |
| `loadTimeMs` | Time until the page reached the chosen load state |
| `takenAt` | Capture time (ISO 8601) |
| `status`, `error` | `ok` or `failed`, and why it failed |
| `warnings` | Notes on a capture that still worked, for example a very long page that was cut |

The **Screenshots** view of the dataset shows each image as a thumbnail next to its URL and title. A `RUN_SUMMARY` record in the key-value store lists the counts, the settings used and every failure.

### How to use it

1. Paste your **URLs**, one per line. Bare domains such as `example.com` work too, and duplicates are removed.
2. Pick a **Device** and whether you want the **Full page**, the first screen, or a single element (**Capture only this element**).
3. Leave **Page cleanup** on for clean images, or switch individual cleanups off.
4. Choose the **Image format**, and turn on **Save PDF** if you also want PDFs.
5. Click **Start**. Open the **Output** tab to see thumbnails, or export the dataset as JSON, CSV or Excel.

#### Example inputs

Desktop full-page PNG (the default):

```json
{
  "urls": ["https://apify.com", "https://example.com"],
  "device": "desktop",
  "fullPage": true,
  "format": "png"
}
```

Mobile, first screen only, as a compact JPEG:

```json
{
  "urls": ["https://www.apple.com", "https://www.bbc.com/news"],
  "device": "iPhone 15",
  "fullPage": false,
  "format": "jpeg",
  "quality": 75
}
```

One element only (here the Wikipedia infobox):

```json
{
  "urls": ["https://en.wikipedia.org/wiki/Python_(programming_language)"],
  "selector": "table.infobox",
  "deviceScaleFactor": 2
}
```

Screenshot plus PDF of each page:

```json
{
  "urls": ["https://en.wikipedia.org/wiki/Web_scraping"],
  "fullPage": true,
  "pdf": true,
  "pdfFormat": "A4",
  "pdfPrintBackground": true
}
```

PDFs only: set `"screenshot": false` and `"pdf": true`.

#### Example output

One row from a real run:

```json
{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "title": "Example Domain",
  "httpStatus": 200,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/e4RugNzcjdiWSG9Fz/records/002-example-com.png?signature=xtprY9vKKIlmbqjqImz5",
  "screenshotKey": "002-example-com.png",
  "pdfUrl": null,
  "pdfKey": null,
  "format": "png",
  "device": "desktop",
  "width": 1920,
  "height": 1080,
  "fullPage": true,
  "fileSizeBytes": 79934,
  "pdfSizeBytes": null,
  "loadTimeMs": 79,
  "takenAt": "2026-11-18T14:15:00.700Z",
  "status": "ok",
  "error": null,
  "warnings": []
}
```

### Pricing

Pay per event:

- **$1.00 per 1,000 screenshots** saved
- **$1.00 per 1,000 PDFs** saved
- Failed pages are **free**

Apify platform usage is billed on top. A real browser needs more compute than a plain HTTP scraper. In our test runs at the default 2 GB memory, a typical page took 2 to 5 seconds, which works out to roughly $0.20 to $0.50 of platform usage per 1,000 pages on top of the per-file price (heavier pages, PDFs and long full-page captures cost more). Set **Max cost per run** to cap what a run can charge; the Actor stops cleanly when the limit is reached and never starts a page it cannot pay for.

### Tips

- **Single-page apps** (React, Vue, Angular dashboards): set **Wait until** to *Network idle*, and use **Wait for element** with a selector that only exists once the data has loaded.
- **Animations, sliders and late pop-ups**: raise **Extra delay** to 2,000 to 5,000 ms.
- **Sites that block data-center traffic** or show a different country's version: turn on **Proxy** (Apify Proxy, residential group for strict sites).
- **Something still covers the page**: add its CSS selector to **Hide these elements**.
- **Error pages**: 4xx and 5xx pages are returned as free failed rows. Turn on **Capture error pages** if you want images of them (they are then charged).
- **Thumbnails**: set **Pixel ratio** to 0.5 and **Full page** off; a 1920 x 1080 desktop screen becomes a 960 x 540 image.
- **Very long pages**: PNG full-page captures go up to about 64 megapixels (for example 1920 x 33,000 px). JPEG is limited to 32,767 px and WebP to 16,383 px in height. Anything below that is cut, and the row says so in `warnings`.
- **Speed**: raise **Pages in parallel** for big lists, and give the run more memory (about 500 MB per parallel page).

### Integrations

Use the Actor from the Apify API, the JavaScript and Python clients, Make, Zapier, n8n, Slack or webhooks. A common pattern: run on a schedule, then send each `screenshotUrl` to Slack, Google Sheets (`=IMAGE(url)`), Airtable or your own storage. You can also call it as a tool from AI agents through the Apify MCP server.

### FAQ

**Where are the files stored?** In the run's default key-value store. Each row has the direct URL (`screenshotUrl`, `pdfUrl`) and the record key. The **Output** tab also links to the store, where you can download all files.

**How long are the files kept?** As long as the run's storage is kept, which depends on your Apify plan's data retention (unnamed run storages are deleted after the retention period). To keep files longer, copy them to your own storage, or into a named key-value store.

**Are the links public?** The links work without logging in to Apify, so you can embed them or pass them to other tools. If your account restricts storage access, the links carry a signature that allows reading that one file.

**Does it click "Accept" on cookie banners?** No. Banners are hidden with CSS, so no consent is given or refused. The page is captured as it looks without the banner.

**Can it log in or capture pages behind a login?** No. It captures public pages only.

**Why does a page look different from my browser?** Sites show different content by country, A/B test or time. Use a proxy from the right country, and the same device and pixel ratio as your browser.

### Legal note

Only capture pages you are allowed to capture, and respect each site's terms of use, copyright and privacy laws. Screenshots can contain personal data or copyrighted material; you are responsible for how you store and use them.

# Actor input Schema

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

Pages to capture, one per line. Bare domains such as example.com get https:// added. Duplicates are removed.

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

Screen size and browser type. Desktop is 1920 x 1080, laptop 1440 x 900, tablet 820 x 1180 (2x), mobile 390 x 844 (3x, phone user agent). Named phones and tablets use Playwright's device presets. Choose Custom to set your own width and height.

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

Browser window width in CSS pixels. Used only when Device is Custom.

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

Browser window height in CSS pixels. Used only when Device is Custom. With Full page on, this only sets the first screen; the image still covers the whole page.

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

Optional. Image pixels per CSS pixel: 2 gives sharp retina images, 0.5 gives small thumbnails. Leave empty to use the device's own ratio (1 for desktop and laptop, 2 to 3 for phones and tablets).

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

Capture the whole page from top to bottom instead of only the first screen. Very long pages are captured in strips and joined, so they never repeat or break.

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

Optional CSS selector, for example #pricing or .product-card. Only the first visible matching element is captured. Full page is then ignored.

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

When the page counts as loaded. Load works for most sites. Network idle waits until no requests run for half a second, best for single-page apps. If the state is not reached in time, the page is captured anyway and the row gets a warning.

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

Extra wait just before the capture, for animations, sliders or late content.

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

Optional CSS selector to wait for before capturing, for example .results or #chart canvas. The page fails (free) if it does not appear within the navigation timeout.

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

Before a full-page or element capture, scroll down the page step by step so lazy images and scroll-triggered sections load, then return to the top.

## `captureErrorPages` (type: `boolean`):

Off: pages that answer with HTTP 4xx or 5xx are not captured and are returned as failed rows (free). On: they are captured and charged like any other page.

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

Hide consent pop-ups from OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, TrustArc, Sourcepoint, iubenda, CookieYes, Complianz and many more, plus generic cookie bars. They are hidden with CSS, never clicked, so no consent is given.

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

Block requests to 141 ad, tracking and pop-up networks (and their subdomains) and collapse empty ad slots. Pages also load faster.

## `hideChatWidgets` (type: `boolean`):

Hide floating chat launchers (Intercom, Drift, HubSpot, Zendesk, Crisp, Tidio, LiveChat and others) and the reCAPTCHA badge.

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

Optional extra CSS selectors to hide before capturing, for example .newsletter-popup or #promo-bar.

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

Ask the site for its dark theme (prefers-color-scheme: dark). Only sites with a dark theme change.

## `disableAnimations` (type: `boolean`):

Finish CSS animations and transitions instantly and reveal scroll-animated sections, so nothing is captured half-faded.

## `screenshot` (type: `boolean`):

Save an image of each page. Turn off and turn on Save PDF to make PDFs only.

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

PNG is lossless and sharpest. JPEG and WebP are much smaller. WebP images are limited to 16,383 px in height and JPEG to 32,767 px; PNG full-page captures go up to about 64 megapixels.

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

1 to 100. Ignored for PNG.

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

Also save each page as a PDF document (print layout, selectable text and links).

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

Paper size of the PDF.

## `pdfLandscape` (type: `boolean`):

Landscape instead of portrait pages.

## `pdfPrintBackground` (type: `boolean`):

Include background colours and images in the PDF.

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

How many pages load at the same time. Each needs about 300 to 600 MB of memory, so raise the run memory too when you raise this.

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

How long to wait for a page to start rendering before it counts as failed.

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

How many times to retry a page that fails to load. Pages whose domain does not exist are not retried.

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

Not needed for most sites. Use Apify Proxy (residential for strict sites) when pages block data-center traffic or you need a screenshot from a specific country.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "device": "desktop",
  "viewportWidth": 1366,
  "viewportHeight": 768,
  "fullPage": true,
  "waitUntil": "load",
  "delayMs": 1000,
  "scrollToBottom": true,
  "captureErrorPages": false,
  "hideCookieBanners": true,
  "blockAds": true,
  "hideChatWidgets": true,
  "darkMode": false,
  "disableAnimations": true,
  "screenshot": true,
  "format": "png",
  "quality": 80,
  "pdf": false,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "maxConcurrency": 3,
  "navigationTimeoutSecs": 45,
  "maxRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `resultsFull` (type: `string`):

No description

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

No description

## `summary` (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://example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dabooti/website-screenshot-api").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("dabooti/website-screenshot-api").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 dabooti/website-screenshot-api --silent --output-dataset

```

## MCP server setup

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

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/NfVrPmquFEaUNhjTj/builds/5bWD8rk2Ja4BAkSTj/openapi.json
