Skip to content
Tidewell Software
Website Screenshot & PDF API

URL to PDF API

Render any web page to an A4, Letter or single long PDF in real Chrome.

Steps

  1. Get an API token. Apify Console → Settings → API & Integrations. Export it as APIFY_TOKEN.
  2. Install the client. pip install apify-client
  3. List the URLs. urls, one per page.
  4. Set format to pdf. Pick pdfFormat: A4, Letter or single-page.
  5. Download the PDF. From fileUrl; pdfPages gives the page count.

Input

input.json
{"urls": ["https://en.wikipedia.org/wiki/Web_scraping"], "format": "pdf", "pdfFormat": "A4"}

Run it

run.py
import os
import urllib.request

from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("tidewell/website-screenshot-pdf").call(run_input={
    "urls": [
        "https://en.wikipedia.org/wiki/Web_scraping"
    ],
    "format": "pdf",
    "pdfFormat": "A4"
})

for p in client.dataset(run["defaultDatasetId"]).iterate_items():
    if p["status"] == "succeeded":
        urllib.request.urlretrieve(p["fileUrl"], "page.pdf")
        print(p["pdfPages"], "pages")

Output

Run on 9 November 2026: 1 PDF, $0.004 at list price.

Dataset rows (trimmed)
[
  {
    "url": "https://en.wikipedia.org/wiki/Web_scraping",
    "status": "succeeded",
    "httpStatus": 200,
    "title": "Web scraping - Wikipedia",
    "device": "desktop",
    "viewport": "1920x1080",
    "format": "pdf",
    "fileUrl": "https://api.apify.com/v2/key-value-stores/mnuXk5MtQjAouwlQk/records/en.wikipedia.org-wiki-Web-scraping-desktop-2bcdd1.pdf?signature=...",
    "contentType": "application/pdf",
    "bytes": 319814,
    "pdfPages": 12,
    "pdfFormat": "A4",
    "cookieBanner": {"action": "none", "platform": null, "hiddenElements": 0},
    "totalMs": 3353,
    "charged": true,
    "capturedAt": "2026-11-09T19:58:21Z"
  }
]

Options

pdfFormat
A4, Letter, Legal, A3, A5, Tabloid, single-page
pdfMargin
10mm, 0.5in, 20px
pdfMediaType
print uses the site's print stylesheet
html
Raw HTML to PDF, e.g. invoices

Use it from Claude or ChatGPT

Apify MCP server, this actor only
https://mcp.apify.com/?tools=tidewell/website-screenshot-pdf
Claude
Settings → Connectors → Add custom connector. Paste the URL, sign in to Apify
Claude Code
claude mcp add apify "https://mcp.apify.com/?tools=tidewell/website-screenshot-pdf" -t http
ChatGPT
Add a custom MCP server with the URL and OAuth
Then ask
Use tidewell/website-screenshot-pdf to save https://en.wikipedia.org/wiki/Web_scraping as an A4 PDF and give me the link.

Pricing

Pay per event, from the actor's live pricing on 9 November 2026.

Price
$0.002 per screenshot, $0.003 per PDF, $0.001 per run start (2 GB).
Free
Failed pages (DNS errors, timeouts, 404s) and retries