Inkspan › Guides › Receipt Data Extraction API
Pull structured data out of receipts and statements without training an OCR model. Born-digital PDFs return clean text and tables as JSON, each with a confidence score so you never ingest wrong data silently.
The failure mode that matters is not a crash — it is a receipt parsed into plausible but wrong numbers. Branch on review_recommended and route those documents to a human.
import requests
files = {'file': open('input.pdf', 'rb')}
r = requests.post(
'https://api.inkspan.dev/v1/extract/tables',
headers={'X-API-Key': 'ink_live_...'},
files=files,
)
r.raise_for_status()
print(r.json())
| Name | Type | Required | Description |
|---|---|---|---|
file | file | yes | The PDF to extract tables from. |
Returns application/json:
{
"table_count": 1,
"tables": [
{
"page": 1,
"rows": [
[
"Item",
"Qty",
"Price"
],
[
"Widget",
"5",
"$10"
]
]
}
],
"confidence": 0.95,
"review_recommended": false
}
review_recommended. Ignoring it is how false-certain data reaches production.| Status | Meaning | Fix |
|---|---|---|
401 | Invalid or missing API key | Send your key in the X-API-Key header. |
402 | Monthly quota exceeded | The response reports used/quota. Upgrade at inkspan.dev/#pricing. |
422 | Missing or invalid parameter | Check required fields in the table above — the body names the offending field. |
Failed requests do not count against your quota; only successful ones are metered.
Yes — 100 documents a month, no card required. Usage-based plans start at $19/month when you outgrow it.
Send your key in the X-API-Key header on every request.
No. Only successful requests are metered.
Get a free API key →Full guides for /v1/extract/tables: cURL · Python · Node.js · all guides