Introduction
ExDocApi turns any document into structured JSON. Upload a file, describe what you want, get clean data back — no templates, no training, no configuration.
What it does
You define the fields. The API extracts them.
POST /api/v1/extract
file → your document (PDF or image)
extract → { fields: { key: "what to look for" } }
The result is a JSON object with exactly the keys you asked for:
{
"invoice_number": "INV-2024-0042",
"vendor_name": "Acme Supplies Ltd.",
"total": "18,450.00",
"due_date": "2024-12-01"
}
How the pipeline works
Every extraction goes through a two-stage pipeline:
Your File (PDF or image)
|
v
[ Stage 1: Document Parser ]
Converts to structured text
Handles tables, layouts, scans
|
v
[ Stage 2: Extraction Engine ]
Finds your fields in the text
Returns structured JSON
|
v
Your Result { field: value }
Processing is asynchronous. You submit a job, get a job_id, then poll until done.
Job lifecycle
Submit
|
v
queued --> pending --> processing --> done
|
+--> failed
| Status | Meaning |
|--------|---------|
| queued | Waiting in queue to be picked up |
| pending | Assigned to a worker, document parsing in progress |
| processing | Fields being extracted from parsed document |
| done | Complete — result is ready |
| failed | Something went wrong — check the error field |
Key capabilities
Any document type. Invoice, medical report, contract, bank statement, passport, payslip — the same API handles all of them.
You define the schema. No preset templates to configure. Pass any field name with a plain-English description.
Flexible fields. Ask for 1 field or 50. Fields not found in the document return null, not an error.
Reusable schemas. Save field sets as named schemas and reference them across jobs.
Quick links
- Quickstart — first extraction in 5 minutes
- Authentication — API keys
- POST /api/v1/extract — submit a job
- GET /api/v1/jobs/:id — poll for results
- Schemas — reusable field templates
- Document types — built-in field suggestions
- Error reference — status codes and fixes