# Complete Page Capture - Screenshot & PDF (`nimbryxo-studio/full-page-website-screenshot-and-pdf-capture`) Actor

Capture complete full-page screenshots or PDFs of any URL list. Scrolls lazy content, waits for images and fonts, removes fixed headers and consent overlays, emulates real devices, and reports blocks and truncation instead of returning a broken image.

- **URL**: https://apify.com/nimbryxo-studio/full-page-website-screenshot-and-pdf-capture.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Automation, Developer tools, SEO tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Complete Page Capture - Screenshot & PDF

Capture complete full-page screenshots or PDFs of any URL list. This actor scrolls lazy content into view, waits for images and fonts, removes fixed headers and consent overlays, supports real device emulation, and tells you when a page was blocked or truncated instead of returning a broken image as a success.

### Why this actor

- **Complete captures** - scrolls through the page to trigger lazy images and infinite-scroll widgets, then captures with the page reset to the top.
- **Clean captures** - can hide fixed headers, overlays and common cookie banners before the shot without deleting sticky content cards.
- **Honest results** - reports HTTP status, page title, block reason, truncation, image failures and file metadata for every URL.
- **Real device modes** - desktop, laptop, tablet, iPhone, Pixel and Galaxy presets with the right viewport, user agent, touch support and pixel density.
- **Useful formats** - PNG, JPEG, WebP and PDF, with PDF paper size, orientation, margins, backgrounds and a one-page mode.
- **Bulk friendly** - concurrent captures, bounded retries, per-URL timeouts and a hard cap for very long or infinite pages.

### Quick start

```json
{
  "urls": [
    {"url": "https://www.apify.com/"},
    {"url": "https://en.wikipedia.org/wiki/World_War_II"}
  ],
  "format": "png",
  "device": "desktop",
  "scrollToBottom": true
}
```

Every URL produces one dataset record and one file in the run's key-value store. The `screenshotUrl` field is a public download link; no Apify token is needed to open it.

### Inputs

| Field | Default | What it does |
|---|---|---|
| `urls` | - | Required. URL list; accepts URL objects or plain strings. Bare domains use https. |
| `format` | `png` | `png`, `jpeg`, `webp` or `pdf`. |
| `quality` | `85` | JPEG/WebP quality, 1-100. |
| `fullPage` | `true` | Capture the whole scrollable page. Turn off for the first screen only. |
| `selector` | - | Capture one element by CSS selector instead of the page. |
| `device` | `custom` | `custom`, `desktop`, `desktop_hd`, `laptop`, `tablet`, `ipad`, `iphone_15`, `iphone_se`, `pixel_8`, `galaxy_s23`. |
| `viewportWidth` | `1280` | Width for `device=custom`, 100-3840. |
| `viewportHeight` | `1080` | Height for `device=custom`, 100-4320. |
| `deviceScaleFactor` | `1` | Pixel density for `device=custom`, 1-3. |
| `colorScheme` | `no-preference` | `no-preference`, `light` or `dark`. |
| `locale` | `en-US` | Browser language for localized pages. |
| `waitUntil` | `load` | `load`, `domcontentloaded`, `networkidle` or `commit`. |
| `waitForSelector` | - | Wait for a selector to become visible before capture. |
| `waitForImages` | `true` | Wait up to 5 seconds for images after scrolling. |
| `waitForFonts` | `true` | Wait up to 5 seconds for web fonts. |
| `delay` | `0` | Extra milliseconds after navigation. |
| `scrollToBottom` | `true` | Scroll through the page to trigger lazy content. |
| `maxScrollSteps` | `400` | Hard scroll-step cap. |
| `scrollStepPx` | `250` | Pixels per scroll step. |
| `delayAfterScrolling` | `1000` | Milliseconds to settle after scrolling. |
| `waitUntilNetworkIdleAfterScroll` | `false` | Wait for network idle after scrolling. |
| `waitUntilNetworkIdleAfterScrollTimeout` | `15000` | Network-idle timeout in milliseconds. |
| `hideFixedElements` | `false` | Hide fixed headers, full-screen overlays and chat widgets. Sticky content blocks stay in place. |
| `cookieBannerAction` | `hide` | `hide`, `accept` or `off`. |
| `selectorsToHide` | - | Extra comma/newline-separated CSS selectors to hide. |
| `pdfPageSize` | `web` | `web`, `a4`, `letter`, `legal`, `a3`, `a5` or `tabloid`. |
| `pdfLandscape` | `false` | Landscape PDF pages. |
| `pdfPrintBackground` | `true` | Include CSS backgrounds and colors in the PDF. |
| `pdfFitOnePage` | `false` | One tall PDF page instead of paginated paper. |
| `pdfMargin` | `none` | `none`, `narrow`, `normal` or `wide`. |
| `maxConcurrency` | `1` | URLs captured in parallel, 1-5. Use 1 for long pages at 2048 MB. |
| `maxRetries` | `1` | Retries for transient navigation failures and blocks. |
| `navigationTimeoutSecs` | `60` | Per-URL navigation and selector timeout. |
| `maxPageHeight` | `0` | Clip full-page images at this CSS height; 0 is unlimited. PDFs keep their full document height. |
| `proxyConfiguration` | - | Optional proxy override. The actor starts direct and escalates to an AUTO datacenter proxy only after a real block. |

