← Invoice data extraction

Invoice parser API: rules that don't grow with every vendor

A parser maps a known structure to fields. For XML invoices the structure is standard, so one parser covers every supplier; for PDFs the layout varies, which is why template-based tools need a rule per vendor.

Try it on your own invoice

5 documents free. PDF, photo or XML — data out as CSV, Excel or JSON.

Parsing versus recognising

Parsing assumes the data is already structured: XML, or a PDF with a text layer and predictable anchors.

Recognition reconstructs text from pixels. It is the fallback, not the default.

The maintenance trap

Template parsers work well until a supplier changes the layout — then the rule breaks silently and wrong numbers land in the ledger.

Standards-based parsing does not have this problem: the field paths are defined by the standard.

What you get back

Header: vendor, buyer, invoice number, issue and due date, currency.

Body: line items with quantity, unit price, line amount.

Totals: net, tax per rate, gross — plus the arithmetic checks.

Where it fits

An accounts payable flow that needs documents normalised before approval.

A marketplace that must read supplier invoices in many formats.

Frequently asked

Does the parser handle scanned PDFs?

It falls back to recognition for those, and flags the result so you can check it.

Can I get line items, not just totals?

Yes, line items are returned with quantity, price and amount.

Read next

DueBuddy — invoices and receipts in, structured data out