# Website Screenshot & PDF API: PNG, JPEG, WebP + Page Text (`rod_analytics/website-screenshot-api`) Actor

Website screenshot and URL to PDF API for AI agents and developers. Capture full-page PNG, JPEG or WebP screenshots and A4 PDFs of any web page with viewport presets, cookie banner hiding, title, meta description and visible text. Blocked pages are free.

- **URL**: https://apify.com/rod_analytics/website-screenshot-api.md
- **Developed by:** [Rod Services](https://apify.com/rod_analytics) (community)
- **Categories:** AI, Agents, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 screenshots captured

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

**Website screenshot and PDF API for AI agents and developers: full-page PNG, JPEG or WebP plus page title, meta description and visible text.**
Each URL returns a signed image URL (and optional A4 PDF URL) in the Apify key-value store alongside page metadata. $4 per 1,000 screenshots ($3 on Gold); blocked pages are free.

### What you get

- **Full-page or viewport screenshots** in PNG, JPEG or WebP (`format`, `quality`, `fullPage`).
- **Viewport presets**: `desktop` (1440x900), `laptop` (1280x800), `tablet` (768x1024) and `mobile` (390x844).
- **Optional A4 PDF export** (`includePdf: true`), or PDF-only (`includeScreenshot: false, includePdf: true`).
- **Cookie banner hiding** (`hideCookieBanners: true` by default) via clean CSS rules.
- **Agent-ready metadata in the same row**: `title`, `metaDescription`, `visibleText`, `finalUrl`, `httpStatus`, `status`.

### Quick start

1. Paste one or more URLs in **Website URLs** (`urls`).
2. Choose **Image format** (`png`, `jpeg`, `webp`) and **Viewport preset**.
3. Click **Start**. Images and PDFs appear as clickable links in the **Captured screenshots** table.

From code:

```bash
curl -X POST "https://api.apify.com/v2/acts/rod_analytics~website-screenshot-api/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"urls": ["https://apify.com", "https://example.com"], "format": "webp", "viewport": "desktop"}'
```

### Input example

```json
{
  "urls": ["https://apify.com", "https://example.com"],
  "format": "png",
  "fullPage": true,
  "viewport": "desktop",
  "includeScreenshot": true,
  "includePdf": false,
  "waitMs": 1000,
  "hideCookieBanners": true
}
```

### Output sample

```json
{
  "inputUrl": "https://example.com",
  "finalUrl": "https://example.com/",
  "httpStatus": 200,
  "status": "ok",
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/shot-001-a1b2c3d4.png",
  "imageKey": "shot-001-a1b2c3d4.png",
  "title": "Example Domain",
  "metaDescription": null,
  "visibleText": "Example Domain This domain is for use in illustrative examples...",
  "viewport": "desktop",
  "format": "png",
  "error": null,
  "capturedAt": "2026-11-26T10:00:00.000Z"
}
```

### Pricing

Pay per event. Blocked, unreachable and invalid URLs are free.

| Event | Free | Bronze | Silver | Gold+ |
|---|---:|---:|---:|---:|
| Screenshot captured | $0.004 | $0.0036 | $0.0032 | $0.003 |
| A4 PDF generated | $0.006 | $0.0054 | $0.0048 | $0.0045 |
| Run start (per GB, min 1) | $0.001 | $0.001 | $0.001 | $0.001 |

### FAQ

**What happens when a site shows a Cloudflare or bot wall?** It returns `status: "blocked"` and is not charged.

**Can I capture PDF only without paying for a screenshot?** Yes. Set `includeScreenshot: false` and `includePdf: true`.

### Feedback and reviews

Found a bug or missing a feature? Open an issue in the **Issues** tab. If the Actor saved you time, a short review on the Store page helps other people find it.

### Related Actors

| Actor | What it does |
|---|---|
| [PageSpeed Insights & Lighthouse Bulk Checker, No API Key](https://apify.com/rod_analytics/lighthouse-audit) | Core Web Vitals and Lighthouse scores for many URLs |
| [Website to Markdown Crawler: Clean Text for LLM & RAG](https://apify.com/rod_analytics/website-to-markdown) | Crawl sites and convert pages to Markdown |
| [PDF to Text & Markdown Extractor with OCR, Tables & RAG](https://apify.com/rod_analytics/doc-to-markdown) | Extract text and Markdown from PDFs and scans |
| [Image OCR API: Image to Text, Lines & Bounding Boxes](https://apify.com/rod_analytics/image-ocr-api) | Extract text, confidence and bounding boxes from images |
| [Bulk LLM Runner: AI Prompt for Every Row, JSON Output, No Key](https://apify.com/rod_analytics/bulk-llm-runner) | Run one LLM prompt per dataset or JSON row with structured output |

# Changelog

This Actor's version history is a separate document: https://apify.com/rod_analytics/website-screenshot-api/changelog.md

# Actor input Schema

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

List of public http(s) URLs to capture.

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

Screenshot image format: PNG, JPEG or WebP.

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

Compression quality from 1 to 100 for JPEG and WebP.

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

Capture the full scrollable page height rather than only the initial viewport.

## `viewport` (type: `string`):

Screen size preset.

## `includeScreenshot` (type: `boolean`):

Capture and store the screenshot image ($0.004). Disable to output PDF only.

## `includePdf` (type: `boolean`):

Render and store an A4 PDF of the page ($0.006 per PDF).

## `waitMs` (type: `integer`):

Milliseconds to wait after page load for animations or lazy content.

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

Inject CSS to hide common cookie consent banners before capture.

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

How many pages to render in parallel inside Chromium. Keep at 2 on 2 GB runs.

## `timeoutSecs` (type: `integer`):

Timeout per page load in seconds.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "format": "png",
  "quality": 85,
  "fullPage": true,
  "viewport": "desktop",
  "includeScreenshot": true,
  "includePdf": false,
  "waitMs": 500,
  "hideCookieBanners": true,
  "maxConcurrency": 2,
  "timeoutSecs": 25
}
```

# Actor output Schema

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

No description

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

No description

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

No description

## `summary` (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",
        "https://www.wikipedia.org"
    ]
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rod_analytics/website-screenshot-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/U1G4bcg9kNFckcmSb/builds/8m4GYjY7pFa31SZDT/openapi.json
