URL → PDF

URL to PDF API

Convert any live web page to a print-ready PDF in one HTTP call. A real headless browser renders the page — CSS, web fonts, images and backgrounds intact — so the PDF looks like the page, not a broken export.

GET /v1/screenshot?url=...&format=pdf snapshots a live URL to PDF. Need to render markup you generate yourself (an invoice, a report) with headers, footers and page numbers? POST /v1/pdf is the document-generation endpoint. Same engine, same price — pick the one that fits.

Try it

request — live URL to PDF
curl "https://api.rasterly.dev/v1/screenshot?url=https://news.ycombinator.com&format=pdf" \
  -H "X-Api-Key: sk_live_..." --output hn.pdf

Control the document:

Why rasterly

A URL-to-PDF is a headless browser rendering a page and printing it — the same job as a screenshot. rasterly reuses one browser across requests, so a warm render is ~1s of CPU, which is why it's from $0.90 per 1,000 with 100/mo free, and a PDF costs the same as an image. Targets are SSRF-guarded: localhost, private ranges and cloud metadata are refused with a 403.

FAQ

How do I convert a URL to a PDF?
Call GET /v1/screenshot with the URL and format=pdf, or POST /v1/pdf with a url. A real headless Chromium renders it and returns a print-ready PDF.
Do CSS backgrounds and web fonts survive?
Yes — it's a real browser, so CSS, remote images, @font-face web fonts and print backgrounds render. Turn backgrounds off with print_background=false.
Can I set page size, orientation and margins?
Yes — format (A4/Letter/…), landscape, and margin. For your own markup, POST /v1/pdf also takes header/footer templates with page numbers.
What does it cost?
100/month free, then from $0.90 per 1,000 — a PDF costs the same as an image.
Start free — 100 renders Try the live demo