Every extraction the web app does is also one REST call away. The Datafromfile API lets you send a file from your own script or server and get back structured rows and columns, no browser, no manual upload.
What the API actually does
POST a file as base64 to /api/v1/extract with an API key, and get back the same extracted table the web app's upload button would produce, same pipeline, same accuracy, just callable from code.
Quickstart
Get a free key at Settings, Integrations & API, then:
curl -X POST https://www.datafromfile.com/api/v1/extract \
-H "Authorization: Bearer $DFF_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fileData": "'"$(base64 -w0 invoice.pdf)"'",
"fileName": "invoice.pdf",
"mimeType": "application/pdf",
"mode": "auto"
}'
The response comes back as JSON: { success: true, data: { summary, rowCount, columnNames, records } }.
Request fields
- fileData (required): the file's content, base64-encoded.
- fileName (required): the original filename, e.g. "invoice.pdf".
- mimeType (required): e.g. "application/pdf", "image/png", "text/csv".
- mode (optional): auto (default), tables, key_values, schema, or custom_prompt.
- customPrompt (optional): a natural-language instruction, only used when mode is custom_prompt.
Free tier and rate limits
The same account plan that governs the web app governs the Datafromfile API, there's no separate API allowance to buy on top of your existing plan.
| Plan | AI operations | Files per batch |
|---|---|---|
| Free | 15 / month | 3 |
| Pro | 250 / month | 25 |
| Business | 1,500 / month | 50 |
| Enterprise | 10,000 / month | 250 |
Free requires no credit card. A request counts against the exact same monthly quota as extracting through the web app, not a separate meter.
Real limits, not glossed over
This inline request path is capped at roughly 3MB per call, a hosting-provider request-body ceiling, not a Datafromfile one. A larger file needs the web app's own multi-step upload flow, which supports up to 100MB depending on plan.
What people actually build with it
- A Zapier, Make, or n8n workflow that extracts a file the moment it lands in a folder or inbox.
- A script that processes a batch of invoices overnight and writes the results to a spreadsheet.
- The official Chrome extension and MCP server both call this exact same endpoint, not a separately-maintained one, so a fix or accuracy improvement lands everywhere at once.
Errors and status codes
A bad request comes back as JSON with a real error code and message, never a silent failure:
- 401 UNAUTHENTICATED: the API key is missing, expired, or wrong. Check the Authorization header.
- 429 QUOTA_EXCEEDED: the account's monthly AI operation quota is used up. Wait for the reset, or upgrade the plan.
- 400 INVALID_REQUEST: fileData, fileName, or mimeType is missing or malformed.
- 413 (from the hosting layer, not this API's own JSON): the request body exceeded the ~3MB inline limit.
Checking response.ok (or the HTTP status) before reading data is enough to catch all of these in a script, the same error shape every other Datafromfile endpoint uses, not a special case for this route.
FAQ
Do I need a paid plan to use the Datafromfile API? No. The Free plan includes 15 requests a month, no credit card required.
What authentication does it use? A Bearer token, your developer API key, generated at Settings, Integrations & API, sent in the Authorization header.
Is there a Python or JavaScript SDK? Not a dedicated package yet, the API is plain REST and JSON, so any HTTP client, requests in Python, fetch in JavaScript, works directly without one.
Does an API call show up in my Document History the same as a web upload? Yes, when called with an authenticated key, the extraction is saved to your real Document History exactly like a normal upload.
Try it
Get a free API key at Settings, Integrations & API and send your first request with the curl example above.