# Website Screenshot & PDF: Full-Page, No Cookie Banners (`genesis.labs.co/website-screenshot-pdf`) Actor

Capture any URL or HTML as a full-page PNG/JPEG screenshot or PDF. Auto-accepts cookie banners, loads lazy images, blocks ads, device presets, bulk URLs. $3/1,000, compute included, failed captures free.

- **URL**: https://apify.com/genesis.labs.co/website-screenshot-pdf.md
- **Developed by:** [Nicholas Powers](https://apify.com/genesis.labs.co) (community)
- **Categories:** Developer tools, SEO tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.60 / 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 & PDF: full-page captures without cookie banners

Turn any URL (or your own HTML) into a **full-page PNG/JPEG screenshot or a PDF** in seconds. Cookie banners are accepted automatically, lazy-loaded images are scrolled into view, ads are blocked, and emoji and Asian characters render correctly. Run one URL or thousands in bulk from the Console, the API, Make, Zapier, n8n, or an AI agent.

**One simple price, no surprise compute bill:** $3 per 1,000 captures, and **failed captures are free**.

### What can it do?

- 📸 **Full-page screenshots** of long pages, capped at a height you choose (`maxHeight`, default 16,000 px) so files stay usable
- 🍪 **Cookie banners dismissed**: clicks "Accept" on OneTrust, Cookiebot, Didomi, Quantcast, Sourcepoint, Usercentrics, TrustArc, Google consent, CookieYes, iubenda, and generic banners in 10+ languages, then hides any leftovers
- 🖼️ **Lazy-loaded images loaded**: fast, time-bounded scrolling that stops at your `maxHeight` and returns to the top, so infinite feeds never stall a run
- 📄 **PDF output**: A4, Letter, Legal, A3, or Tabloid; portrait or landscape; margins; screen or print CSS
- 📱 **Device presets**: desktop 1920/1440, laptop 1366, MacBook Retina, iPad, iPhone 15, Pixel 9, Open Graph 1200×630, or a custom size and pixel density
- 🎯 **Element capture**: screenshot only `#pricing`, a chart, or a tweet card with a CSS selector
- 🌙 **Dark mode**, **sticky-header freezing**, **hide any element** (chat widgets, popups)
- 🧾 **Raw HTML to PDF/PNG**: invoices, reports, certificates, social images
- 🚫 **Ads and trackers blocked**, video streams skipped, for faster and cleaner captures
- ⏱️ **Never "loading forever"**: slow trackers and pages that never reach network idle fall back to what has loaded, with a note in the output
- 🔗 **Direct file links** in the dataset (`screenshotUrl`, `pdfUrl`) and image previews in the Console table
- 🛡️ **Safe by default**: private, internal, and cloud-metadata addresses are refused

### How much does it cost?

You pay per successful file. Platform compute is included, so there is no separate usage bill.

| Event | Free & Bronze | Silver | Gold & above |
|---|---|---|---|
| Screenshot (PNG or JPEG) | $0.003 | $0.0028 | $0.0026 |
| PDF | $0.003 | $0.0028 | $0.0026 |
| Run start (once per run) | $0.0005 | $0.0005 | $0.0005 |

**Examples (Free/Bronze price):**

- 1 screenshot: about **$0.0035**
- 1,000 full-page screenshots: about **$3.00**
- 1,000 URLs as PNG + PDF: about **$6.00**
- 10,000 screenshots per month for SEO or visual monitoring: about **$30** (Gold: $26)
- 100,000 Open Graph images from HTML: about **$300** (Gold: $260)

Failed pages (DNS errors, timeouts, blocked sites) cost nothing. Set **Max cost per run** in the run options and the Actor stops before going over it.

### How to use it

1. Add one or more URLs (or paste HTML).
2. Pick formats (PNG, JPEG, PDF) and a device.
3. Click **Start**. Open the **Captures** tab to see previews, or download files from the **Files** tab.

#### Input example

```json
{
  "urls": [{ "url": "https://www.bbc.com/news" }, { "url": "https://react.dev" }],
  "formats": ["png", "pdf"],
  "device": "desktop-1440",
  "fullPage": true,
  "dismissCookieBanners": true,
  "maxHeight": 16000
}
```

#### Output example (one dataset item per URL)

```json
{
  "url": "https://www.bbc.com/news",
  "finalUrl": "https://www.bbc.com/news",
  "status": 200,
  "title": "BBC News - Breaking news, video and the latest top stories",
  "success": true,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/bbc.com-news-2b552f.png?signature=...",
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/bbc.com-news-2b552f.pdf?signature=...",
  "outputs": { "png": { "key": "bbc.com-news-2b552f.png", "bytes": 4065487, "width": 1440, "height": 6766 } },
  "pageHeight": 6766,
  "loadTimeMs": 5902,
  "notes": ["Cookie banner: clicked \"Accept and Continue\"."],
  "error": null
}
```

Failed URLs appear with `success: false`, a plain-English `error`, and an `errorCode` (`DNS`, `TIMEOUT`, `TLS`, `BLOCKED_HOST`, `SELECTOR_TIMEOUT`, `ELEMENT_NOT_FOUND`, `CRASH`).

#### Call it from the API

```bash
curl -X POST "https://api.apify.com/v2/acts/genesis.labs.co~website-screenshot-pdf/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":[{"url":"https://example.com"}],"formats":["png"]}'
```

The response holds each item with its `screenshotUrl`, so a single HTTP call works as a screenshot API.

### Use cases

- **SEO and marketing**: archive SERP landing pages, competitor homepages, and pricing pages
- **Visual monitoring and QA**: daily screenshots of your site on desktop and mobile
- **Compliance and evidence**: PDF snapshots of terms, ads, and listings with timestamps
- **AI agents and RAG**: give vision models a clean, banner-free image of a page
- **Social images**: render HTML templates into 1200×630 Open Graph images
- **Documents**: turn HTML invoices and reports into PDFs

### Tips and troubleshooting

- **Blank or "access denied" captures**: the site blocks datacenter browsers. Turn on **Proxy** (residential), and add `waitForSelector` or `delayMs`.
- **Part of the page missing**: raise `maxHeight` (up to 30,000 px) or `maxScrollMs` for long feeds.
- **A header repeats down the page**: turn on **Freeze sticky headers**.
- **Only want the top of the page**: set `fullPage` to false, or use a small `maxHeight`.
- **Heavy single-page apps**: use `waitUntil: networkidle`; the Actor still captures if the network never goes quiet.
- **A banner was not dismissed**: add its selector to **Hide elements**.

### FAQ

**Is there an extra compute charge?** No. The price above includes platform compute. You only pay Apify separately if you turn on a proxy.

**How long are files kept?** In the run's key-value store, under your account's data retention. Links in the dataset are signed, so they work without your token.

**How many URLs can I run at once?** Thousands. Pages are captured in parallel (about 3 per 2 GB of memory; set `maxConcurrency` to change it).

**Can I screenshot pages behind a login?** Not yet. Public pages and your own HTML only.

**Is it legal?** Capturing public web pages is generally fine, but respect each site's terms and copyright, and don't capture personal data without a legal basis.

Questions or a site that doesn't capture well? Open an issue on the **Issues** tab; we read every one.

# Actor input Schema

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

Pages to capture. Add as many as you like; they run in parallel.

## `formats` (type: `array`):

Choose one or more. Each file is charged separately.

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

Render your own HTML (invoices, reports, OG images) instead of a URL.

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

Capture the whole page, not just the first screen.

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

Device.

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

Used with device 'custom', or to override a preset.

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

Custom height (px).

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

1 = normal, 2 = retina, 3 = phone-sharp. Overrides the preset.

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

Ask the site for its dark color scheme.

## `dismissCookieBanners` (type: `boolean`):

Accepts common consent banners (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, Google and more) and hides leftovers.

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

Faster loads and cleaner images.

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

E.g. .chat-widget, #newsletter-popup

## `freezeStickyElements` (type: `boolean`):

Turns fixed/sticky headers into normal elements so they appear once at the top of full-page captures.

## `elementSelector` (type: `string`):

CSS selector, e.g. #pricing. Screenshots only that element.

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

Wait until.

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

Wait until this CSS selector is visible before capturing.

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

Wait this long before capturing (animations, charts).

## `scrollToLoad` (type: `boolean`):

Scrolls the page to trigger lazy-loaded images, then scrolls back to the top.

## `maxScrollMs` (type: `integer`):

Stops scrolling infinite feeds after this long.

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

Very long pages are cut at this height.

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

JPEG quality.

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

PDF paper size.

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

PDF landscape.

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

PDF: print backgrounds.

## `pdfMedia` (type: `string`):

PDF: CSS media.

## `pdfMarginMm` (type: `integer`):

PDF margin (mm).

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

Page load timeout (s).

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

Extra attempts for timeouts and browser crashes. Failed captures are never charged.

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

Default is based on memory (1 page per 400 MB).

## `ignoreHttpsErrors` (type: `boolean`):

Ignore HTTPS certificate errors.

## `userAgent` (type: `string`):

Custom user agent.

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

Optional. Use for geo-specific pages or sites that block datacenter IPs. Proxy traffic is billed by Apify separately.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    }
  ],
  "formats": [
    "png"
  ],
  "fullPage": true,
  "device": "desktop-1440",
  "darkMode": false,
  "dismissCookieBanners": true,
  "blockAds": true,
  "freezeStickyElements": false,
  "waitUntil": "load",
  "delayMs": 0,
  "scrollToLoad": true,
  "maxScrollMs": 8000,
  "maxHeight": 16000,
  "jpegQuality": 85,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfMedia": "screen",
  "pdfMarginMm": 10,
  "navigationTimeoutSecs": 45,
  "maxRetries": 1,
  "ignoreHttpsErrors": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `captures` (type: `string`):

Dataset items: url, finalUrl, status, title, success, screenshotUrl, pdfUrl, outputs (per-format key, url, bytes, width, height), pageHeight, loadTimeMs, notes, error.

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

All captured PNG/JPEG/PDF files in the default key-value store.

## `summary` (type: `string`):

OUTPUT record: counts of captured, failed and files.

# 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": [
        {
            "url": "https://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("genesis.labs.co/website-screenshot-pdf").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": [{ "url": "https://apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("genesis.labs.co/website-screenshot-pdf").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": [
    {
      "url": "https://apify.com"
    }
  ]
}' |
apify call genesis.labs.co/website-screenshot-pdf --silent --output-dataset

```

## MCP server setup

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

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/7ThLJtocYuiPPVldG/builds/uKuEzvg5vxHfBcVpz/openapi.json
