URL to PDF API
for developers
Convert any web page to a PDF with one REST call. Real Chromium renders JavaScript, and cookies or headers let you capture pages behind a login.
Point it at a URL
POST a URL to /v1/pdf and get raw PDF bytes.
cURL
curl -X POST https://api.rendershot.io/v1/pdf \
-H 'X-API-Key: sk_live_...' \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com","format":"A4"}' \
--output page.pdfPython
import httpx
resp = httpx.post(
"https://api.rendershot.io/v1/pdf",
headers={"X-API-Key": "sk_live_..."},
json={"url": "https://example.com", "format": "A4"},
)
open("page.pdf", "wb").write(resp.content)Node.js
import { writeFileSync } from "node:fs";
const res = await fetch("https://api.rendershot.io/v1/pdf", {
method: "POST",
headers: { "X-API-Key": "sk_live_...", "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com", format: "A4" }),
});
writeFileSync("page.pdf", Buffer.from(await res.arrayBuffer()));What is a URL to PDF API?
A URL to PDF API converts a live web page into a PDF over a single HTTP request. You send a URL; the rendering happens on real Chromium; you get a finished PDF back — no browser to install or scale.
If you have raw markup rather than a hosted page, use the HTML to PDF API instead — same endpoint, you just send html rather than url.
Everything you need to capture a page
Any URL in, PDF out
Point the API at a live page and get back a PDF — no scraping or browser code.
Renders JavaScript
Real Chromium runs the page's JS, so SPAs, dashboards, and dynamic content render fully.
Wait conditions
Wait for load, network idle, or a CSS selector so late-loading content makes it in.
Authenticated pages
Pass cookies, headers, or basic auth to capture pages behind a login.
Page format
A3, A4, Letter, or Legal, portrait or landscape, with custom margins.
AI cleanup
Remove cookie banners and popups before rendering for a clean archive.
Async & scheduled
Poll long renders in async mode, or capture pages on a recurring cron schedule.
Webhooks
Get a signed push event with a ready-to-download URL when a render finishes.
Common use cases
Archive web pages
Keep a PDF record of what a page looked like at a point in time.
Save articles & receipts
Turn order confirmations, articles, or any page into a clean, shareable PDF.
Snapshot dashboards
Render an authenticated dashboard to PDF on a schedule for reporting.
Compliance records
Generate timestamped PDFs of pages for audit and compliance trails.
Comparing PDF APIs?
See how Rendershot stacks up against the PDF-focused services.
URL to PDF API FAQ
What is a URL to PDF API?
A URL to PDF API converts a live web page into a PDF over a single HTTP request. You POST a URL to Rendershot's /v1/pdf endpoint and get back PDF bytes rendered on real Chromium — no headless browser to run or scrape with.
Does it render JavaScript-heavy pages?
Yes. Rendershot uses real Chromium, so single-page apps, charts, and client-rendered content all execute. Use the wait_for option (e.g. network idle, or a CSS selector) to make sure late-loading content is captured.
Can I convert a page behind a login?
Yes. Pass cookies, custom headers, or basic auth with the request and Rendershot will render the authenticated page — useful for dashboards, portals, and internal tools.
What page sizes are supported?
A3, A4, Letter, and Legal (A4 by default), in portrait or landscape, with custom top/right/bottom/left margins. Page backgrounds are printed by default.
Is there a free URL to PDF tier?
Yes — the free plan includes 200 renders per month with no credit card, covering PDF generation and screenshots alike.
Turn URLs into PDFs in minutes
Free plan includes 200 renders/month. No credit card required.
Start for free →