PDF API Documentation

Free, privacy-focused API for PDF manipulation. All processing happens at the edge with Cloudflare Workers.

Base URL: https://thegoodpdf.com/api

🔒 Privacy First

Your files are processed in-memory at Cloudflare's edge locations and are never stored. Files are immediately discarded after processing.

Integration Guides

Power Automate
Automate PDF workflows in Microsoft 365
Zapier
Coming soon

Status & Info

GET /api/status Check API status and list all endpoints

Returns API status, version, and a list of all available endpoints with their parameters.

fetch('https://thegoodpdf.com/api/status')
  .then(res => res.json())
  .then(data => console.log(data));
POST /api/info Get PDF metadata and page information
Parameter Type Description
fileRequired File The PDF file to analyze
const formData = new FormData();
formData.append('file', pdfFile);

fetch('https://thegoodpdf.com/api/info', {
  method: 'POST',
  body: formData
});

Organize PDFs

POST /api/merge Merge multiple PDFs into one
Parameter Type Description
filesRequired File[] Multiple PDF files to merge (minimum 2)
const formData = new FormData();
formData.append('files', pdf1);
formData.append('files', pdf2);
formData.append('files', pdf3);

fetch('https://thegoodpdf.com/api/merge', {
  method: 'POST',
  body: formData
});
POST /api/split Extract pages from PDF
Parameter Type Description
fileRequired File PDF file to split
pagesOptional string Page range (e.g., "1-3,5,7-9")
POST /api/rotate Rotate PDF pages
Parameter Type Description
fileRequired File PDF file
angleOptional number Rotation: 90, 180, or 270 degrees
pagesOptional string Pages to rotate (default: all)
POST /api/delete-pages Remove pages from PDF
Parameter Type Description
fileRequired File PDF file
pagesRequired string Pages to delete (e.g., "1,3,5-7")
POST /api/compress Optimize PDF file size
Parameter Type Description
fileRequired File PDF file to compress

Security

POST /api/protect Add password protection
Parameter Type Description
fileRequired File PDF file to protect
passwordRequired string Password to set
POST /api/unlock Remove password protection
Parameter Type Description
fileRequired File Protected PDF file
passwordRequired string Current password

Edit & Annotate

POST /api/watermark Add text watermark
Parameter Type Description
fileRequired File PDF file
textOptional string Watermark text (default: "CONFIDENTIAL")
opacityOptional number 0-1 opacity (default: 0.3)
fontSizeOptional number Font size (default: 50)
colorOptional string Hex color (default: #888888)
rotationOptional number Rotation degrees (default: -45)
POST /api/page-numbers Add page numbers
Parameter Type Description
fileRequired File PDF file
positionOptional string Position: top-left, top-center, top-right, bottom-left, bottom-center, bottom-right
formatOptional string Format string using {n} and {total}