Invoice data extraction API
Send an invoice, receipt or any document and the field names you want; get them back as JSON. PDF, Word, Excel, scans and photos. One request, no template to train.
- You name the fields (invoice_number, total, due_date, supplier…) and get one JSON object; a value the file does not state comes back as null, never guessed
- Reads PDF, Word (.docx), Excel (.xlsx) and PowerPoint (.pptx) files, and scans or photos (PNG, JPEG, WebP) by OCR
- Send the file itself in a POST body or give its public URL; up to 10 MB (images 3 MB)
- A file that cannot be read is never charged
No account to create. Failed calls are never charged.
One request
curl -H "Authorization: Bearer $API_KEY" \
"https://tools.funwords.eu/document/extract?url=https%3A%2F%2Fcalibre-ebook.com%2Fdownloads%2Fdemos%2Fdemo.docx&fields=title%2Cebook_formats%2Cpens_needed%2Cscissors_needed"
Python
import os, requests
r = requests.get(
"https://tools.funwords.eu/document/extract",
params={
"url": "https://calibre-ebook.com/downloads/demos/demo.docx",
"fields": "title,ebook_formats,pens_needed,scissors_needed",
},
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json())
Node.js
const params = new URLSearchParams({
url: "https://calibre-ebook.com/downloads/demos/demo.docx",
fields: "title,ebook_formats,pens_needed,scissors_needed",
});
const r = await fetch(`https://tools.funwords.eu/document/extract?${params}`, {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());
The answer
{
"url": "https://calibre-ebook.com/downloads/demos/demo.docx",
"type": "docx",
"data": {
"title": "Demonstration of DOCX support in calibre",
"ebook_formats": [
"EPUB",
"AZW3"
],
"pens_needed": 3,
"scissors_needed": 1
},
"missing": [],
"model": "@cf/meta/llama-4-scout-17b-16e-instruct",
"charsRead": 8934,
"truncated": false
}
Pricing
One API key, paid by card through Stripe. $0.03 per successful call with a key; failed calls cost nothing.
A plan adds its credits each month when the payment succeeds; unused credits stay, and you can cancel at any time. Packs never expire. After paying you get your key on the next page. The same key works on every tool in the catalog. Details: credits and plans.
Inputs
| Name | Type | Description |
|---|---|---|
url (required) | string | Absolute public http(s) URL of the file (or send the file in a POST body instead) |
fields (required) | string | Comma-separated field names to extract (1-30) |
What it does not do
- An AI model reads the file: check amounts and dates that matter before you act on them.
- It reads the first 24,000 characters of a file, and at most three pages of a scanned PDF.
- Old .doc, .xls and .ppt files and password-protected files are refused; save them in the current format first.
Also on the same key
- Document to text: Word, Excel, PowerPoint, PDF · $0.005 a call
- PDF to text, PDF text extraction: extract the text of a PDF document from a URL, page by page · $0.002 a call
Questions
Do I have to set up a template per supplier?
No. You send the field names with each request and the model finds them in the file, whatever its layout or language.
Does it read scanned invoices and photos?
Yes, by OCR: PNG, JPEG and WebP images up to 3 MB, and scanned PDFs whose pages are stored as JPEG images, which is how scanners write them. At most three pages of a scan in one call.
What happens to a field that is not in the document?
It comes back as null and is listed under missing. The model is told never to guess.
Are my files stored?
No. A file sent in a request is held in memory for that request only. It is not stored, cached or logged.
Can I use it in n8n, Make or Power Automate?
Yes. It is one HTTP request with the file as the body, and there is an n8n community node, n8n-nodes-agent-data-tools, with an Extract Fields action.
Is there a subscription?
There is a monthly plan and there are one-off credit packs. Both give one API key; a plan adds credits each month and unused credits stay.
For AI agents
The same tool is on the MCP server https://tools.funwords.eu/mcp (the first 25 successful calls are free), and an agent with a wallet can pay per call in USDC: the tool URL answers 402 Payment Required with x402 and MPP terms. Reference: tool page · OpenAPI · docs for agents.