Pass a URL, receive a downloadable PDF. Full JavaScript rendering.
HTML2DocHub visits the URL with a real Chromium browser, waits for all JavaScript to execute, and captures a pixel-perfect PDF. SSRF protection prevents attacks. Pay per page rendered.
curl -X POST https://api.html2dochub.com/v1/render \
-H "X-API-Key: sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "pdf",
"url": "https://example.com/report/2026-q1",
"options": {
"format": "A4",
"print_background": true,
"margin_top": "1cm",
"margin_bottom": "1cm"
}
}'import requests
resp = requests.post(
"https://api.html2dochub.com/v1/render",
headers={"X-API-Key": "sk_live_YOUR_KEY"},
json={
"type": "pdf",
"url": "https://yourapp.com/dashboard/report",
"options": {
"format": "A4",
"cookies": [
{"name": "session", "value": "abc123", "domain": "yourapp.com"}
],
"extra_headers": {"Authorization": "Bearer your-token"},
},
},
)
print(resp.json()["download_url"])Pay only for pages rendered. No subscriptions. No minimum monthly fee.
Free account. No credit card required. API ready in minutes.
Get your free API key