# Website Screenshot & PDF API - Full Page, Mobile (`librevlad/page-screenshot-pdf`) Actor

Capture full-page or viewport screenshots (PNG/JPEG) and PDFs of any URL, desktop or mobile. Hides cookie banners, respects robots.txt. $1.50 per 1,000, pay only for successful captures.

- **URL**: https://apify.com/librevlad/page-screenshot-pdf.md
- **Developed by:** [Владислав Новік](https://apify.com/librevlad) (community)
- **Categories:** Developer tools, Automation, SEO tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 screenshot or pdfs

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/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

## Page Screenshot & PDF

**Pricing:** $1.50 per 1,000 screenshots or PDFs. Failed captures are free.

Take PNG, JPEG or PDF snapshots of any list of web pages, as a desktop or a mobile phone. One flat price, no surprise compute bills, and you pay only for the snapshots that succeed.

### What it does and who it is for

Give it a list of URLs and it returns a file for each one, stored in the run's key-value store, plus a dataset row with a public link. Useful for:

- QA and visual regression checks (desktop and phone side by side)
- Archiving pages and proof-of-publication records
- Reports, link previews and thumbnails
- Turning pages into PDFs for documents and attachments

Features: full-page capture, mobile viewport (390x844), PDF, waiting for a specific element, hiding cookie banners, batches of URLs, robots.txt respected by default.

### Input

| Field | Default | Description |
|---|---|---|
| `urls` | required | Array of page URLs (`https://` assumed if missing) |
| `device` | `desktop` | `desktop` (1366x768) or `mobile` (390x844, mobile viewport) |
| `fullPage` | `true` | Capture the whole scrollable page (PNG/JPEG) |
| `format` | `png` | `png`, `jpeg` or `pdf` |
| `waitUntil` | `load` | `load` or `networkidle` |
| `waitForSelector` | none | CSS selector to wait for before capturing |
| `delayMs` | `0` | Extra wait, 0-10000 ms |
| `hideCookieBanners` | `true` | Hide typical consent banners with CSS (nothing is clicked) |
| `respectRobotsTxt` | `true` | Skip URLs disallowed by robots.txt (`status: skipped`) |
| `maxConcurrency` | `3` | Parallel pages, 1-10 |

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

### Output

Each snapshot is saved in the default key-value store under a key derived from a hash of the address, for example `shot-3f9c1a....png`. The dataset gets one row per URL:

```json
{
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "status": "ok",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/shot-3f9c1a0b22d4e5f67890.png",
  "format": "png",
  "width": 390,
  "height": 1520,
  "bytes": 84213,
  "takenAt": "2026-11-27T10:15:00+00:00",
  "error": null
}
```

`status` is `ok`, `error` or `skipped`. For PDFs, `width` and `height` are `null`.

### Pricing

**$1.50 per 1,000 screenshots, pay only for successful ones.** One `screenshot` event is charged per successful snapshot (PNG, JPEG or PDF). Errors and skipped URLs are free. The price already includes platform usage. If your maximum spend per run is reached, the Actor stops taking new URLs.

### Limitations

- Captures what the page shows to an anonymous visitor. No logins, no cookies or custom headers.
- Does not solve CAPTCHAs and does not hide that it is an automated browser: it uses the default browser User-Agent with no stealth or fingerprint tricks. Pages that block automated browsers will return an error or the block page.
- Cookie banners are hidden with CSS only; unusual banners may still appear.
- Local and private network addresses are rejected.
- Very long pages and pages that never finish loading can time out (45 s navigation limit).
- Lazy-loaded content below the fold may need `networkidle` or a `delayMs`.
- You are responsible for how you use the captures. Use responsibly and check the site's terms for your use case.

### FAQ

**Why was my URL skipped?** Its robots.txt disallows it. Set `respectRobotsTxt` to `false` only for sites you own or have permission to capture.

**Can I get the file without opening the Console?** Yes, use `fileUrl` from the dataset. Records in a run's store are accessible with the link and your API token or the store's public URL settings.

**Does it click "Accept cookies"?** No. It only hides banners with CSS.

**Am I charged for failed pages?** No.

**Which formats?** PNG, JPEG and PDF (A4, backgrounds printed).

**Can I capture a phone view?** Yes, `device: "mobile"`.

### More actors from the same developer

Pay only for results, no logins:

- [Website Crawler to Markdown](https://apify.com/librevlad/website-crawler-markdown) — crawl a website or docs section into clean Markdown for RAG and LLMs.
- [Website to Markdown](https://apify.com/librevlad/website-to-markdown) — turn a list of pages and PDFs into clean Markdown or text.
- [YouTube Transcript Scraper](https://apify.com/librevlad/youtube-transcripts-fast) — transcripts as plain text, timestamped segments or SRT.
- [YouTube Search & Channel Videos](https://apify.com/librevlad/youtube-search-channel-videos) — search results and every video of a channel.
- [YouTube Shorts Scraper](https://apify.com/librevlad/youtube-shorts-scraper-fast) — Shorts from keyword search and from channels' Shorts tab.
- [App Store Scraper](https://apify.com/librevlad/app-store-scraper) — app details, keyword search positions and reviews from Apple's public API.
- [Google Trends Scraper](https://apify.com/librevlad/google-trends-scraper-fast-cheap) — interest over time, interest by region and related queries.
- [Threads Scraper](https://apify.com/librevlad/threads-scraper) — public Threads posts and profiles without login.

# Actor input Schema

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

Pages to capture. https:// is assumed if the scheme is missing.

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

desktop = 1366x768 viewport, mobile = 390x844 mobile viewport.

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

Capture the whole scrollable page, not just the first screen (PNG/JPEG).

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

PNG or JPEG image, or a PDF of the page.

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

load = page load event; networkidle = no network traffic for 500 ms.

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

Optional CSS selector that must appear before the capture.

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

Extra wait before the capture, 0-10000.

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

Injects CSS that hides typical consent banners. Nothing is clicked.

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

Skip URLs disallowed by the site's robots.txt (status: skipped).

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

Pages captured in parallel, 1-10.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "device": "desktop",
  "fullPage": true,
  "format": "png",
  "waitUntil": "load",
  "delayMs": 0,
  "hideCookieBanners": true,
  "respectRobotsTxt": true,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("librevlad/page-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": ["https://example.com"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,librevlad/page-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/D0ZX1AvLkwOSHdXjI/builds/9Jr347NBLDRvTCxox/openapi.json
