Convert a web page to PDF with an API
Convert any URL or HTML into an A4 PDF with backgrounds, from any language. Cookie banners removed, waits for dynamic content. Free plan available.
Browser "print to PDF" is manual, and server tools like wkhtmltopdf do not support modern CSS and JavaScript. ScreenAPI loads the page in a recent Chrome and returns a PDF.
Convert a URL
curl "https://getscreenapi.com/api/v1/screenshot?url=https://example.com&format=pdf" \
-H "x-api-key: YOUR_KEY" -o page.pdfPages that load content with JavaScript
Use wait_for_selector to wait for the part of the page you care about, and lazy_load to scroll through it so lazy images appear:
{ "url": "https://example.com/report", "format": "pdf", "wait_for_selector": ".chart", "lazy_load": true }Generate a PDF from your own HTML
Send html instead of url to turn a template into an invoice or a contract. See the HTML to image guide.
Good to know
- PDF pages are A4 with backgrounds printed.
- Cookie banners are hidden by default (
block_cookies). - A PDF counts as one capture, whatever its number of pages.
Convert your first pages for free.
Get a free key