# Pageframe – Website Screenshot & PDF Generator (`siftwright/pageframe-screenshots`) Actor

Turn any URL into a crisp PNG/JPEG screenshot or a print-ready PDF. Full-page capture, custom viewports, retina scaling, cookie-banner auto-dismiss. Pay only for pages that actually capture.

- **URL**: https://apify.com/siftwright/pageframe-screenshots.md
- **Developed by:** [Siftwright](https://apify.com/siftwright) (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 $1.50 / 1,000 page captureds

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

## Pageframe – Website Screenshot & PDF Generator

Turn any URL into a **crisp screenshot (PNG/JPEG)** or a **print-ready PDF** in one call. Full-page capture, custom viewports, retina/HiDPI scaling, and best-effort **automatic cookie-banner dismissal** so your images aren't covered by consent popups.

**Price: $0.0015 per successful capture.** Failed pages (timeouts, 4xx/5xx, DNS errors) are never charged.

![Real full-page capture of apify.com](https://api.apify.com/v2/key-value-stores/keflfV3XIGtBOdrGw/records/pageframe-fullpage.png)
![Cookie banner before/after on bbc.com/news](https://api.apify.com/v2/key-value-stores/keflfV3XIGtBOdrGw/records/pageframe-cookiebanner.png)
![Real dataset output](https://api.apify.com/v2/key-value-stores/keflfV3XIGtBOdrGw/records/pageframe-output.png)

### Why choose Pageframe

| | Pageframe |
|---|---|
| 💵 **Price** | **$1.50 per 1,000 captures**, no monthly rental |
| 🛡️ **Pay only for success** | Timeouts, DNS errors and 4xx/5xx pages cost **$0** |
| 🍪 **Clean shots** | Cookie & consent banners dismissed automatically before capture |
| 📄 **Screenshots *and* PDFs** | PNG, JPEG or print-ready PDF (A4, A3, Letter, Legal) |
| 🔍 **Retina quality** | 2x / 3x device scale for crisp images on any screen |
| ⚙️ **Real browser** | Chromium renders React, Vue & Next.js pages correctly |
| 🤖 **AI-agent ready** | Callable from Claude, ChatGPT & Cursor through Apify's MCP server |

### What you can use it for

- 🖼️ **Visual monitoring** – track how competitor or client pages look over time.
- 📄 **PDF generation** – invoices, reports, articles or landing pages as clean PDFs.
- 🔗 **Link previews & thumbnails** – generate real preview images for a directory or dashboard.
- 🧪 **QA & regression testing** – capture pages before/after a deploy.
- 📚 **Archiving** – keep a visual record of a page as it existed on a given date.

### Features

- ✅ **PNG, JPEG or PDF** output, chosen per run
- ✅ **Full-page** or viewport-only capture
- ✅ Custom **viewport size** and **device scale factor** (2x/3x for retina)
- ✅ **PDF page size** control (A4, A3, Letter, Legal)
- ✅ Best-effort **cookie-banner auto-dismiss** (OneTrust, Cookiebot, common "Accept all" buttons)
- ✅ Optional **wait-for-selector** and **extra delay** for slow/animated pages
- ✅ Failed captures are **never charged**
- ✅ Runs on a real Chromium browser (Playwright) — renders JS-heavy pages correctly

### How to use

1. Click **Try for free**.
2. Paste one or more URLs into **URLs to capture**.
3. Pick a **format** (png / jpeg / pdf) and adjust viewport / scale if you want retina output.
4. Click **Start** and open the **Output** tab — each row links directly to the image or PDF file.

### Input example

```json
{
  "urls": ["https://apify.com", "https://en.wikipedia.org/wiki/Web_scraping"],
  "format": "png",
  "fullPage": true,
  "deviceScaleFactor": 2,
  "blockCookieBanners": true
}
```

| Field | Description |
|---|---|
| `urls` | One or more page URLs to capture |
| `format` | `png`, `jpeg` or `pdf` |
| `fullPage` | Capture the whole scrollable page (image formats only) |
| `viewportWidth` / `viewportHeight` | Browser viewport size in pixels |
| `deviceScaleFactor` | 1 (default), 2 or 3 for retina/HiDPI |
| `pdfPageFormat` | `A4`, `A3`, `Letter` or `Legal` (PDF only) |
| `blockCookieBanners` | Best-effort auto-click common cookie "Accept" buttons first |
| `waitForSelector` | CSS selector to wait for before capturing |
| `delaySec` | Extra fixed wait (seconds) before capturing |

### Output example

```json
{
  "url": "https://apify.com",
  "status": "ok",
  "format": "png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/.../records/capture-....png",
  "sizeBytes": 812345,
  "durationMs": 2140
}
```

Failed pages are returned with `"status": "error"` and an `error` message, and are never charged.

### Pricing

Pay-per-event: **$0.0015 per successfully captured page** (image or PDF). No monthly rental, no charge for failed pages. Apify's free plan gives you monthly credits so you can try it for free.

### Quick start in Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("siftwright/pageframe-screenshots").call(run_input={
    "urls": ["https://apify.com"],
    "format": "png",
    "fullPage": True,
    "deviceScaleFactor": 2,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item["status"], item.get("fileUrl"))
```

### Use it via API

```bash
curl -X POST "https://api.apify.com/v2/acts/siftwright~pageframe-screenshots/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://apify.com"],"format":"png"}'
```

Works with Python and JavaScript API clients, Make, Zapier and n8n. **AI agents** (Claude, ChatGPT, Cursor) can call it directly through [Apify's MCP server](https://mcp.apify.com).

### FAQ

**Does it work on JavaScript-heavy sites?** Yes — it renders with a real Chromium browser (Playwright), so React/Vue/Next.js pages capture correctly, not just static HTML.

**Can I get a transparent background or a specific element only?** Not in v1 — this version captures the full page or viewport. Element-only capture and transparent backgrounds are on the roadmap.

**Why wasn't I charged for a page?** Timeouts, DNS failures and HTTP 4xx/5xx responses are never charged — you only pay for a page that actually rendered and was captured.

**Something broke or you need a feature?** Open an issue on the **Issues** tab — we respond fast.

# Actor input Schema

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

One or more web page URLs to screenshot or convert to PDF.

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

png/jpeg produce an image, pdf produces a print-ready document.

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

Capture the entire scrollable page instead of just the viewport.

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

Browser viewport width in pixels before capture.

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

Browser viewport height in pixels before capture.

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

Use 2 or 3 for crisp retina/HiDPI captures.

## `pdfPageFormat` (type: `string`):

Paper size used when format is pdf.

## `blockCookieBanners` (type: `boolean`):

Best-effort click on common cookie/consent "Accept" buttons before capturing, so banners don't cover your screenshot.

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

Wait for this element to appear before capturing, useful for pages that render content late.

## `delaySec` (type: `integer`):

Fixed wait after the page loads (and after the selector/banner steps), for animations or lazy content.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "format": "png",
  "fullPage": true,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "deviceScaleFactor": 1,
  "pdfPageFormat": "A4",
  "blockCookieBanners": true,
  "delaySec": 0
}
```

# Actor output Schema

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

One row per URL with status, format, file link, size and timing.

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

Captured files stored in the run's key-value store.

# 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("siftwright/pageframe-screenshots").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("siftwright/pageframe-screenshots").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 siftwright/pageframe-screenshots --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,siftwright/pageframe-screenshots"
        }
    }
}
```

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/xpR4FnqHlgr31WIap/builds/gYhfxrgXqHYbIHKoX/openapi.json
