Skip to main content
The form fields API reads a PDF or an image and returns every place a person has to fill something in. Each field comes with its type, its box on the page and the printed label next to it. Use it to inspect a form before you fill it, to build a form from a scan, or to place signature and date blanks. Before you begin, make sure you have:
  1. A Datalab account with an API key
  2. Python 3.11+ installed
  3. The Datalab SDK: pip install datalab-python-sdk
  4. Your DATALAB_API_KEY environment variable set

Quick Start

Rate limits apply. The default rate limit is 200 requests per minute (429 on exceed, SDK retries automatically). A separate page concurrency limit of 5,000 concurrent pages is enforced during processing — results return with success: false if exceeded. See API Limits for details.

What a field looks like

Fields come in the order the model reads the page. To get pixel coordinates, multiply x0 and x1 by the page width and y0 and y1 by the page height.

Field types

field_type is one of: signature, initials, email, name, firstName, lastName, company, title, date, text, checkbox, radio. A field is the empty space a person writes in. The API does not return printed labels, headings or instructions as fields, and it returns no field for a page that has none. A field with no rule or box, such as a blank inside a sentence, still counts.

Options

Spreadsheets are not accepted. Send a PDF or an image.
The first request after a period without traffic can take longer than later ones. Pages with many fields also take longer.

Fill the fields you found

Detection tells you where the fields are. To write values into them, send the same file to the form filling API with your field data.

Next Steps

Form Fields SDK

Use form_fields() from the Python SDK and the CLI.

Form Filling

Fill the fields with structured data.

API Reference

See every parameter of the form fields endpoint.

Pricing

Per-page pricing for form field detection.