Skip to main content
The form filling API fills PDF and image forms with your structured data. It works with native PDF form fields and scanned/image forms. Before you begin, make sure you have:
  1. A Datalab account with an API key (new accounts include $5 in free credits)
  2. Python 3.10+ installed
  3. The Datalab SDK: pip install datalab-python-sdk
  4. Your DATALAB_API_KEY environment variable set

Quick Start

See SDK Form Filling for complete SDK documentation.

How It Works

  1. Upload your form (PDF or image) with field data
  2. The API detects form fields and matches them to your data
  3. Fields are filled and the form is returned as PDF or PNG

Field Data Format

Provide field names with values and descriptions:

Examples

Basic fields:
Checkboxes:
Values like "yes", "true", "1", "checked", "x" will check boxes. Compound data:
The API can split compound data across multiple form fields.

Options

Context Parameter

Use context to improve matching for specific form types:

Response

Supported Form Types

  • PDF with native AcroForm fields - Uses PDF form fields directly
  • PDF with visual fields - Detects field locations and adds text overlays
  • Images (PNG, JPG) - Detects field locations and draws text on image
The API automatically detects the input type and uses the appropriate method.
Results are deleted from Datalab servers one hour after processing completes.

Next Steps

SDK Form Filling

Complete SDK reference for form filling

File Upload

Upload forms for reuse across requests

Pipelines

Chain processors into versioned, reusable pipelines.

Webhooks

Get notified when form filling completes