# PDFmyURL API reference

> 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…

Source: https://osinttools.io/apis/pdfmyurl/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/pdfmyurl/

- Base URL: https://pdfmyurl.com
- Authentication: API key in the `license` query parameter. Get a key: https://pdfmyurl.com/plans The API is part of the Business license per the FAQ.
- Rate limits: Not stated as a number; plan usage limits apply (429), too many simultaneous requests from one IP return 503.
- Vendor docs: https://pdfmyurl.com/html-to-pdf-api

## Overview

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.

## Errors

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

## Conversion

### Convert a URL or raw HTML to a PDF.

`GET /api`

- Takes: URL
- Footprint: 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.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | query | string | yes | Page to convert, URL-encoded. Use this or html Example: https://www.example.com |
| `html` | query | string | no | Raw HTML to convert, instead of url Example: <h1>Example</h1> |
| `page_size` | query | string | no | Page size such as A4 or Letter Example: A4 |
| `orientation` | query | string | no | Page orientation Example: portrait One of: portrait, landscape |
| `unit` | query | string | no | Unit for margins, width and height Example: mm |
| `css_media_type` | query | string | no | Set to print to use the page's print layout Example: print |
| `block_ads` | query | boolean | no | Remove ads during conversion Example: true |
| `hide_cookie_notices` | query | boolean | no | Remove cookie and privacy banners Example: true |
| `no_javascript` | query | boolean | no | Convert with JavaScript disabled Example: false |
| `javascript_time` | query | integer | no | Milliseconds to wait for JavaScript Example: 200 |
| `filename` | query | string | no | Filename for the PDF Example: page.pdf |
| `username` | query | string | no | Username for HTTP basic authentication on the target page Example: demo_user |

Response fields:

- `(body)` (string): The PDF file (binary)

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

Example response (200):

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

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