### Output

Each dataset record contains:

| Field | Meaning |
|---|---|
| `startUrl` | URL you submitted. |
| `url` | Final URL after redirects. |
| `screenshotUrl` | Public download link for the file. |
| `screenshotKey` | Key of the file in the run's key-value store. |
| `format` | `png`, `jpeg`, `webp` or `pdf`. |
| `status` | `success` for a real stored capture, otherwise `error: ...`. |
| `timestamp` | ISO-8601 UTC capture time. |
| `pageTitle` | Page title at capture time. |
| `httpStatus` | Main document HTTP status. |
| `contentType` | Main response content type. |
| `blocked` / `blockReason` | Whether the page was a block, captcha or login wall, and which kind. |
| `errorType` | Machine-readable error category. |
| `device`, `viewportWidth`, `viewportHeight`, `deviceScaleFactor`, `colorScheme` | Rendering settings used. |
| `fullPage`, `selector` | Capture scope. |
| `imageWidth`, `imageHeight`, `fileSizeBytes` | File dimensions and size. |
| `pageHeight`, `capturedHeight`, `truncated` | Page height, captured height and whether a cap clipped it. |
| `pdfPages`, `pdfPageSize` | PDF page count and paper size. |
| `durationMs`, `imagesTotal`, `imagesFailed`, `retries` | Capture evidence. Image counts cover visible images only; hidden tracking pixels are ignored. |
| `warnings` | Human-readable notes such as failed images or a hit scroll cap. |

Blocked pages are not stored as screenshots and do not produce a success record. The record says `blocked: true` and `status: error: blocked (...)`, so a challenge page cannot be mistaken for page content.

### Examples

#### Mobile screenshot

```json
{
  "urls": [{"url": "https://stripe.com/"}],
  "device": "iphone_15",
  "format": "jpeg",
  "quality": 85
}
```

#### Full-page, dark PDF

```json
{
  "urls": [{"url": "https://tailwindcss.com/"}],
  "format": "pdf",
  "colorScheme": "dark",
  "pdfPageSize": "a4",
  "pdfFitOnePage": true,
  "cookieBannerAction": "hide"
}
```

#### Capture one section

```json
{
  "urls": [{"url": "https://www.apify.com/"}],
  "selector": "main",
  "fullPage": false,
  "format": "png"
}
```

### What changed in this revamp

