Documentation

PrefillPDF Developer Docs

Clear and simple documentation for integrating with the PrefillPDF API. Fill PDFs, apply watermarks, extract raw text, and convert PDF documents into structured JSON.

Video Tutorials

Create Account & API Key
Create Account & API Key
Signup, verify, generate API key.
Map Fields in the PDF Editor
Map Fields in the PDF Editor
Upload template, detect and map fields.
Watermark Setup & API Button
Watermark Setup & API Button
Configure watermark and copy cURL from the UI.

API Basics

Authentication
All requests require an API key

Send your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Base URL
All endpoints are relative to this URL

Use this base URL for every API request:

https://api.prefillpdf.com
POST
/fill-pdf
Fill PDF Endpoint
Fill a saved PDF template with mapped data, native PDF form fields, and image placeholders.

Supports data for mapped fields, form_fields for native PDF AcroForm fields, and images for logos, signatures, QR codes, and other configured image placeholders.

Request body (application/json)

{
  "template_id": "tmpl_123",
  "data": {
    "field-bizname": "Acme LLC"
  },
  "form_fields": {
    "dba-name": "Acme DBA",
    "legal-business-name": "Acme LLC"
  },
  "images": {
    "logo": "https://example.com/logo.png",
    "signature": "https://example.com/signature.png"
  }
}

cURL

curl -X POST "https://api.prefillpdf.com/fill-pdf" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tmpl_123",
    "data": {
      "field-bizname": "Acme LLC"
    },
    "form_fields": {
      "dba-name": "Acme DBA",
      "legal-business-name": "Acme LLC"
    },
    "images": {
      "logo": "https://example.com/logo.png",
      "signature": "https://example.com/signature.png"
    }
  }'

More examples (auto-generated)

Ready to Get Started?

Start filling PDFs, adding watermarks, and automating document workflows in minutes.

Getting Started with PrefillPDF

Automate document workflows through a simple REST API. Fill PDF templates, populate form fields, insert images and signatures, watermark documents, extract raw text, and convert PDF content into structured JSON.

PDF API Capabilities

Use one API platform for PDF generation, modification, and data extraction.

Fill PDF Templates

Populate saved templates with mapped values, native PDF form fields, and application data.

Insert Images and Signatures

Add logos, signatures, QR codes, and other images to configured template placeholders.

Add PDF Watermarks

Apply configured text watermarks to PDF documents for secure distribution and document labeling.

Extract Raw PDF Text

Extract embedded text from an uploaded PDF or a publicly accessible PDF URL.

Extract Structured JSON

Use reusable extraction schemas to convert PDF information into consistent application-ready JSON fields.

Server-Side API Integration

Connect PrefillPDF to Next.js, Python, automation platforms, backend services, and internal business workflows.

Popular Use Cases

Common ways developers and businesses use the PrefillPDF API.

  • Automated invoices and receipts
  • Contracts and legal agreements
  • Funding and financial applications
  • E-signatures and logos in document templates
  • Watermarked PDFs for secure sharing
  • Raw text extraction for search and analysis
  • Bank statement and document data extraction
  • PDF-to-JSON workflows for internal applications

PDF Text and Schema Extraction

Choose raw text extraction or structured schema extraction based on the result your application needs.

Raw Text Extraction

Raw text extraction returns embedded textual content from the PDF. Use the URL endpoint for publicly hosted files or upload a PDF directly through multipart form data.

POST /extract-text-from-urlPOST /extract-text

Schema Extraction

Schema extraction uses fields and extraction rules configured in your dashboard. It is designed for predictable structured responses that can be stored or processed by your application.

POST /extract-schema

Protect Your PrefillPDF API Key

PrefillPDF API keys should only be used from a protected backend, server action, API route, or secure automation environment. Do not expose a private API key inside client-side JavaScript, browser requests, public repositories, or screenshots.

Authorization: Bearer YOUR_API_KEY

Frequently Asked Questions

Answers to common PrefillPDF integration and extraction questions.

What is PrefillPDF?

PrefillPDF is a developer-friendly PDF automation platform. It lets you fill PDF templates, populate native PDF form fields, insert images, add watermarks, extract raw embedded text, and extract structured data through a REST API.

How do I authenticate API requests?

All PrefillPDF API requests require an API key. Generate an API key inside your dashboard and send it in the Authorization header using the format: Authorization: Bearer YOUR_API_KEY.

What API endpoints are available?

PrefillPDF provides endpoints for filling PDF templates, applying watermarks, extracting raw embedded text from a PDF URL or uploaded PDF, and extracting structured JSON using reusable extraction schemas.

How do I fill a PDF template?

Use the POST /fill-pdf endpoint with a template ID. You can populate custom mapped fields, native PDF AcroForm fields, and image placeholders such as logos, signatures, and QR codes.

Can I extract raw text from a PDF?

Yes. Use /extract-text-from-url when the PDF is available through a public URL, or use /extract-text when uploading a PDF directly. Inline mode returns JSON, while download mode returns a text file.

Can I extract structured data from PDFs?

Yes. Create a reusable extraction schema in the PrefillPDF dashboard, configure the fields and extraction rules, and call the /extract-schema endpoint with the schema ID and either a PDF URL or uploaded file.

What is the difference between text extraction and schema extraction?

Text extraction returns the raw embedded text found in a PDF. Schema extraction converts selected information into predictable structured fields based on a reusable schema configured in your dashboard.

Do you support PDF uploads and PDF URLs?

Yes. Extraction endpoints support either direct file uploads or publicly accessible PDF URLs, depending on the selected endpoint and source option.

Do you support images and signatures?

Yes. The images object in the /fill-pdf endpoint lets you insert logos, signatures, QR codes, and other supported images into configured template placeholders.

Does text extraction perform OCR?

The raw text extraction endpoints are designed to extract embedded PDF text. Image-only or scanned PDFs may require an OCR-specific workflow if no embedded text is present.

Is there a free trial?

Yes. You can create an account and receive trial credits to test supported API features before upgrading to a paid plan.

Ready to Build with PrefillPDF?

Create an API key and start generating, modifying, and extracting data from PDF documents.