Skip to content
OSINTtools.io

PDFmyURL API

Online service and API that converts a web page, raw HTML or a whole website into a PDF.

Base URL
https://pdfmyurl.com
Sign-in
API key
Format
REST
Endpoints
1

Compiled by OSINTtools.io editors from pdfmyurl.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

The PDFmyURL API converts a web page URL, or raw HTML, to a PDF and returns the PDF in the response. Investigators use it to keep a rendered copy of a page.

Call https://pdfmyurl.com/api with your license key and either url or html. GET and POST both work when the data is URL-encoded. The docs recommend POST, because with GET the URL appears in server access logs.

Conversions that exceed 60 seconds fail with 504. Plan usage limits return 429. A usage endpoint and a login endpoint for protected pages exist and are not covered here.

Quick start

  1. Get a key

    Create an account with PDFmyURL and copy your api key. Where to get it

  2. Make your first request

    Convert a URL or raw HTML to a PDF.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://pdfmyurl.com/api?url=https%3A%2F%2Fwww.example.com&license=YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this.

    %PDF-1.4 ... (binary PDF data)

Authentication

Send your API key in the license query parameter of every request.

The API is part of the Business license per the FAQ.

Get a key from PDFmyURL

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Not stated as a number; plan usage limits apply (429), too many simultaneous requests from one IP return 503.

Errors

StatusMeaning
400Nothing was specified to convert
401Invalid license key
409URL failed, often due to block_ads
415Input is not HTML (for example a PDF or Word file)
429Plan usage limit exceeded
503Too many simultaneous requests from one IP
504Conversion exceeded the 60-second maximum
520Page size or margins are invalid
530DNS error for the URL's domain
599Connection to the URL's domain timed out

Conversion

  • Takes: URL
  • Active: contacts the target
  • Plan: Business license

Returns the PDF directly in the response; PDFs are not stored on PDFmyURL servers. With url, the service fetches the page, so the target is contacted. Use html instead of url for protected pages.

Query parameters

urlstringrequiredtakes your url

Page to convert, URL-encoded. Use this or html

Example: https://www.example.com
htmlstring

Raw HTML to convert, instead of url

Example: <h1>Example</h1>
page_sizestring

Page size such as A4 or Letter

Example: A4
orientationstring

Page orientation

Example: portraitOne of: portrait, landscape
unitstring

Unit for margins, width and height

Example: mmDefault: mm
css_media_typestring

Set to print to use the page's print layout

Example: print
block_adsboolean

Remove ads during conversion

Example: true
hide_cookie_noticesboolean

Remove cookie and privacy banners

Example: true
no_javascriptboolean

Convert with JavaScript disabled

Example: false
javascript_timeinteger

Milliseconds to wait for JavaScript

Example: 200Default: 200
filenamestring

Filename for the PDF

Example: page.pdf
usernamestring

Username for HTTP basic authentication on the target page

Example: demo_user
Response fields · 1Show

(body)string

The PDF file (binary)

curl 'https://pdfmyurl.com/api?url=https%3A%2F%2Fwww.example.com&license=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
%PDF-1.4 ... (binary PDF data)