- `scrollToBottom` now defaults to `true` so lazy images are actually loaded.
- `hideFixedElements` defaults to `false`: resetting to the top already avoids repeated headers on most pages, and this keeps sticky content cards in the image. Turn it on to remove fixed headers/overlays.
- `cookieBannerAction` now defaults to `hide`.
- `maxConcurrency` now defaults to `1` for safe 2048 MB memory use; raise it only when you have memory headroom.
- The `screenshotUrl` field now returns a working public link.
- `waitUntil=domcontentloaded` is the prefill because `networkidle` can stall on analytics-heavy pages.
- Pages that return 403/captcha/login walls are reported as blocked errors, not successes.

You can turn each of these off from the input form.

### Limitations

- Only public, anonymous pages are supported. Login-protected pages are outside this actor's design.
- Some sites use CAPTCHA or bot defenses that cannot be bypassed. Those URLs are reported as blocked and are not charged as successful captures.
- Consent banners are handled on a best-effort basis. Hide is more reliable than click-accept; use `selectorsToHide` for a site-specific banner.
- Some lazy images never load because of the site's own rules or missing assets. Only visible images are counted in `imagesFailed` and listed in `warnings`; hidden tracking pixels and empty placeholders are ignored.
- Fixed headers are kept by default. Enable `hideFixedElements` to remove fixed headers, full-screen overlays and chat widgets; sticky content cards are intentionally preserved.
- Very long or infinite pages are capped by `maxScrollSteps` and `maxPageHeight`; the record sets `truncated: true` when a cap clips the capture.
- A direct PDF URL is copied when `format=pdf`; asking for an image of a PDF is reported as an error because Chromium downloads the file instead of rendering it.
- PDF pagination follows the browser's print layout, which can differ from the screen layout.

### FAQ

**Do I need a proxy?** No. The actor starts with a direct connection and only uses an AUTO datacenter proxy after a real block. If you supply your own proxy, it is used instead.

**Can I capture a page that requires a login?** No. Authenticated pages are intentionally out of scope.

**How do I hide a cookie banner?** Leave `cookieBannerAction` on `hide`. If a site uses a custom banner, add its selector to `selectorsToHide`.

**Why is a page reported as blocked?** The actor saw an HTTP 403/429/451, a CAPTCHA/Cloudflare challenge, or a login wall. The block page is not saved as a normal screenshot.

**Why is my image shorter than the page?** Check `truncated` and `warnings`. `maxPageHeight` or `maxScrollSteps` may have capped the capture.

**Can I capture multiple URLs?** Yes. Each URL produces its own record and file. Keep `maxConcurrency` at 1 for very long pages at 2048 MB; use a larger memory setting before raising concurrency.

**Can I make a single-page PDF?** Set `format=pdf` and `pdfFitOnePage=true`. For paper output, choose `pdfPageSize` and `pdfMargin`.

# Actor input Schema

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

Web pages to capture. Each item can be a URL object or a plain URL string. Bare domains such as example.com are accepted and use https.

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

PNG is lossless, JPEG and WebP are smaller, PDF produces a printable document. WebP conversion uses Pillow after the browser capture.

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

Quality for JPEG and WebP output (1-100). Ignored for PNG and PDF.

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

Capture the full scrollable page. Turn off to capture only the visible viewport. A selector overrides this option.

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

Optional CSS selector. When set, captures only that element and ignores fullPage. Example: main, #pricing, article.

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

Device preset. Custom uses the viewport width, height and scale factor below. Presets emulate a real mobile or desktop browser.

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

Browser viewport width in pixels when Device is Custom.

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

Browser viewport height in pixels when Device is Custom.

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

Pixel density for Device=Custom: 1 is standard, 2 is retina, 3 is high-DPI mobile. Device presets use their own scale factor.

## `colorScheme` (type: `string`):

Request the site's light or dark theme through prefers-color-scheme where the site supports it.

## `locale` (type: `string`):

Locale used for navigator.language and localized pages.

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

