# Website Screenshot API & URL to PDF: Full Page, Mobile, Dark (`latamdatatools/screenshot-pdf-api`) Actor

Turn URLs into full-page or viewport screenshots (PNG/JPEG) and PDFs (A4, Letter, Legal) with desktop, iPhone, Pixel and iPad presets, dark mode, cookie banners hidden and lazy images loaded. Bulk lists, CSV or dataset input; files with direct links.

- **URL**: https://apify.com/latamdatatools/screenshot-pdf-api.md
- **Developed by:** [Julian Genuario](https://apify.com/latamdatatools) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 93.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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 API & URL to PDF: Full Page, Mobile, Dark

Turn a list of URLs into **full-page or viewport screenshots** (PNG or JPEG) and **PDFs** (A4, Letter, Legal, A3, Tabloid) with a real Chrome browser. Pick a **device** (desktop, Full HD, Retina, iPhone, Pixel, iPad or custom size), switch on **dark mode**, and get clean captures with **cookie banners hidden** and **lazy-loaded images** loaded.

Every file gets a **direct download link** in the results table, ready for Zapier, Make, n8n, Google Sheets or your own code.

### What does Website Screenshot API do?

Website Screenshot API turns a list of URLs into full-page or viewport screenshots (PNG / JPEG) and PDFs (A4, Letter, Legal) with desktop, iPhone, Pixel and iPad presets, dark mode, cookie banners hidden and lazy-loaded images loaded. Each file comes with a direct link.

### How to use Website Screenshot API

1. Click **Try for free** on this page (a free Apify account is enough to start).
2. Fill in the input (see the examples below) or keep the prefilled example.
3. Click **Start** and wait for the run to finish.
4. Download the results from the **Output** tab as JSON, CSV, Excel or HTML, or read them with the Apify API.
5. Optional: create a **Schedule** to run it daily or weekly, and connect a webhook or an integration (Make, Zapier, n8n, Slack).

### Use cases

- **Website archiving and compliance**: dated PDFs and screenshots of pages, terms, ads or prices.
- **Client reports and audits**: before/after captures of landing pages on desktop and mobile.
- **Visual monitoring**: schedule daily captures of competitor home pages or your own releases.
- **Thumbnails and previews** for directories, link-in-bio tools, dashboards and CMSs.
- **Dark mode QA**: see how a site renders with `prefers-color-scheme: dark`.

### Features

- Full page (scrolls first so lazy images load; the viewport is stretched to the page height so scroll-reveal sections render) or first screen only.
- PNG or JPEG with quality setting; maximum height cap for endless pages (`truncated: true` when cut).
- PDF with paper size, landscape, backgrounds, and "look like the screen" (ignores print stylesheets).
- Device presets with real mobile viewports, pixel density and touch.
- **Cookie banners hidden with CSS** (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, TrustArc, Osano, Complianz, CookieYes, iubenda and generic cookie bars). Nothing is accepted or rejected on your behalf. Add your own selectors to hide chat widgets or popups.
- Wait options: load / DOM ready / network idle, extra delay, wait for a CSS selector.
- Bulk input: list, Apify dataset or CSV / Google Sheets.

### Fair use

- The robots.txt of each site is checked for the requested and the final URL; disallowed pages are skipped and not charged.
- No proxies, no stealth plugins, no captcha solving. If a site answers with a bot check, HTTP 401/403/429 or an error page, the row says `blocked` / `http-error` and **no file is stored or charged**.

### Input example

```json
{
  "urls": ["https://apify.com", "https://crawlee.dev"],
  "device": "iphone-15",
  "fullPage": true,
  "imageFormat": "jpeg",
  "jpegQuality": 80,
  "pdf": true,
  "pdfFormat": "A4",
  "darkMode": false,
  "hideCookieBanners": true,
  "hideSelectors": ["#intercom-container"]
}
```

### Output

Files are saved in the run's key-value store. One row per URL:

```json
{
  "url": "https://crawlee.dev/",
  "finalUrl": "https://crawlee.dev/",
  "status": "ok",
  "httpStatus": 200,
  "title": "Crawlee · Build reliable crawlers. Fast.",
  "error": null,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/cu81oAmXlyB0X4gEF/records/0001_crawlee.dev_bd74ed90.png",
  "screenshotKey": "0001_crawlee.dev_bd74ed90.png",
  "screenshotBytes": 81377,
  "width": 1366,
  "height": 2874,
  "truncated": false,
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/cu81oAmXlyB0X4gEF/records/0001_crawlee.dev_bd74ed90.pdf",
  "pdfKey": "0001_crawlee.dev_bd74ed90.pdf",
  "pdfBytes": 117467,
  "device": "desktop-1366",
  "darkMode": false,
  "loadTimeMs": 6952,
  "capturedAt": "2026-10-26T22:35:00.000Z"
}
```

`status` is `ok`, `blocked`, `http-error`, `robots-disallowed` or `error` (DNS, timeout...). Files stay in the run storage for your plan's data-retention period; copy them elsewhere if you need them longer.

### Pricing

Pay per event:

- **USD 0.005 per run** (start, covers launching the browser).
- **USD 2 per 1,000 screenshots** (USD 0.002 each).
- **USD 3 per 1,000 PDFs** (USD 0.003 each).

Failed, blocked, robots-disallowed and error pages are **not charged**. The Actor stops at your "max charge per run".

### Tips

- Default memory is 1 GB (2 pages in parallel). For long lists, raise memory to 2-4 GB and "Pages in parallel" to 4-6.
- Very heavy pages (news sites with many ads) are slower; use JPEG and viewport-only captures when you only need a thumbnail.
- Sites behind logins, paywalls or aggressive bot protection cannot be captured.

### Cost examples

Prices at the current pay-per-event rate: USD 0.005 per run, USD 2.00 per 1,000 screenshots and USD 3.00 per 1,000 PDFs (failed, blocked and robots.txt-disallowed pages are free). You can set a maximum charge per run in the run options.

| Job | Approximate cost |
|---|---|
| Test run: 1 full-page screenshot of apify.com (measured: 27 s) | about $0.007 |
| 100 homepage thumbnails (viewport only) | about $0.21 |
| 1,000 pages as screenshot + PDF | about $5.01 |
| Daily visual archive of 20 pages | about $0.045 per run |

### Use it from your code, an integration or an AI agent

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

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("latamdatatools/screenshot-pdf-api").call(run_input={
  "urls": [
    "https://apify.com",
    "https://crawlee.dev"
  ],
  "fullPage": True,
  "imageFormat": "png",
  "pdf": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item["screenshotUrl"], item["pdfUrl"])
```

**JavaScript / Node.js** (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('latamdatatools/screenshot-pdf-api').call({
  urls: [
    'https://apify.com',
    'https://crawlee.dev'
  ],
  fullPage: true,
  imageFormat: 'png',
  pdf: true
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.url, i.screenshotUrl, i.pdfUrl]));
```

**No code:**

- **Schedules:** save your input as a Task and run it daily or weekly from Apify Console (Schedules).
- **Integrations:** send the results to Google Sheets, Slack, email, Make, Zapier, n8n or Airbyte from the Integrations tab, or call your own webhook when a run finishes.
- **AI agents:** add it as a tool in Claude, Cursor, VS Code and other MCP clients through the Apify MCP server (`https://mcp.apify.com`), so the agent can capture a page or save it as PDF on demand.

### FAQ

**Can I call it from my own code or from an AI agent?** Yes. Start runs and fetch results with the Apify API or the JavaScript / Python clients, or use it as a tool from Claude, Cursor and other MCP clients through the Apify MCP server (`mcp.apify.com`).

**Can I run it automatically?** Yes. Create a Schedule in Apify Console (for example every morning) and add a webhook or an integration to get the results where you need them.

**Which export formats are available?** JSON, JSONL, CSV, Excel (XLSX), XML, RSS and HTML table, from the Output tab or the API.

**What does it cost?** See the Pricing section above. You only pay for the events listed there.

### Changelog

- 0.1 (2026-10): first version.

# Actor input Schema

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

Pages to capture, one per line.

## `datasetId` (type: `string`):

ID of an Apify dataset; the URL is read from "URL field".

## `csvUrl` (type: `string`):

Public CSV with a header row, or a Google Sheets link shared as "Anyone with the link".

## `urlField` (type: `string`):

Field or column with the URL in the dataset or CSV.

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

Save an image of each page.

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

Capture the whole scrollable page (up to "Max height"). Off = only the first screen (viewport).

## `imageFormat` (type: `string`):

PNG is lossless; JPEG files are much smaller.

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

10-100. Only for JPEG.

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

Full-page screenshots taller than this are cut (row marked "truncated").

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

Save a PDF of each page.

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

PDF paper size.

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

Landscape orientation.

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

Include background colours and images.

## `pdfScreenMedia` (type: `boolean`):

Use the screen styles instead of the site's print stylesheet.

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

Viewport size, pixel density and mobile user agent.

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

Only with device "Custom".

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

Only with device "Custom".

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

Ask the site for its dark theme (prefers-color-scheme: dark). Sites without a dark theme look the same.

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

Hide common consent popups (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast and generic cookie bars) with CSS. Nothing is accepted or rejected for you.

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

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

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

When the page counts as loaded before the extra delay.

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

Wait after loading, for animations and late content.

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

CSS selector that must appear before capturing (max 15 s).

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

Scroll through the page before a full-page screenshot so lazy-loaded images appear.

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

Slow pages are captured with what loaded so far.

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

2 fits in 1 GB of memory; raise memory to go faster.

## `maxUrls` (type: `integer`):

Unique URLs captured per run.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "urlField": "url",
  "screenshot": true,
  "fullPage": true,
  "imageFormat": "png",
  "jpegQuality": 80,
  "maxHeight": 15000,
  "pdf": false,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfScreenMedia": true,
  "device": "desktop-1366",
  "darkMode": false,
  "hideCookieBanners": true,
  "waitUntil": "load",
  "delayMs": 1000,
  "scrollToBottom": true,
  "navigationTimeoutSecs": 30,
  "maxConcurrency": 2,
  "maxUrls": 500
}
```

# Actor output Schema

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

No description

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

No description

## `runSummary` (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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("latamdatatools/screenshot-pdf-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"] }

# Run the Actor and wait for it to finish
run = client.actor("latamdatatools/screenshot-pdf-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"
  ]
}' |
apify call latamdatatools/screenshot-pdf-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,latamdatatools/screenshot-pdf-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/3vIytVgkgWLEBiBBR/builds/JfpwXPD3BWkBsOWAm/openapi.json
