PDF Form Fields
Read or fill PDF form fields (AcroForm)
/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
{
"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
How to Use
1. Provide the PDF via `pdf` (base64) or `url` (public URL).
2. To inspect fields only, omit the `fill` parameter. The response lists all form fields with their names, types, and current values.
3. To fill fields, pass a `fill` object mapping field names to values (e.g. `{"full_name": "Jane Smith"}`).
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
- Automated form filling — Pre-fill application forms, tax documents, or contracts with user data
- Form discovery — Inspect a PDF to list available fields before building an integration
- Bulk document generation — Fill the same form template with different data for each recipient
- Workflow automation — Complete PDF forms as part of an approval or onboarding pipeline
Frequently Asked Questions
What form types are supported?
What happens if I fill a field that doesn't exist?
Can I read and fill in the same request?
Start using PDF Form Fields now
Get your free API key and make your first request in under a minute.