Navigation readiness. DOM content loaded is the fastest reliable default; network idle can stall on analytics-heavy sites.

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

Optional CSS selector to wait for before capture. Useful for single-page apps. Fails the URL if the element never becomes visible.

## `waitForImages` (type: `boolean`):

Wait up to 5 seconds for images to finish loading after scrolling. Incomplete images are reported in warnings.

## `waitForFonts` (type: `boolean`):

Wait up to 5 seconds for web fonts to finish loading.

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

Additional milliseconds to wait after navigation before scrolling or capturing.

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

Scroll through the page in steps to trigger lazy images, infinite-scroll widgets and content-visibility sections before capture.

## `maxScrollSteps` (type: `integer`):

Stop after this many scroll steps. Prevents infinite-scroll pages from running forever. A cap hit sets truncated=true in the record.

## `scrollStepPx` (type: `integer`):

Pixels to scroll per step. Smaller steps trigger more IntersectionObserver content but take longer.

## `delayAfterScrolling` (type: `integer`):

Milliseconds to wait after scrolling and before capture. Only used when scrolling is enabled.

## `waitUntilNetworkIdleAfterScroll` (type: `boolean`):

After scrolling, wait until the network is idle before capture. Uses the timeout below.

## `waitUntilNetworkIdleAfterScrollTimeout` (type: `integer`):

Maximum milliseconds to wait for network idle after scrolling.

## `hideFixedElements` (type: `boolean`):

Hide real fixed headers, full-screen overlays and chat widgets before capture. Sticky content blocks are left in place. Default off because resetting to the top already prevents repeated headers on most pages.

## `cookieBannerAction` (type: `string`):

Hide common cookie and consent overlays, click Accept first, or leave them untouched.

## `selectorsToHide` (type: `string`):

Comma or newline separated CSS selectors for extra elements to hide before capture. Example: .newsletter-popup, #chat-widget

## `pdfPageSize` (type: `string`):

Paper size for PDF output. Web page width preserves the previous 1280 px wide / Letter-height behavior.

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

Use landscape orientation for PDF pages.

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

Include CSS backgrounds, colors and images in the PDF.

## `pdfFitOnePage` (type: `boolean`):

Create one tall PDF page instead of paginated paper. Overrides the paper height but keeps the selected margins.

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

Page margins for PDF output.

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

How many URLs to capture in parallel. Keep at 1 for long pages at 2048 MB; higher values need more memory.

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

Retry transient navigation failures and block pages. Retries use the AUTO datacenter proxy when no user proxy is configured.

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

Maximum seconds to wait for navigation and selector readiness per URL.

## `maxPageHeight` (type: `integer`):

Clip full-page images at this CSS height. 0 means unlimited. PDFs keep their full document height and ignore this limit. Truncation is reported in the record.

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

