# Website Screenshot & PDF API - Bulk URL to PNG, JPEG or PDF (`bluemoonstone/website-screenshot-pdf`) Actor

Returns a screenshot (PNG/JPEG) or PDF of each URL with a direct download link, page title, final URL and HTTP status. Full page or viewport, desktop/tablet/mobile, element capture, hide cookie banners by CSS selector. Pay only per successful capture.

- **URL**: https://apify.com/bluemoonstone/website-screenshot-pdf.md
- **Developed by:** [Blue Moon](https://apify.com/bluemoonstone) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 captures

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

## Website Screenshot & PDF API

Turn any list of URLs into **PNG, JPEG or PDF** files in one run. Every result row has a **direct download link** (`fileUrl`), the page title, final URL after redirects and HTTP status, so it plugs straight into spreadsheets, Zapier/Make, n8n or AI agents.

### What you get per URL

| Field | Example |
|---|---|
| `url` / `finalUrl` | `https://example.com/` |
| `statusCode` | `200` |
| `title` | `Example Domain` |
| `format` | `png`, `jpeg` or `pdf` |
| `fileUrl` | direct link to the file |
| `fileKey`, `bytes`, `device`, `fullPage`, `capturedAt` | file details |
| `error` | why a URL failed (failed URLs are not charged) |

### Features

- **Full page or viewport** screenshots, or capture **one element** with a CSS selector (e.g. `#pricing`).
- **Desktop, tablet or mobile** (mobile user agent and 390x844 viewport), custom desktop width/height.
- **PDF export** with A4/Letter/Legal/A3 and backgrounds.
- **Hide cookie banners, chat widgets or popups** by CSS selector before capturing.
- Wait for `load`, `domcontentloaded` or `networkidle`, plus an extra delay for animations.
- Bulk: up to 20 pages in parallel.

### Pricing

**$3 per 1,000 captures** ($0.003 each). You pay only for successful captures; failed or skipped URLs are free. Set a maximum cost per run in Apify and the Actor stops there.

### Example input

```json
{
  "urls": ["https://apify.com", "example.com"],
  "format": "png",
  "fullPage": true,
  "device": "desktop",
  "hideSelectors": ["#onetrust-banner-sdk"]
}
```

### Use cases

Visual QA and regression checks of your own sites, client reports, archiving your landing pages, design reviews, website thumbnails for directories you run, and giving AI agents a picture of a page.

### Notes

- Files are saved in the run's key-value store. Download them or copy them elsewhere; Apify deletes unnamed storages after its data-retention period.
- The Actor obeys each site's robots.txt (disallowed URLs are returned with `error: "skipped_robots_txt"` and are not charged). It does not log in, solve CAPTCHAs or bypass access controls.

### How to use it

1. Click **Try for free** (an Apify account is free).
2. Fill in the input, or paste the JSON example below.
3. Click **Start** and wait for the run to finish.
4. Download the results as JSON, CSV, Excel or HTML, or get them by API, webhook or an integration (Google Sheets, Zapier, Make, n8n, Slack).

### Run it by API

Run the Actor and get the results in one call:

```bash
curl -X POST 'https://api.apify.com/v2/acts/bluemoonstone~website-screenshot-pdf/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"urls": ["https://apify.com"], "format": "png", "fullPage": true, "device": "desktop"}'
```

Or use the official [JavaScript](https://docs.apify.com/api/client/js/) and [Python](https://docs.apify.com/api/client/python/) clients.

### Use it from AI agents (MCP)

This Actor works as a tool for Claude, ChatGPT, Cursor, VS Code and other MCP clients through the [Apify MCP server](https://mcp.apify.com/). Add this server URL to your client:

```
https://mcp.apify.com?tools=bluemoonstone/website-screenshot-pdf
```

Then ask, for example: *"Take full-page screenshots of these 10 landing pages on mobile and give me the image links."*

It also works with LangChain, LlamaIndex, CrewAI and the OpenAI Agents SDK through the Apify integrations.

### FAQ

**Which formats are supported?**

PNG, JPEG and PDF (A4, Letter and more), full page or viewport, desktop or mobile, or a single element by CSS selector.

**Can I hide cookie banners or popups?**

Yes. Pass CSS selectors in `hideSelectors`.

**Do failed URLs cost money?**

No. You pay only for successful captures.

**Something not working, or need a feature?**

Open an issue in the **Issues** tab. Feature requests are welcome and shape what gets built next.

### Related tools by the same developer

- [Greenhouse, Lever & Ashby Jobs Scraper - Company Careers](https://apify.com/bluemoonstone/ats-jobs-scraper)
- [Website Technology Detector - Tech Stack Lookup in Bulk](https://apify.com/bluemoonstone/tech-stack-detector)
- [Sitemap URL Extractor - All Pages of Any Website](https://apify.com/bluemoonstone/sitemap-url-extractor)
- [Broken Link Checker - Find 404s & Dead Links on Any Site](https://apify.com/bluemoonstone/broken-link-checker)
- [SEO Audit Tool - Bulk On-Page SEO Checker for Any URL](https://apify.com/bluemoonstone/seo-page-audit)
- [PDF Text Extractor - Bulk PDF URLs to Text, Pages & Metadata](https://apify.com/bluemoonstone/pdf-text-extractor)

### Responsible use

- Capture only pages you have the right to access, and follow each site's terms of service and all applicable laws (copyright, privacy and data-protection laws such as GDPR).
- Screenshots may contain copyrighted material; use them for your own review, testing or reporting, not to republish other people's content.
- Do not use it to collect personal data.
- Not affiliated with, endorsed by or sponsored by any website or brand.

### Compliance

2026-11-29: checked against the project compliance checklist. User-directed tool (user supplies the URLs), obeys robots.txt, no login or access-control bypass, outputs no personal data. Decision: publish.

# Actor input Schema

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

Pages to capture. One screenshot or PDF is made per URL.

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

File type of each capture.

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

Capture the whole scrollable page instead of only the visible viewport (images only; PDFs always contain the full page).

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

Desktop uses the width/height below. Tablet = 768x1024, mobile = 390x844 with a mobile user agent.

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

Browser window width for the desktop device.

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

Browser window height for the desktop device.

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

When the page counts as loaded. 'networkidle' is best for heavy JavaScript pages but slower.

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

Wait this long after loading before capturing (lets animations and lazy content finish).

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

CSS selector of one element to capture instead of the page, e.g. '#pricing'. Images only.

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

Elements to hide before capture, e.g. cookie banners or chat widgets: '#onetrust-banner-sdk', '.intercom-lightweight-app'.

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

Quality for JPEG output (1-100).

## `pdfPaperFormat` (type: `string`):

Paper size for PDF output.

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

How many pages are captured at the same time.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "format": "png",
  "fullPage": false,
  "device": "desktop",
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "waitUntil": "load",
  "delayMs": 500,
  "jpegQuality": 80,
  "pdfPaperFormat": "A4",
  "maxConcurrency": 5
}
```

# Actor output Schema

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

Dataset items.

# 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("bluemoonstone/website-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://apify.com"] }

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

```

## MCP server setup

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