🧩 New: convert pages, images & docs to PDF right from your browser. Get the Chrome Extension β†’

Developer API

Call PDFDocFuse's PDF tools from your own code β€” same engine that powers the website, one HTTP endpoint.

Getting started

The API needs a Pro plan or higher. Once you're on Pro+, generate a key from Developer API in your account.

Authentication

Send your key as a bearer token on every request:

Authorization: Bearer pdk_live_xxxxxxxxxxxxxxxxxxxxxxxx

Making a request

Every operation is a single endpoint: POST https://www.pdfdocfuse.com/api/v1.php, sent as multipart/form-data with an operation field naming which tool to run, plus that operation's file(s) and parameters.

curl -X POST https://www.pdfdocfuse.com/api/v1.php \
  -H "Authorization: Bearer pdk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -F "operation=compress-pdf" \
  -F "level=smart" \
  -F "file=@/path/to/input.pdf"

Response format

Success:

{
  "ok": true,
  "download_url": "https://www.pdfdocfuse.com/download.php?id=12345",
  "filename": "compressed.pdf"
}

The download_url requires the same Authorization: Bearer header to fetch:

curl -H "Authorization: Bearer pdk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  "https://www.pdfdocfuse.com/download.php?id=12345" -o result.pdf

Error:

{
  "ok": false,
  "error": { "code": "operation_failed", "message": "..." }
}

Rate limits

PlanCalls / day
Pro500
Team2,000
EnterpriseUnlimited

Free and Starter plans don't include API access. Going over your limit returns HTTP 429 with error code rate_limited.

Error codes

HTTPCodeMeaning
401missing_api_keyNo Authorization header sent.
401invalid_api_keyKey doesn't exist or was revoked.
403plan_requiredAccount isn't on Pro+.
429rate_limitedDaily call limit reached.
400operation_failedSee message for specifics (bad params, invalid file, etc).
405method_not_allowedUse POST.

Operations

merge-pdf

Combine 2+ PDFs into one.

Parameters:

  • files[] (multipart, 2+ PDF files)

split-pdf

Split a PDF into a ZIP of files by page range.

Parameters:

  • file (multipart PDF)
  • ranges β€” e.g. "1-3,5,7-9"

extract-pages

Pick specific pages and save them as one new PDF.

Parameters:

  • file (multipart PDF)
  • pages β€” e.g. "1-3,5,7-9"

rotate-pdf

Rotate one page, several pages, or the whole PDF.

Parameters:

  • file (multipart PDF)
  • degrees β€” 90, 180, or 270 (default 90)
  • pages β€” optional comma-separated list; omit to rotate every page

delete-pages

Remove specific pages from a PDF.

Parameters:

  • file (multipart PDF)
  • pages β€” comma-separated, e.g. "2,4"

compress-pdf

Shrink a PDF's file size.

Parameters:

  • file (multipart PDF)
  • level β€” "smart" (default) or "max"

watermark-pdf

Stamp text across every page.

Parameters:

  • file (multipart PDF)
  • text β€” watermark text
  • opacity β€” 5-100 (default 30)
  • font_size β€” 10-150 (default 50)
  • angle β€” -90 to 90 (default 45)

protect-pdf

Password-protect a PDF.

Parameters:

  • file (multipart PDF)
  • password β€” 4+ characters

unlock-pdf

Remove a password from a PDF you own the password to.

Parameters:

  • file (multipart PDF)
  • password β€” the PDF's current password

⚠️ Needs Ghostscript or a CloudConvert key configured on the server.

pdf-to-text

Extract a PDF's text as plain .txt.

Parameters:

  • file (multipart PDF)

⚠️ Needs a real text layer β€” doesn't work on scans.

word-to-pdf

Convert a .docx file to PDF.

Parameters:

  • file (multipart .docx)

excel-to-pdf

Convert a .xlsx file to PDF.

Parameters:

  • file (multipart .xlsx)

Ready to build?

Sign up to get started