Convert any URL to a pixel-perfect PDF with one API call. Browser-accurate rendering using Chrome. No library to install, no server to maintain.
Start Free — 200 PDFs/mocurl "https://snapapi.pics/v1/screenshot?access_key=YOUR_KEY&url=https://example.com&format=pdf&full_page=true"
That is the entire API call. The response contains a url field with a CDN-hosted PDF ready to view or download. No library to install. No browser to manage. Works from any language that can make an HTTP GET request.
# Python
import requests
result = requests.get("https://snapapi.pics/v1/screenshot", params={
"access_key": "YOUR_KEY",
"url": "https://example.com",
"format": "pdf",
"full_page": True,
}).json()
pdf_url = result["url"]
// JavaScript
const res = await fetch(`https://snapapi.pics/v1/screenshot?access_key=${KEY}&url=${url}&format=pdf&full_page=true`);
const { url: pdfUrl } = await res.json();
// Go
params := url.Values{"access_key": {key}, "url": {target}, "format": {"pdf"}, "full_page": {"true"}}
resp, _ := http.Get("https://snapapi.pics/v1/screenshot?" + params.Encode())
// PHP
$result = json_decode(file_get_contents(
"https://snapapi.pics/v1/screenshot?access_key=$key&url=$url&format=pdf&full_page=true"
));
$pdfUrl = $result->url;
SnapAPI renders pages using the same Chrome engine your users see. This means web fonts load and render correctly. CSS Grid and Flexbox layouts work as designed. Box shadows, border radius, gradients, and modern CSS features all appear in the PDF. SVG images render crisply at any zoom level. Canvas elements and charts rendered by JavaScript libraries (Chart.js, D3, Recharts) are captured correctly because the JavaScript actually runs before the screenshot is taken.
Competing approaches that try to convert HTML to PDF without a real browser consistently miss CSS features, mis-render fonts, and break complex layouts. If you have ever wondered why your DomPDF or WeasyPrint output looks different from what users see in their browser, the answer is simple: those tools do not run a browser. SnapAPI does.
Control your PDF output with these parameters: full_page=true captures the entire page height (not just the viewport). width=1280 sets the viewport width before capture. delay=2000 waits 2 seconds after page load for JavaScript animations to complete. wait_for=.chart-loaded waits for a CSS selector to appear before capturing (useful for async data loads). media=print applies CSS print media rules instead of screen rules.
SnapAPI returns a CDN URL to your PDF. You have two options: serve this URL directly to your users (they click, browser downloads the PDF from our CDN), or fetch the PDF bytes and serve them from your own infrastructure.
// Option 1: Redirect to CDN URL (simplest)
app.get("/export-pdf", async (req, res) => {
const pdfUrl = await generatePdf(req.query.url);
res.redirect(pdfUrl);
});
// Option 2: Pipe PDF bytes through your server
app.get("/export-pdf", async (req, res) => {
const pdfUrl = await generatePdf(req.query.url);
const pdfRes = await fetch(pdfUrl);
res.setHeader("Content-Type", "application/pdf");
res.setHeader("Content-Disposition", `attachment; filename="export.pdf"`);
pdfRes.body.pipe(res);
});
Invoice generation is the most common use case — create an HTML template for your invoice, capture it as PDF, deliver to customers. Report export lets users download data dashboards as PDFs. Legal document generation captures signed contract pages. E-commerce order confirmations get exported as PDF receipts. Content archival saves web pages as PDFs for compliance documentation. Resume and CV generators let users export their profile as a formatted PDF.
Each PDF generation counts as one API call. Free: 200/mo. Starter: $19/mo (5,000). Growth: $79/mo (50,000). Start free — no credit card required.
Generating PDFs from URLs sounds simple but production-ready conversion requires handling authentication, waiting for dynamic content, controlling paper size and margins, embedding fonts, and managing concurrent job queues. SnapAPI abstracts all of that behind a single authenticated API call with no infrastructure to maintain.
Under the hood, SnapAPI launches a headless Chromium instance for each request, navigates to your URL, waits for all network requests to settle, injects any custom CSS you provide, then calls Chromium's native Page.printToPDF command. The result is a pixel-perfect, print-ready PDF returned as binary or as a CDN-hosted URL. JavaScript-rendered content, web fonts, lazy-loaded images, and SPAs all render correctly because a real browser renders them.
The pdf_format parameter accepts A4, Letter, Legal, and A3. Set pdf_landscape to true for landscape orientation. Use the delay parameter (0 to 10000ms) to wait for animations and lazy-loaded content. Pass custom CSS via the css parameter to hide navigation, add print-specific styles, or override fonts. Set full_page to true to capture the entire scrollable page height as one long PDF page, or leave it false for paginated output matching the paper format.
const express = require('express');
const app = express();
app.get('/download-pdf', async (req, res) => {
const targetUrl = req.query.url;
const apiUrl = new URL('https://api.snapapi.pics/v1/screenshot');
apiUrl.searchParams.set('access_key', process.env.SNAPAPI_KEY);
apiUrl.searchParams.set('url', targetUrl);
apiUrl.searchParams.set('format', 'pdf');
apiUrl.searchParams.set('pdf_format', 'A4');
apiUrl.searchParams.set('full_page', 'true');
apiUrl.searchParams.set('delay', '1000');
const response = await fetch(apiUrl.toString());
const pdfBuffer = Buffer.from(await response.arrayBuffer());
res.setHeader('Content-Type', 'application/pdf');
res.setHeader('Content-Disposition', 'attachment; filename=page.pdf');
res.send(pdfBuffer);
});
app.listen(3000);
from fastapi import FastAPI, Query
from fastapi.responses import Response
import httpx, os
app = FastAPI()
SNAP_KEY = os.environ["SNAPAPI_KEY"]
@app.get("/pdf")
async def generate_pdf(url: str = Query(...)):
params = {
"access_key": SNAP_KEY,
"url": url,
"format": "pdf",
"pdf_format": "A4",
"full_page": "true",
"delay": "1000",
}
async with httpx.AsyncClient(timeout=60) as client:
r = await client.get("https://api.snapapi.pics/v1/screenshot", params=params)
return Response(content=r.content, media_type="application/pdf",
headers={"Content-Disposition": "attachment; filename=page.pdf"})
Invoice generation: Render your HTML invoice template to a URL, call the PDF endpoint, and stream the result to the user or store it in S3. No WeasyPrint, no wkhtmltopdf, no server-side LaTeX. Report archiving: Scheduled jobs can hit your analytics dashboard URL every night and archive a PDF snapshot, perfect for compliance-heavy industries that need audit trails. E-signature prep: Generate a clean PDF from a contract URL before handing it to DocuSign or HelloSign. Print-friendly marketing: Let users download any public page as a print-ready PDF with one click.
Many real-world PDF use cases involve pages behind authentication. SnapAPI supports passing custom HTTP headers and cookies with each request, so you can pass session tokens or bearer auth headers to reach protected routes. Alternatively, generate a short-lived signed URL server-side, use it as the target URL, and let SnapAPI render it before the token expires. This pattern works well for SaaS dashboards, admin reports, and per-user invoice pages.
SnapAPI's median PDF generation time is under 2.5 seconds for a typical single-page application with a 1000ms delay. Simple static HTML renders in under 1 second. Complex dashboards with many chart libraries may take 3 to 5 seconds. Use the delay parameter to ensure all animations and lazy loads complete before capture. All jobs time out at 30 seconds maximum. Results can be cached by your application for as long as the source content remains unchanged.
What paper sizes are supported? SnapAPI supports A4, A3, Letter, and Legal paper formats. A4 is the default and works for the vast majority of business documents. For US-centric invoices and reports, Letter is the standard. A3 is useful for wide data tables or landscape dashboards where you need extra horizontal space.
Can I remove headers and footers? Yes. Pass custom CSS to hide browser-generated headers and footers, or to suppress page numbers. For example, pass css=%40page%7Bmargin%3A0%7D to remove all margins and any header/footer chrome that Chromium would normally add during print.
How do I handle pages that require login? SnapAPI supports passing custom request headers and cookies. Include an Authorization header or session cookie with your API call and SnapAPI will pass them through to the browser context. This lets you screenshot authenticated dashboards, admin panels, and private reports without exposing credentials in the target URL.
What is the maximum page size for PDF generation? There is no hard limit on page length. Full-page PDFs of very long content may take slightly longer to generate but there is no enforced maximum. Extremely long pages (tens of thousands of pixels tall) may produce large PDF files — consider splitting content or using pagination in your source page if file size is a concern.
Can I generate PDFs in bulk? Yes. SnapAPI processes each request independently, so you can fire multiple concurrent requests for batch PDF generation. The 19 dollar per month plan gives 5,000 captures and the 79 dollar plan gives 50,000. For custom high-volume needs, contact the team for a dedicated plan with higher concurrency limits.
Start generating PDFs now — sign up free at snapapi.pics.