*** September 2026 Major Release ***Read and watch
Document type

Extracting data from invoices

Every business that buys anything receives invoices, and no two suppliers format them alike. A mid-sized accounts payable team handles several thousand a month, arriving as email attachments and as photographs of paper. Each one has to be matched to a purchase order before it can be paid.

Accounts payable needs the supplier, the invoice number, every line item and the amount due. An ERP matches those against the open purchase order, posts the invoice to the general ledger, and schedules it into a payment run.

Page 1 of a sample Invoice, with extracted values outlined
2,259Markdown characters
68parse blocks
47fields extracted
The problem

What makes invoices hard

Every supplier has a different layout

Template extraction needs one template per supplier. Every new vendor is onboarding work, and every redesign breaks what already worked.

Line item tables break across pages

A multi-page invoice splits its line item table across sheets, repeating the headers on each one and carrying subtotals forward.

Normalized values, original evidence

Dates, currencies and tax identifiers must come out in one machine-readable form. An auditor still wants the string exactly as the supplier printed it.

How it works

Parse, extract, verify

1

Parse

Parse turns the document into reading-order Markdown and a hierarchy of blocks (text, tables, figures), and grounds each block to its exact location on the page.

2

Extract

You define the fields in a JSON schema, and Extract returns their values in a consistent, structured format, each linked back to where it appears in the Markdown.

3

Verify

Each value links back to where it appears, down to the character range in the Markdown, and the page and bounding box in the source document, so every result can be verified.

Worked example

One invoice, end to end

About this document: A single-page commercial invoice from A.E. Blake Sales, a Canadian industrial supplier, billed to Nelson Industrial Fabricators. Three line items of abrasive belts and graphite canvas, a customer PO reference, order and ship dates, and a totals block ending at $3,099.67 CAD. The headings are bilingual: "Invoice - Facture", "Vendu à - Sold To".

Processing objective: The objective is to capture who billed whom, for how much, and which goods were supplied. The line item is the middle row of three, chosen because its description carries dimensions, a pack quantity and a tolerance in one string.

Demonstration fields: Invoice number, Supplier, Sold to, Line item description, Total due

The document

1 page
  • Page 1 of the sample InvoicePage 1shown below

Where each value came from

Page 1 of the sample Invoice, with every featured field outlined
Invoice numberinvoice_info.invoice_number
138277
The region of the sample Invoice containing Invoice number, with the extracted value outlined
extraction_metadata["invoice_info.invoice_number"]
{
  "value": "138277",
  "page": 1,
  "range": {
    "end": 224,
    "start": 214
  },
  "box": {
    "xmin": 0.6374,
    "ymin": 0.09656,
    "xmax": 0.761,
    "ymax": 0.1111
  }
}
Suppliercompany_info.supplier_name
A.E. Blake Sales Ltd.
The region of the sample Invoice containing Supplier, with the extracted value outlined
extraction_metadata["company_info.supplier_name"]
{
  "value": "A.E. Blake Sales Ltd.",
  "page": 1,
  "range": {
    "end": 82,
    "start": 61
  },
  "box": {
    "xmin": 0.55401,
    "ymin": 0.02066,
    "xmax": 0.68072,
    "ymax": 0.03196
  }
}
Sold tocustomer_info.sold_to_name
NELSON INDUSTRIAL FABRICATORS
The region of the sample Invoice containing Sold to, with the extracted value outlined
extraction_metadata["customer_info.sold_to_name"]
{
  "value": "NELSON INDUSTRIAL FABRICATORS",
  "page": 1,
  "range": {
    "end": 291,
    "start": 262
  },
  "box": {
    "xmin": 0.14236,
    "ymin": 0.15809,
    "xmax": 0.41357,
    "ymax": 0.17021
  }
}
Line item descriptionline_items[1].description
3M 777F RBC Belt 6"x202" 60YF 10belts/case (±10%)
The region of the sample Invoice containing Line item description, with the extracted value outlined
extraction_metadata["line_items[1].description"]
{
  "value": "3M 777F RBC Belt 6\"x202\" 60YF 10belts/case (±10%)",
  "page": 1,
  "range": {
    "end": 1447,
    "start": 1395
  },
  "box": {
    "xmin": 0.22401,
    "ymin": 0.44898,
    "xmax": 0.53445,
    "ymax": 0.50492
  }
}
Total duetotals_summary.total_due
3,099.67
The region of the sample Invoice containing Total due, with the extracted value outlined
extraction_metadata["totals_summary.total_due"]
{
  "value": 3099.67,
  "page": 1,
  "range": {
    "end": 2054,
    "start": 2040
  },
  "box": {
    "xmin": 0.84299,
    "ymin": 0.88372,
    "xmax": 0.9256,
    "ymax": 0.92477
  }
}

How to try it yourself

Everything on this page is reproducible. The sample, its schema, and the Parse and Extract API outputs are published. You can repeat the same two calls from whichever surface you already build on.

  • Claude Skilldescribe the job; the agent writes it
  • CLIno code at all
  • MCPexpose ADE docs as an agent tool
  • REST APIany language
  • Pythonlandingai-ade
  • TypeScriptlandingai-ade
Why LandingAI?

Documents into data

Accurate

The best accuracy on the difficult documents other tools get wrong, such as messy scans, complicated tables, checkboxes and handwriting.

Auditable

Every answer cites its sources. Values come back with an audit trail (page, bounding box, character range) so a human can review them.

Agentic

Applies multi-step reasoning, and plans before it acts. Handles documents it has never seen before and adapts to variations.

API-first

Composable APIs that drop into any tech stack and can be called from anywhere. Easy to build on and embed in your pipelines and products.

Affordable

Cost-competitive rates with complete price transparency. Spend controls before you run, and every job reports its exact cost.

Enterprise-grade

Built for production and scale from day one. Fully observable and monitored, running securely in our cloud or yours.

Built for high-volume, high-throughput production

  • Zero data retention
  • Priority rate limits
  • Enhanced support
  • VPC and on-prem deployment

Available on Team and Enterprise plans.

Compare plans
Capabilities

Invoice processing highlights

No per-supplier templates
Native PDFs, scans and photos
Multi-page line item tables
Handwritten annotations
Totals and tax breakdowns
Currency and date normalizing
Purchase orders and credit notes
Multilingual invoices
Bounding box for every value
Character-level source ranges
Tax and VAT identifiers
Batch or real-time processing
FAQs

Questions, answered

No. A schema describes the fields you want. Where those fields sit on the page is not part of it, so one schema works across suppliers and layouts, including ones it has never seen.

Yes. Scans and photographs parse the same way as native PDFs. Grounding coordinates come back against the page image either way, so a phone photo gives you the same evidence as a digital original.

Define the line items as an array in your schema. The full table comes back as structured rows, including tables that continue across page breaks with repeated headers.

Every field comes back with grounding: the page, a bounding box and the character range in the parsed Markdown. That is enough to draw the box back onto the page and show a reviewer where the value came from.

Start extracting invoice data

Reliable, structured outputs with full traceability in minutes