Geekflare API

PDF Generator API

Convert any URL into PDFs. Perfect for generating invoices, reports, and archiveswith full control over layout, and styling.

99.9% UptimeHeadless ChromeAnti-Bot Bypass
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"timestamp": 1769007913216,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "https://geekflare.com",
"device": "desktop",
"format": "a4",
"orientation": "portrait",
"scale": 1,
"test": {
"id": "ecae2a87-5d97-41ac-960f-ea29c4b29272"
}
},
"data": "https://cdn.geekflare.com/tests/url2pdf/HhAEd7C86YxFixAb"
}
Trusted by 10,000+ developers

Copy, paste, and ship

import requests

url = "https://api.geekflare.com/url2pdf"
payload = {"url": "https://example.com", "format": "a4"}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)
OpenAPI 3.0Type SafeSSL Encrypted

Why Geekflare PDF API

Layout & Formatting

Full control over page orientation and standard formats to fit your document needs.

Styling

Adjust scaling and set custom margins to ensure your data fits perfectly on the page.

Add Timestamp

Automatically overlay timestamps on your documents. Essential for archives and compliance.

Rotating Proxies

We rotate residential proxies for you to generate PDFs from worldwide location without getting blocked.

Headless Browser

We render JavaScript just like a real user so the PDF looks exactly the same as the webpage.

Global Network

Requests are routed through our global edge network to ensure low latency.

Simple, transparent pricing

Free

$0/mo

500 Credits/mo
Generate ~100 pages
1 Request per second

Starter

$9/mo

5K Credits/mo
Generate ~1000 pages
5 Requests per second

Growth

Most Popular

$49/mo

100K Credits/mo
Generate ~20K pages
25 Requests per second

Business

$249/mo

1M Credits/mo
Generate ~200K pages
50 Requests per second

Build more with Geekflare

Take Website Screenshot

Capture high-quality PNG, JPG, or WebP screenshots of any website programmatically.

Scrape Any Website

Extract HTML, Markdown, or JSON from dynamic web pages with automatic CAPTCHA solving.

Extract Metadata

Extract title, description, images, Schema.org and Open Graph metadata from any URL.

Check Site Loadtime

Check how much time your site takes to load including DNS, Connect, TLS, and TTFB metrics.

Find Broken Links

Find dead internal and external links on a webpage.

Frequently Asked Questions

The generated PDF URLs are stored on our CDN for 30 days. If you need longer retention, please contact us.

PDF generation consumes 5 credits per request.

Yes, by default, we use a desktop viewport, but you can instruct the API to emulate a mobile device. This allows you to capture the responsive mobile layout of the website in your PDF.

Start with free plan - no credit card required.

Get your API key in less than 30 seconds. 500 free credits.