# Website Screenshot & PDF API - Full Page, Mobile, Bulk (`kadi_bence/website-screenshot`) Actor

Capture screenshots or PDFs of web pages. Input: URLs; format (PNG, JPEG, WebP, PDF), full page or viewport, device preset, element selector, dark mode. Returns per URL: file URL, title, HTTP status, size. Hides cookie banners, loads lazy images. Charged only for successful captures.

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

## Pricing

from $2.50 / 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 & PDF API: full page, mobile, bulk

Turn **any list of URLs into clean screenshots or PDFs** (full-page or viewport **PNG, JPEG, WebP**, or printable **PDF**) with a real Chromium browser, hidden cookie banners and loaded lazy images, for **$2.50 per 1,000** successful captures. Failed pages are free.

### 📸 What is Website Screenshot & PDF API?

Website Screenshot & PDF API opens each URL you give it in a real headless Chromium browser (Playwright), waits for the page to load, scrolls through it so lazy images appear, hides cookie banners and ads, and saves a screenshot or PDF. Every file goes into the run's key-value store with a **public link**, and you get one tidy dataset row per URL. It does not crawl: it only loads the exact URLs you supply.

- 🍪 **No cookie banners.** Pop-ups from 35+ consent tools (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, Sourcepoint, TrustArc, Google Funding Choices...) are hidden with CSS. **Nothing is clicked**, so no consent is given on your behalf.
- 🖼️ **Lazy content loads**, with no blank boxes and no doubled sticky headers.
- 📱 **Device presets** (desktop, laptop, tablet, mobile) with real user agents and 2x density, or a custom viewport and retina 1-3x.
- 🎯 **Element capture** by CSS selector, 🌙 **dark mode**, wait-for-element, extra delay and network-idle waiting.
- 📄 **PDF** in A4/Letter/Legal/A3/A5/Tabloid, with screen or print styles.
- 💸 **Failures are free**: timeouts, 404s, blocked pages and robots.txt skips are listed with the reason and not charged.

#### 🎯 Use cases

- **Agencies and marketing teams:** schedule daily screenshots of competitors' homepages and pricing pages, and keep a visual history.
- **Compliance and archiving:** save dated PNGs or PDFs of pages, ads, terms or product listings.
- **Developers:** generate link previews, directory thumbnails or portfolio images in bulk.
- **QA teams:** check landing pages on desktop, tablet and mobile after each release, or in dark mode.
- **AI and LLM pipelines:** feed screenshots to GPT-4o, Claude or Gemini for layout or content analysis. JPEG and WebP keep files small.
- **Reports and decks:** capture a single chart, table or section with the CSS selector option.

#### 📋 Output fields

One dataset row per URL (examples from a real run on 2026-10-05):

| Field | Description | Example |
|---|---|---|
| `url` | The URL as captured (`https://` added) | `https://apify.com/` |
| `finalUrl` | The URL after redirects | `https://apify.com/` |
| `status` | HTTP status of the page | `200` |
| `title` | Page title | `Apify: Marketplace of ready-to-run tools for AI` |
| `screenshotUrl` | Public link to the image or PDF | `https://api.apify.com/v2/key-value-stores/<storeId>/records/screenshot-apify.com-b2cbeceab7.png` |
| `key` | File key in the key-value store | `screenshot-apify.com-b2cbeceab7.png` |
| `format` | `png`, `jpeg`, `webp` or `pdf` | `png` |
| `device` | Device preset used | `desktop` |
| `fullPage` | Whole page or viewport only (false for PDF and element) | `true` |
| `selector` | Element selector, if any | `null` |
| `width` | Image width in pixels (null for PDF) | `1920` |
| `height` | Image height in pixels (null for PDF) | `10036` |
| `bytes` | File size in bytes | `1091958` |
| `pdfPages` | Number of PDF pages (null for images) | `null` |
| `truncated` | Page was cut at the height limit | `false` |
| `cookieBannersHidden` | Extra cookie overlays hidden by the generic check (known consent tools are hidden by CSS and not counted) | `0` |
| `durationMs` | Time spent on this URL (ms) | `12922` |
| `takenAt` | Capture time (UTC) | `2026-10-05T03:42:21Z` |
| `error` | Why the page failed, or `null` on success | `null` |

