Skip to main content

URL to PDF API

Print any web page to PDF, one flat credit

The page as a browser prints it — on the paper you choose, or as one continuous page that looks like the site — with a link to the file you can hand straight to a user.

By · Last updated: October 2026

TL;DR

POST a URL to /pdf and get the whole rendered page back as a PDF: JavaScript run, web fonts and lazy-loaded images in, text selectable, links working, headings as bookmarks. pdf_options set the paper, orientation, margins, scale and stylesheet, or put the page on one long sheet; every option is included in the same 1 credit.

Free plan, no credit card. 1,000 credits a month.

Try it now — no signup

Free · no signup · 2 runs every 10 minutes

…or try one of these

Your result will appear here.

Enter a URL above, or pick one of the example pages.

The request

One POST, one bearer token

POST /pdf
curl -X POST https://urlpipe.dev/pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/blog/post", "sync": true, "pdf_options": {"paper_size":"letter","margin":15}, "page_options": {"block_cookie_banners":true}}'
Response (Base64 PDF, truncated)
JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9DcmVhdG9yIChDaHJvbWl1bSkK…

X-Result-Url: https://urlpipe.dev/…  (no key needed, valid 30 days)

Defaults

What a PDF captures by default

With no options you get the page on A4 portrait, printed the way the browser's own Print does: with the site's print stylesheet if it has one — many hide their navigation and ads for print — and with background colours. The whole page is printed, not just the fold: it is scrolled through first, so images that load on scroll are on every sheet.

The body of the response is the PDF, Base64-encoded. Decode it and save it as a .pdf file, or skip the bytes and use the link in the X-Result-Url header.

pdf_options

Every PDF option

All optional, all included in the price. Out-of-range values are refused before anything is spent.

OptionValuesWhat it does
paper_sizeletter, legal, tabloid, a3, a4, a5 — default a4The paper the page is printed on
landscapetrue / false (default)Turn the paper sideways
margin0–50 mm, default 10The margin on every side
scale10–200 %, default 100Lower it to fit a wide page on narrow paper
print_backgroundtrue (default) / falseBackground colours and images; off gives a lighter, ink-friendly PDF
mediaprint (default) / screenThe site's print stylesheet, or the page as it looks on screen
single_pagetrue / false (default)The whole page on one sheet as tall as the document — no page break cuts through it

What the page waits for and what it loses before it is printed is set with page_options: block_cookie_banners, block_ads, remove_selectors, wait_for_selector and delay. The /pdf reference has every detail.

In practice

Save the file, or hand over a link

Straight to a file
curl -s https://urlpipe.dev/pdf \
  -H "Authorization: Bearer $URLPIPE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "sync": true}' | base64 --decode > page.pdf

Every PDF response carries an X-Result-Url header: a signed link to the same file that needs no API key and stays valid for the 30 days the result is kept. Put it in an email, a download button or a ticket, with nothing to proxy. An async request gets the same link in its webhook payload as result_url.

Use cases

What people build with it

  • Archives and evidence. Terms of service, prices, policies and articles as they stood on a given day, as documents with searchable text. labels tie each one to a case or client.
  • Reports from dashboards. A web report or dashboard printed to Letter or A4 to send to someone who will not log in. wait_for_selector holds the print until the charts are drawn.
  • Read-later and offline copies. Documentation and long articles as one continuous single_page PDF with working links and bookmarks.
  • Invoices and receipts you render as HTML. If the page is public, print it with media: "print" and your own print stylesheet decides the layout.

Pricing

A flat price, whatever the options

A PDF costs 1 credit — A4 or Letter, one sheet or twenty, print or screen styles. The expensive dimensions are capped rather than metered: a 20 MB file, 10 seconds each of delay and wait_for_selector. A PDF you already made is reused for free while it is fresher than max_age, and a failed one costs nothing.

/scrape

A PDF and a screenshot from one visit

/scrape reads several operations off one page load, so a PDF, a screenshot and the metadata describe the same render. Each operation is billed as usual.

Limits

What it does not do

  • No HTML input. It prints a URL; it does not take a string of HTML to render.
  • No headers, footers or page numbers of your own. What the page and its print stylesheet draw is what is printed.
  • No interaction before printing. It can wait for an element, but not click, log in or fill a form.
  • No files over 20 MB. Turn off print_background or remove what you do not need with page_options to bring one under.
  • Public pages only. Private and intranet addresses are refused.

Pricing

What it costs

CallCreditsFree (calls/mo)Starter (calls/mo)Pro (calls/mo)Scale (calls/mo)
/pdf1 credit1,00020,00055,000175,000

Cache hits and failed requests cost nothing. Paid plans are never cut off: past the allowance, extra credits are $1.50 per 1,000 credits. See every plan.

FAQ

Frequently asked questions

letter, legal, tabloid, a3, a4, a5, portrait or landscape, with margins from 0 to 50 mm and a scale from 10 to 200 percent. Or single_page: true puts the whole page on one sheet as tall as the document.

Make your first request in five minutes.

Free plan, no card. Confirm your email and your API key is live — you'll be making real requests in minutes.