📄

PDF Form Fields

Read or fill PDF form fields (AcroForm)

POST 1 credit /v1/pdf/form-fields
curl -X POST "https://pdf.toolkitapi.io/v1/pdf/form-fields" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://toolkitapi.io/application-form.pdf",
    "fill": {
      "full_name": "Jane Smith",
      "email": "[email protected]",
      "date": "2024-12-15"
    }
  }'
import httpx

resp = httpx.post(
    "https://pdf.toolkitapi.io/v1/pdf/form-fields",
    json={
    "url": "https://toolkitapi.io/application-form.pdf",
    "fill": {
      "full_name": "Jane Smith",
      "email": "[email protected]",
      "date": "2024-12-15"
    }
  },
)
print(resp.json())
const resp = await fetch("https://pdf.toolkitapi.io/v1/pdf/form-fields", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://toolkitapi.io/application-form.pdf",
    "fill": {
      "full_name": "Jane Smith",
      "email": "[email protected]",
      "date": "2024-12-15"
    }
  }),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "fields": [
    {"name": "full_name", "type": "text", "value": "Jane Smith", "options": null},
    {"name": "email", "type": "text", "value": "[email protected]", "options": null},
    {"name": "date", "type": "text", "value": "2024-12-15", "options": null},
    {"name": "agree_terms", "type": "checkbox", "value": null, "options": null}
  ],
  "total_fields": 4,
  "pdf": "JVBERi0xLjcKMSAwIG9iago8...",
  "file_size": 189420
}

Description

Read or fill PDF form fields (AcroForm)

How to Use

1

1. Provide the PDF via `pdf` (base64) or `url` (public URL).

2

2. To inspect fields only, omit the `fill` parameter. The response lists all form fields with their names, types, and current values.

3

3. To fill fields, pass a `fill` object mapping field names to values (e.g. `{"full_name": "Jane Smith"}`).

4

4. When filling, the response includes the completed PDF as base64 in the `pdf` field.

About This Tool

PDF Form Fields reads AcroForm fields from interactive PDF documents and optionally fills them with your data. It detects text fields, checkboxes, dropdowns, and radio buttons — returning the field name, type, current value, and available options.

When you provide a `fill` object, the endpoint writes your values into the matching fields and returns the completed PDF. This lets you programmatically fill out application forms, contracts, tax documents, or any PDF with interactive form fields.

If you omit the `fill` parameter, it works as a read-only inspector — useful for discovering what fields a form contains before building your fill logic.

Why Use This Tool

Frequently Asked Questions

What form types are supported?
The endpoint reads AcroForm fields — the standard interactive form format in PDF. It supports text fields, checkboxes, radio buttons, and dropdown selects. XFA forms (XML-based) are not supported.
What happens if I fill a field that doesn't exist?
Fields in your `fill` object that don't match any form field in the PDF are silently ignored. Only matching field names are written.
Can I read and fill in the same request?
Yes. When you provide `fill`, the response includes both the field listing and the completed PDF. You see what fields exist and get the filled document in one call.

Start using PDF Form Fields now

Get your free API key and make your first request in under a minute.