API Documentation

Everything you need to integrate PDFForge into your application

Quick Start
Get up and running in 3 simple steps
1

Get Your API Key

Sign up for an account and generate your API key from the dashboard.

2

Make Your First Request

Send a POST request to our API with your source content and options.

3

Download Your PDF

Get the signed URL from the response and download your generated PDF.

API Endpoints
All available endpoints and their usage
POST
/api/v1/convert

Convert URL, HTML, or Markdown to PDF

Request Body:

{
  "source": {
    "url": "https://example.com",    // One of: url, html, markdown
    "html": "<html>...</html>",
    "markdown": "# Hello World"
  },
  "options": {
    "format": "A4",                  // A4, Letter, Legal, etc.
    "landscape": false,
    "printBackground": true,
    "scale": 1,
    "margin": {
      "top": "20mm",
      "right": "15mm",
      "bottom": "20mm",
      "left": "15mm"
    },
    "waitUntil": "networkidle",      // load, domcontentloaded, networkidle
    "timeoutMs": 30000,
    "headerTemplateHtml": "<div>...</div>",
    "footerTemplateHtml": "<div>...</div>",
    "removeSelectors": [".ads", ".cookie-banner"],
    "injectStyle": "body { font-family: Arial; }",
    "injectScript": "window.print = function() {}"
  },
  "callback": {
    "webhookUrl": "https://your-app.com/webhook",
    "correlationId": "your-reference-id"
  },
  "mode": "async"                    // async or sync
}
GET
/api/v1/jobs/:id

Get the status and result of a conversion job

Response:

{
  "jobId": "job_abc123",
  "status": "succeeded",
  "mode": "async",
  "pdf": {
    "bytes": 238945,
    "pages": 7,
    "signedUrl": "https://cdn.pdfforge.io/...",
    "contentType": "application/pdf",
    "sha256": "..."
  },
  "json": {
    "signedUrl": "https://cdn.pdfforge.io/...",
    "schemaVersion": "1.0.0"
  },
  "metadata": {
    "sourceType": "url",
    "requestedAt": "2025-09-01T08:15:30.000Z",
    "completedAt": "2025-09-01T08:15:34.500Z",
    "durationMs": 4500,
    "title": "Example Page",
    "headings": ["Introduction", "Usage"],
    "links": [...]
  }
}
GET
/api/v1/apikeys

List all API keys for your account

GET
/api/v1/usage

Get usage statistics for the last 30 days

Code Examples
Implementation examples in popular languages
curl -X POST https://api.pdfforge.io/v1/convert \
  -H "Authorization: Bearer pf_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "source": {
      "url": "https://example.com"
    },
    "options": {
      "format": "A4",
      "printBackground": true,
      "margin": {
        "top": "20mm",
        "right": "15mm",
        "bottom": "20mm",
        "left": "15mm"
      }
    },
    "mode": "async"
  }'
Multiple Formats

Support for URL, HTML, and Markdown inputs with full control over PDF output

Fast & Reliable

Async and sync modes with guaranteed uptime and fast response times

Webhooks

Get notified when conversions complete with our webhook system

Response Codes
HTTP status codes returned by the API
200

Success

Request completed successfully

202

Accepted

Async job queued for processing

400

Bad Request

Invalid request parameters

401

Unauthorized

Invalid or missing API key

429

Too Many Requests

Rate limit exceeded

500

Internal Server Error

Server error, please try again

Rate Limits
API request limits per plan
PlanRequests/HourMonthly ConversionsAPI Keys
Trial101001
Free103002
Starter1003,0005
Pro1,00030,00020
EnterpriseUnlimitedUnlimited100
Need Help?
We're here to help you succeed

Support Channels

  • • Email: support@pdfforge.io
  • • Response time: Within 24 hours
  • • Priority support for Pro and Enterprise plans

Resources