**Use cases:** Developer tools (process & convert media, monitor & alert on website changes, browser automation and testing) · Brand monitoring · Research markets & competitors (track competitors).

### 🚀 How to use it

1. Open [Website Screenshot & PDF API](https://apify.com/kadi_bence/website-screenshot) in Apify Store and click **Try for free**.
2. Paste your **URLs**, one per line (or a CSV column).
3. Choose the **format**, **Full page** on or off, and a **device**.
4. Click **Start**. The prefilled example (3 sites) takes about 20 seconds.
5. Open the **Screenshots** tab for thumbnails and links, or download the dataset. The files are in the run's key-value store.

#### 🔧 Input guide

**URLs** (`urls`, required). Full URLs or bare domains (`example.com` becomes `https://example.com/`). One per line; commas and spaces also work, and lines starting with `#` are ignored. Duplicates are skipped. Max **50,000 URLs** per run.

- Good: `https://example.com/pricing`, `apify.com`
- Bad: `ftp://example.com` (http/https only), `https://user:pass@example.com` (no logins), `localhost` or `192.168.1.10` (private addresses are rejected).

**Format, full page and device**

- `format`: `png` (lossless, sharp text), `jpeg` or `webp` (much smaller files), `pdf` (printable, selectable text). Same price for all.
- `fullPage`: whole scrollable page, or off for the visible viewport only. Ignored for PDF and element captures.
- `device`: `desktop` 1920x1080, `laptop` 1366x768, `tablet` 820x1180 and `mobile` 412x915 (both 2x pixels, touch, Android user agent). `viewportWidth` (200-3840), `viewportHeight` (200-4320) and `deviceScaleFactor` (1-3) override the preset.

**Element capture** (`selector`). E.g. `#pricing` or `table.results`: only the first visible match is captured. If nothing matches within 10 s, the row is a free error. Plain CSS only (no braces, max 500 characters).

**Page loading**

- `waitUntil`: `load` (default; load event capped at 8 s after the page is ready, plus up to 1.5 s for late requests), `networkidle` (up to 15 s, for heavy single-page apps) or `domcontentloaded` (fastest, may miss images).
- `delayMs` (0-30,000): extra wait, e.g. `2000` for intro animations.
- `waitForSelector`: wait until an element is visible (max 15 s). If it never appears, the row is a free error.
- `scrollToLoad` (default on): scrolls the page (max 8 s) before full-page, element or PDF captures, then returns to the top.

**Clean-up.** `hideCookieBanners` and `blockAds` are on by default. `hideSelectors` takes up to 50 extra selectors (e.g. `#intercom-container`). `darkMode` works only on sites that support it. If the page itself is on the ad block list, the row says so: turn `blockAds` off.

**Image and PDF options.** `quality` 1-100 (JPEG/WebP, default 80). `fullPageMaxHeight` (500-30,000 CSS px, default 20,000) cuts very long pages and sets `truncated: true`. Warning: WebP is also limited to 16,383 px and JPEG to 65,500 px, divided by pixel density (a 2x WebP is cut at 8,191 CSS px). PDF: `pdfFormat`, `pdfLandscape`, `pdfMargin` (`10mm`, `0.5in`, `0`...), `pdfPrintBackground`, `pdfUseScreenCss` (off = the site's print stylesheet).

**robots.txt** (`respectRobotsTxt`, default on). Checked per RFC 9309 for the `WebsiteScreenshot` token or `*`. Disallowed pages are skipped for free. `Crawl-delay` is honoured per site (max 30 s). If robots.txt returns 429 or 5xx, the site counts as disallowed. Keep it on unless you own the site.

**Limits & performance**

- `maxConcurrency` 0 = automatic: 2 GB memory gives 3 parallel tabs, 4 GB gives 6, 8 GB gives 12. Manual values are capped at 3 tabs per GB. More memory = faster, same price per screenshot.
- `navigationTimeoutSecs` (5-120, default 45) and `maxRetries` (0-3, default 1). Timeouts, network errors and tab crashes are retried; HTTP errors like 403 or 404 are not.

**Proxy.** Usually not needed. Apify Proxy (datacenter) works; residential proxies are rejected as invalid input.

**Full example input**

```json
{
  "urls": ["https://example.com", "apify.com/pricing", "https://www.wikipedia.org"],
  "format": "webp",
  "fullPage": true,
  "device": "mobile",
  "quality": 80,
  "waitUntil": "load",
  "hideCookieBanners": true,
  "blockAds": true,
  "hideSelectors": ["#intercom-container"],
  "fullPageMaxHeight": 20000,
  "respectRobotsTxt": true,
  "maxConcurrency": 0,
  "navigationTimeoutSecs": 45,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### 📦 Output (real run on 2026-10-05)

One row per URL (`screenshotUrl` shown in its Apify platform form; the local test run wrote a file path):

```json
{
  "url": "https://www.wikipedia.org/",
  "finalUrl": "https://www.wikipedia.org/",
  "status": 200,
  "title": "Wikipedia",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/screenshot-wikipedia.org-72e64cabc2.png",
  "key": "screenshot-wikipedia.org-72e64cabc2.png",
  "format": "png",
  "device": "desktop",
  "fullPage": true,
  "selector": null,
  "width": 1920,
  "height": 1101,
  "bytes": 149002,
  "pdfPages": null,
  "truncated": false,
  "cookieBannersHidden": 0,
  "durationMs": 6764,
  "takenAt": "2026-10-05T03:42:15Z",
  "error": null
}
```

A failed page is still listed, with `error` filled in and no file, for example `"HTTP 403 - the site blocks automated access (not charged)"`, `"Domain not found (DNS lookup failed)"` or `"robots.txt of this site does not allow automated access to this page - skipped (not charged)"`.

**Dataset views:** **Screenshots** shows a thumbnail, URL, title, HTTP status, size and error. **Links and details** adds the final URL, file link, format, device, truncated, PDF pages, overlays hidden, timing and date.

**Key-value store:**

- **The files**, with keys like `screenshot-<domain>-<hash>.<ext>` (`png`, `jpg`, `webp`, `pdf`). The hash comes from the URL, so the same URL always gets the same key name.
- **RUN_SUMMARY**: URLs requested, screenshots taken, failures by type (`http`, `timeout`, `dns`, `robots`, `blocked`...), invalid inputs and duplicates skipped, whether the charge limit was hit, parallel tabs, options, Chromium version and timing. The prefilled run: 3 of 3 in 14.8 s, 4.94 s wall time per screenshot.

**Export:** download the dataset as **JSON, CSV, Excel, XML, RSS or an HTML table**, or read it via the API. `screenshotUrl` links are public, so they work in Google Sheets (`=IMAGE(...)`), Airtable or Slack without logging in.

### 💵 Pricing: $2.50 per 1,000 screenshots

Pay per event: **$0.0025 per successful screenshot or PDF** (event `screenshot`), plus Apify's $0.00005 per-run start fee. Browser compute is included.

| Typical run | Captures | Cost |
|---|---|---|
| Prefilled example | 3 | $0.0075 + $0.00005 |
| 20 competitor homepages, daily for 30 days | 600 | $1.50 + 30 x $0.00005 = $1.5015 |
| 1,000 thumbnails | 1,000 | $2.50 + $0.00005 |
| 10,000 product pages | 10,000 | $25.00 + $0.00005 |

- Format, device, full page and retina don't change the price.
- **Free:** failed pages (timeouts, HTTP and DNS errors, bot challenges, downloads, missing selectors), robots.txt skips, invalid and duplicate URLs.
- **Max charge per run** caps spending: the run stops cleanly at your limit.

Why this price? A real browser needs several CPU-seconds to render a modern page properly (waiting for images, scrolling lazy content, hiding banners). The price covers that compute.

### 🔌 Use it via API

Replace `YOUR_API_TOKEN` with your token from Apify Console (**Settings → API & Integrations**).

**JavaScript** (`npm install apify-client`)

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('kadi_bence/website-screenshot').call({
    urls: ['https://example.com', 'apify.com/pricing'],
    format: 'webp',
    device: 'mobile',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) console.log(item.url, item.screenshotUrl ?? item.error);
```

**Python** (`pip install apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('kadi_bence/website-screenshot').call(run_input={
    'urls': ['https://example.com', 'https://www.wikipedia.org'],
    'format': 'pdf',
    'pdfFormat': 'Letter',
})
for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['url'], item['screenshotUrl'] or item['error'])
```

**cURL** (runs and returns the rows in one call; best for small batches)

```bash
curl -X POST "https://api.apify.com/v2/acts/kadi_bence~website-screenshot/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://example.com"], "format": "jpeg", "fullPage": false}'
```

**Apify CLI**

```bash
apify call kadi_bence/website-screenshot --input '{"urls": ["https://example.com"]}'
apify call kadi_bence/website-screenshot -f input.json
```

**MCP for AI agents** (Claude, Cursor, VS Code and other MCP clients):

```json
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=kadi_bence/website-screenshot"}}}
```

### 🔁 Integrations & scheduling

Use **Apify Schedules** (cron) for recurring runs, **webhooks** to call your URL when a run succeeds, **Zapier, Make or n8n** to pass `screenshotUrl` links to other apps, **Google Sheets** export, and **Slack or email** integrations for notifications.

1. **Screenshot competitors' homepages daily.** Save a task with their homepages and pricing pages (`format: jpeg`), schedule it every morning, and send the links to Slack. Each row has `takenAt`, and the key name stays the same per URL, so today's and yesterday's images line up.
2. **Mobile and desktop QA after a release.** Start two runs from CI or a webhook (`device: desktop` and `device: mobile`) and scan the **Screenshots** tab.
3. **Archive pages as PDF.** Use `format: pdf` and copy the files to your own storage with Make or n8n, because unnamed run storages are deleted after your plan's retention period.

### 🧰 Related tools by the same developer

**Website due diligence**

- [Website Tech Stack Detector](https://apify.com/kadi_bence/tech-stack-detector) - CMS, ecommerce, analytics and frameworks from 7,600+ fingerprints; $1.50 / 1,000 websites.
- [SEO Site Audit Crawler](https://apify.com/kadi_bence/seo-site-audit) - broken links, redirects, titles/meta, canonical, hreflang on every page; $1.50 / 1,000 pages.
- [Bulk WHOIS & RDAP Domain Lookup](https://apify.com/kadi_bence/domain-whois-lookup) - registrar, age, expiry, DNS/MX/SPF/DMARC; $1.50 / 1,000 domains.

**Content pipelines**

- [Document to Markdown](https://apify.com/kadi_bence/document-to-markdown) - PDF/Word/PowerPoint/Excel/OCR to Markdown and RAG chunks; $2 / 1,000 documents.
- [Bulk Image Downloader](https://apify.com/kadi_bence/bulk-image-downloader) - all images/files from pages into a ZIP; $0.80 / 1,000 files.

### ❓ FAQ

**How does it work?**
Each URL opens in a fresh, isolated headless Chromium context (Playwright), is loaded, scrolled, cleaned up and captured. A crashed browser is relaunched and the page retried.

**How fast is it?**
Simple pages take a few seconds and heavy modern pages 10-20 seconds, with several captured at the same time. With the default 4 GB of memory (6 parallel tabs), expect roughly 500-1,000 full-page screenshots per hour. More memory gives more parallel tabs at the same price per screenshot.

**What are the limits?**
Up to 50,000 URLs per run. Full-page images are cut at 20,000 px by default (WebP at 16,383 px, a format limit), and the row then shows `truncated: true`. Each page has a 45 s load timeout with one retry. PDFs follow the browser's print layout.

**A cookie banner or pop-up is still visible?**
Add its CSS selector to **Hide these elements**, and please open an issue with the URL so we can add it to the built-in list.

**Some sites fail with 403 or a bot challenge?**
Large sites (Amazon, Etsy, NYTimes, Zalando...) sometimes block automated browsers. Those rows are free. You can try **Apify Proxy (datacenter)**. Residential proxies are not supported, and challenges are never bypassed. Without a proxy, pages load from Apify's servers (mostly in the US), so sites may show their US version.

**Which pages can I capture? Is it legal?**
Only capture pages you are allowed to: public pages, or your own sites. The Actor never logs in, doesn't bypass paywalls, CAPTCHAs or bot protection, and respects **robots.txt** by default. The captured content belongs to its owners: **copyright and how you use the images or PDFs are your responsibility**. Screenshots can contain personal data if the page shows it, so handle them under GDPR or your local laws. This is not legal advice.

**Can I use it from my code or an AI agent?**
Yes: the API, clients, CLI, Make, Zapier, n8n or the MCP server (see above).

**How much does a big job cost?**
$0.0025 per successful capture: 50,000 screenshots (the per-run maximum) cost $125 plus the $0.00005 start fee. Set **Max charge per run** to cap it.

**What if something fails?**
A failed page gets a row with the reason in `error` and is not charged; `RUN_SUMMARY` counts errors by type. If a run fails or a result looks wrong, open an issue in the **Issues** tab with the run link.

### 📝 Changelog

- **1.0 (2026-10-05):** First release. PNG/JPEG/WebP/PDF, full page/viewport/element, device presets, dark mode, cookie-banner hiding, lazy-load scrolling, ad blocking, robots.txt, failed pages not charged.
- **2026-10-05:** Store page rewritten.

### 🤝 Need a custom version?

I build custom scrapers, scheduled data feeds and integrations (CSV, Excel, Google Sheets, API, MCP for AI agents). Tell me the sites and fields you need:

- Email: bence.kadi@gmail.com
- Apify profile: https://apify.com/kadi_bence

### Related Actors

More low-cost Actors by the same developer, built on official APIs and public data:

- [Bulk Image Downloader](https://apify.com/kadi_bence/bulk-image-downloader) — download all images from URLs as a ZIP
- [Document to Markdown](https://apify.com/kadi_bence/document-to-markdown) — PDF, Word, PowerPoint and Excel to clean Markdown, with OCR
- [PageSpeed Insights Bulk Checker](https://apify.com/kadi_bence/pagespeed-checker) — Core Web Vitals and Lighthouse scores in bulk
- [SEO Site Audit](https://apify.com/kadi_bence/seo-site-audit) — 0-100 SEO score per page, broken links and fix hints
- [Website Tech Stack Detector](https://apify.com/kadi_bence/tech-stack-detector) — CMS, ecommerce, analytics and frameworks of any website
- [Bulk WHOIS & RDAP Domain Lookup](https://apify.com/kadi_bence/domain-whois-lookup) — registrar, dates and DNS for many domains
- [AI Visibility Tracker](https://apify.com/kadi_bence/ai-visibility-tracker) — how ChatGPT, Perplexity, Gemini and Claude mention your brand

All my Actors: [apify.com/kadi_bence](https://apify.com/kadi_bence)

# Actor input Schema

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

Web pages to capture, one per line, e.g. https://example.com/pricing or just example.com (https:// is added). Duplicates are skipped, max 50,000 per run. You can paste a CSV column. Only capture pages you are allowed to.

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

PNG = lossless, sharp text. JPEG / WebP = much smaller files (WebP smallest). PDF = printable document with selectable text. Every format costs the same.

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

On: the whole scrollable page. Off: only the visible viewport ("above the fold"). Ignored for PDF and when a CSS selector is set.

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

Desktop 1920x1080, Laptop 1366x768, Tablet 820x1180 (2x pixels, touch, mobile user agent), Mobile 412x915 (2x pixels, touch, Android Chrome user agent). Sites that serve a mobile layout will show it.

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

Overrides the device width (200-3840), e.g. 1280. Leave empty to use the device preset.

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

Overrides the device height (200-4320), e.g. 800. For viewport screenshots this is the image height.

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

1 = normal, 2 = retina (twice the pixels in each direction), 3 = extra sharp. Empty = device default (desktop 1, tablet and mobile 2). Bigger images take longer.

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

Optional. Capture only the first visible element matching this CSS selector, e.g. #pricing, .hero or table.results. If nothing matches, the row is an error and is not charged.

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

Load = page load event (max 8 s after the page is ready) plus up to 1.5 s for late network requests (good default). Network idle = wait until the network is quiet (up to 15 s; slower but safer for single-page apps). DOM ready = fastest, may miss images.

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

Extra wait after loading, e.g. 2000 for pages with intro animations or slow charts. Max 30000.

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

Optional. Wait until this element is visible before capturing (max 15 s), e.g. .chart-loaded. If it never appears, the row is an error and is not charged.

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

Scrolls through the page (max 8 s) before a full-page, element or PDF capture so lazy-loaded images and sections render, then scrolls back to the top.

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

Hides consent pop-ups from 35+ consent tools (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast...) and other cookie overlays with CSS. Nothing is clicked: no consent is given on your behalf.

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

Blocks requests to common ad and tracking networks and hides empty ad slots. Faster loads and cleaner screenshots.

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

Optional. Extra elements to hide before capture (up to 50), e.g. chat widgets or newsletter pop-ups: #intercom-container, .newsletter-modal

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

Tell the page the visitor prefers a dark color scheme (prefers-color-scheme: dark). Works on sites that support dark mode.

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

JPEG and WebP quality, 1-100, e.g. 70 for small thumbnails. Higher = sharper but bigger files. Ignored for PNG and PDF.

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

Paper size for PDF output, e.g. A4 (Europe) or Letter (US).

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

Landscape instead of portrait PDF pages. Useful for wide dashboards and tables.

## `pdfMargin` (type: `string`):

Margin on all four sides, e.g. 10mm, 0.5in, 1cm, 20px or 0.

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

Keep background colors and images in the PDF (as on screen).

## `pdfUseScreenCss` (type: `boolean`):

On: the PDF uses the page's normal screen styles (looks like the website). Off: the page's print stylesheet is used (often plainer, without navigation).

## `fullPageMaxHeight` (type: `integer`):

Very long or infinite-scroll pages are cut at this height (CSS pixels) and the row gets truncated: true. WebP is also limited to 16,383 px and JPEG to 65,500 px (divided by the pixel density).

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

How many pages are captured at the same time. 0 = automatic from the run memory (2 GB: 3 tabs, 4 GB: 6, 8 GB: 12). For more speed, give the run more memory: the price per screenshot stays the same.

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

Give up on a page that does not load within this time (it is retried once). Failed pages are not charged.

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

Retries after a timeout, network error or tab crash (HTTP errors like 404 are not retried). Failed pages are not charged.

## `respectRobotsTxt` (type: `boolean`):

Skip pages that the site's robots.txt does not allow for automated access (RFC 9309). Skipped pages are listed and not charged. Keep this on unless you own the site.

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

Usually not needed. Use Apify Proxy (datacenter) to capture from other IP addresses. Residential proxies are not supported.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://apify.com",
    "https://www.wikipedia.org"
  ],
  "format": "png",
  "fullPage": true,
  "device": "desktop",
  "waitUntil": "load",
  "delayMs": 0,
  "scrollToLoad": true,
  "hideCookieBanners": true,
  "blockAds": true,
  "darkMode": false,
  "quality": 80,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfMargin": "10mm",
  "pdfPrintBackground": true,
  "pdfUseScreenCss": true,
  "fullPageMaxHeight": 20000,
  "maxConcurrency": 0,
  "navigationTimeoutSecs": 45,
  "maxRetries": 1,
  "respectRobotsTxt": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

URL, title, status and the public screenshot/PDF link per page.

## `full` (type: `string`):

All fields incl. size, bytes, timing and errors.

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

The key-value store with every captured image or PDF.

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

Counts, error types, timing per screenshot and the browser version.

# 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://apify.com",
        "https://www.wikipedia.org"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

# Run the Actor and wait for it to finish
run = client.actor("kadi_bence/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://example.com",
    "https://apify.com",
    "https://www.wikipedia.org"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call kadi_bence/website-screenshot --silent --output-dataset

```

## MCP server setup

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