Optional proxy override. The actor starts direct and uses an Apify AUTO datacenter proxy only after a real block when this is empty. Residential is never selected automatically.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.apify.com/"
    }
  ],
  "format": "png",
  "quality": 85,
  "fullPage": true,
  "device": "custom",
  "viewportWidth": 1280,
  "viewportHeight": 1080,
  "deviceScaleFactor": 1,
  "colorScheme": "no-preference",
  "locale": "en-US",
  "waitUntil": "domcontentloaded",
  "waitForImages": false,
  "waitForFonts": true,
  "delay": 0,
  "scrollToBottom": false,
  "maxScrollSteps": 400,
  "scrollStepPx": 250,
  "delayAfterScrolling": 0,
  "waitUntilNetworkIdleAfterScroll": false,
  "waitUntilNetworkIdleAfterScrollTimeout": 1000,
  "hideFixedElements": false,
  "cookieBannerAction": "hide",
  "pdfPageSize": "web",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfFitOnePage": false,
  "pdfMargin": "none",
  "maxConcurrency": 1,
  "maxRetries": 0,
  "navigationTimeoutSecs": 60,
  "maxPageHeight": 0
}
```

# Actor output Schema

## `screenshots` (type: `string`):

Dataset containing one result per URL, including status, HTTP status, page title, image dimensions and public file URL.

## `screenshotFiles` (type: `string`):

Key-value store containing the PNG, JPEG, WebP or PDF 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://www.apify.com/"
        }
    ],
    "format": "png",
    "quality": 85,
    "fullPage": true,
    "device": "custom",
    "viewportWidth": 1280,
    "viewportHeight": 1080,
    "deviceScaleFactor": 1,
    "colorScheme": "no-preference",
    "locale": "en-US",
    "waitUntil": "domcontentloaded",
    "waitForImages": false,
    "waitForFonts": true,
    "delay": 0,
    "scrollToBottom": false,
    "maxScrollSteps": 400,
    "scrollStepPx": 250,
    "delayAfterScrolling": 0,
    "waitUntilNetworkIdleAfterScroll": false,
    "waitUntilNetworkIdleAfterScrollTimeout": 1000,
    "hideFixedElements": false,
    "cookieBannerAction": "hide",
    "pdfPageSize": "web",
    "pdfLandscape": false,
    "pdfPrintBackground": true,
    "pdfFitOnePage": false,
    "pdfMargin": "none",
    "maxConcurrency": 1,
    "maxRetries": 0,
    "navigationTimeoutSecs": 60,
    "maxPageHeight": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/full-page-website-screenshot-and-pdf-capture").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://www.apify.com/" }],
    "format": "png",
    "quality": 85,
    "fullPage": True,
    "device": "custom",
    "viewportWidth": 1280,
    "viewportHeight": 1080,
    "deviceScaleFactor": 1,
    "colorScheme": "no-preference",
    "locale": "en-US",
    "waitUntil": "domcontentloaded",
    "waitForImages": False,
    "waitForFonts": True,
    "delay": 0,
    "scrollToBottom": False,
    "maxScrollSteps": 400,
    "scrollStepPx": 250,
    "delayAfterScrolling": 0,
    "waitUntilNetworkIdleAfterScroll": False,
    "waitUntilNetworkIdleAfterScrollTimeout": 1000,
    "hideFixedElements": False,
    "cookieBannerAction": "hide",
    "pdfPageSize": "web",
    "pdfLandscape": False,
    "pdfPrintBackground": True,
    "pdfFitOnePage": False,
    "pdfMargin": "none",
    "maxConcurrency": 1,
    "maxRetries": 0,
    "navigationTimeoutSecs": 60,
    "maxPageHeight": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/full-page-website-screenshot-and-pdf-capture").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://www.apify.com/"
    }
  ],
  "format": "png",
  "quality": 85,
  "fullPage": true,
  "device": "custom",
  "viewportWidth": 1280,
  "viewportHeight": 1080,
  "deviceScaleFactor": 1,
  "colorScheme": "no-preference",
  "locale": "en-US",
  "waitUntil": "domcontentloaded",
  "waitForImages": false,
  "waitForFonts": true,
  "delay": 0,
  "scrollToBottom": false,
  "maxScrollSteps": 400,
  "scrollStepPx": 250,
  "delayAfterScrolling": 0,
  "waitUntilNetworkIdleAfterScroll": false,
  "waitUntilNetworkIdleAfterScrollTimeout": 1000,
  "hideFixedElements": false,
  "cookieBannerAction": "hide",
  "pdfPageSize": "web",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfFitOnePage": false,
  "pdfMargin": "none",
  "maxConcurrency": 1,
  "maxRetries": 0,
  "navigationTimeoutSecs": 60,
  "maxPageHeight": 0
}' |
apify call nimbryxo-studio/full-page-website-screenshot-and-pdf-capture --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/full-page-website-screenshot-and-pdf-capture"
        }
    }
}
```

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/oG0Mque4wwAd1e4EK/builds/ugu5kWKeaoli71PqF/openapi.json
