# Website Screenshot & URL to PDF: Full Page, HTML to PDF (`manageable_gully/url-to-pdf-screenshot`) Actor

Take full-page website screenshots (PNG, JPEG, WebP) and convert URLs or your own HTML to PDF in headless Chrome: desktop, tablet or mobile, A4/Letter, cookie banners hidden. Files stored with shareable links. $2 per 1,000 screenshots.

- **URL**: https://apify.com/manageable_gully/url-to-pdf-screenshot.md
- **Developed by:** [WebIntel Tools](https://apify.com/manageable_gully) (community)
- **Categories:** Developer tools, Automation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% 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 & URL to PDF: Full-Page Screenshots and HTML to PDF in Headless Chrome

Render **web pages or your own HTML** in real headless Chrome and get:

- **Screenshots:** full page or viewport, PNG, JPEG or WebP, on desktop, laptop, tablet or mobile (retina) viewports.
- **PDFs:** A4, Letter, Legal and more, with portrait or landscape, margins and backgrounds.

Each file is stored in the run's key-value store with a **shareable link** in the results table.

### What you can use it for

- **HTML to PDF for invoices, reports and certificates:** send your own HTML and get print-ready PDFs back through the API.
- **Visual monitoring and archiving:** capture competitor pages, landing pages or legal pages on a schedule.
- **Social and SEO previews:** mobile and desktop screenshots for audits and reports.
- **QA:** check how pages look on mobile vs. desktop after a deploy.

### How to use it

1. Add page URLs under **URLs**, or paste your own HTML under **HTML documents**.
2. Choose **screenshot**, **PDF** or both, plus device and format.
3. Click **Start**.
4. Every result row has a shareable `screenshotUrl` / `pdfUrl`.

### Features

- Chrome with system fonts for **Hebrew, Arabic, CJK and emoji**, so right-to-left and non-Latin pages render correctly.
- **Hides common cookie banners** (OneTrust, Cookiebot, Usercentrics and others) before capturing.
- Wait strategies (network idle or load) plus an optional extra delay for animations and lazy-loaded content.
- Safe by default: every request the page makes is checked, and private or internal addresses are blocked, even from inside your own HTML.

### Input

```json
{
  "urls": ["https://example.com"],
  "htmlDocuments": [{"name": "invoice-42", "html": "<h1>Invoice 42</h1><p>Total: $10</p>"}],
  "outputs": ["screenshot", "pdf"], "device": "mobile", "fullPage": true, "pdfFormat": "A4"
}
```

### Output (one item per URL or HTML document)

```json
{
  "url": "https://example.com/", "status": 200, "title": "Example Domain",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/example.com-b559c7edd3fb-mobile.png", "screenshotBytes": 257820,
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/example.com-b559c7edd3fb.pdf", "pdfBytes": 115518
}
```

### Notes

- Pages behind logins and bot walls are not supported.
- Very long pages are captured in full. Expect large PNGs; use JPEG or WebP for smaller files.

### Pricing

Pay per event, no monthly rent:

- **$0.002 per screenshot**
- **$0.003 per PDF**
- $0.002 per run start

| Example | Cost |
|---|---|
| 100 full-page screenshots | $0.202 |
| 1,000 screenshots | $2.00 |
| 1,000 PDFs (e.g. invoices from HTML) | $3.00 |
| 500 URLs as screenshot + PDF | $2.50 |

Failed pages are not charged.

You can set a **maximum cost per run** in the run options; the Actor stops cleanly when it is reached. New to Apify? The free plan includes $5 of platform credit every month, so you can try this Actor at no cost.

### API, integrations and AI agents (MCP)

Run it from your own code with the [Apify API](https://docs.apify.com/api/v2) and get the results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/manageable_gully~url-to-pdf-screenshot/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" -d @input.json
```

```python
from apify_client import ApifyClient
run = ApifyClient("<YOUR_APIFY_TOKEN>").actor("manageable_gully/url-to-pdf-screenshot").call(run_input={...})
```

- **No-code:** use the Apify app in **n8n, Make or Zapier** ("Run Actor", then "Get dataset items"), or send results to Google Sheets, Slack or a webhook.
- **AI agents (MCP):** add `https://mcp.apify.com?tools=manageable_gully/url-to-pdf-screenshot` to Claude, Cursor, VS Code or any MCP client and the agent can call this Actor as a tool.
- **Schedules:** run it hourly, daily or weekly from Apify Console.

### FAQ

**Can I convert my own HTML to PDF?** Yes. Send HTML in `htmlDocuments` (e.g. an invoice template you rendered) and get a print-ready PDF back through the API.

**Can it take mobile screenshots?** Yes. Pick a mobile or tablet device; screenshots use a retina viewport.

**Can AI agents use it?** Yes. It is available as a tool through the Apify MCP server (`https://mcp.apify.com?tools=manageable_gully/url-to-pdf-screenshot`) and the Apify API, and it returns structured JSON that agents can read directly.

### More tools from WebIntel Tools

- [Web Page to Markdown](https://apify.com/manageable_gully/page-to-markdown): clean Markdown and RAG chunks from any URL, for LLMs
- [Lighthouse & PageSpeed Bulk Audit](https://apify.com/manageable_gully/lighthouse-bulk-audit): Lighthouse scores and Core Web Vitals for hundreds of URLs
- [PDF & Image OCR Extractor](https://apify.com/manageable_gully/pdf-ocr-extractor): PDFs and images to text, Markdown and tables (incl. Hebrew/Arabic)
- [SEO Audit & Domain Checker](https://apify.com/manageable_gully/website-health-audit): SEO, DNS, SSL and security-header audit for lists of domains

See [all WebIntel Tools Actors](https://apify.com/manageable_gully).

*Made by WebIntel Tools. This Actor was built and is maintained with AI assistance. Report issues on the Issues tab; they are monitored daily.*

# Actor input Schema

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

Pages to render, one per line.

## `htmlDocuments` (type: `array`):

Optional: render your own HTML (invoices, reports, emails). Array of {"name": "invoice-42", "html": "<h1>...</h1>"} objects or plain strings.

## `outputs` (type: `array`):

Each output is charged separately.

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

Viewport to render with: desktop (1366x768 or similar) or a mobile phone emulation.

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

Capture the entire scrollable page instead of just the viewport.

## `screenshotFormat` (type: `string`):

Image format of the screenshot.

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

Compression quality for JPEG and WebP screenshots (ignored for PNG).

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

Paper size used when generating PDFs.

## `landscape` (type: `boolean`):

Generate PDFs in landscape orientation.

## `printBackground` (type: `boolean`):

Include background colors and images in PDFs.

## `pdfMargin` (type: `string`):

CSS length, e.g. 0, 10mm, 0.5in.

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

Which browser event to wait for before capturing the page.

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

For animations or lazy-loaded content.

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

Try to hide common cookie consent banners and overlays before capturing.

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

Maximum number of pages rendered in parallel.

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

Maximum time to wait for each page to load.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com"
  ],
  "htmlDocuments": [],
  "outputs": [
    "screenshot"
  ],
  "device": "desktop",
  "fullPage": true,
  "screenshotFormat": "png",
  "quality": 85,
  "pdfFormat": "A4",
  "landscape": false,
  "printBackground": true,
  "pdfMargin": "10mm",
  "waitUntil": "networkidle2",
  "delayMs": 0,
  "hideCookieBanners": true,
  "maxConcurrency": 3,
  "timeoutSecs": 45
}
```

# Actor output Schema

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

One item per URL/HTML document with links to its screenshot and/or PDF.

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

All generated screenshot and PDF files.

# 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("manageable_gully/url-to-pdf-screenshot").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("manageable_gully/url-to-pdf-screenshot").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 manageable_gully/url-to-pdf-screenshot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,manageable_gully/url-to-pdf-screenshot"
        }
    }
}
```

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/Iy3gdKRw2CAHvPfGZ/builds/psvO3FMq2hqcZSQuo/openapi.json
