Document type

Extracting data from grocery receipts

Each retailer's point-of-sale system prints its own receipt layout, with abbreviated item names and retailer-specific tax codes. Expense teams, rewards apps and rebate processors all ask for receipts as proof of purchase, and the largest rewards apps take in millions a day. Most arrive as phone photos uploaded through an app.

A rewards app needs the store, the date, every item line with its price, and the total. Its purchase verification system matches the items against active offers before awarding points. An expense platform matches the total and date to the card transaction.

Page 1 of a sample Grocery Receipt, with extracted values outlined
DPT-3 ProParse model
1page
768Markdown characters
0.7parse credits per page
6 sparse time
19fields extracted
The problem

What makes grocery receipts hard

  • Photos of creased thermal paper

    Shoppers photograph receipts on whatever surface is nearest, with the thermal paper creased and lit unevenly across the frame.

  • Abbreviated, fused item lines

    Each item line runs a SKU straight into a cut-down description, such as KS BUTTER, with the price at the far edge.

  • Tax codes vary by retailer

    Taxability is a one-letter code beside each price, and each retailer assigns its own letters to taxable and exempt items.

How it works

Parse, extract, verify

  1. 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. 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. 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 grocery receipt, end to end

About this document: A phone photo of a Costco Wholesale receipt from the Greenville, South Carolina warehouse, published as an editorial image by The Kitchn. One page with three item lines, a $0.00 tax line, a $38.48 total and a chip-read card payment. The paper is creased and unevenly lit on a granite counter. The membership number and the card's last four digits were replaced with random stand-ins.

Processing objective: The objective is to follow one purchase from its item line to the total charged. The receipt prints the item number, description, price and tax flag on one line, and each returns separately. Every item carries the E flag for exempt, so the tax line is zero and the subtotal equals the total.

Demonstration fields: Item, Item price, Tax flag, Subtotal, Total

The document

1 page
  • Page 1 of the sample Grocery ReceiptPage 1shown below

Where each value came from

Itemitems[1].name
GRAPE TOMATO
The region of the sample Grocery Receipt containing Item, with the extracted value outlined
extraction_metadata["items[1].name"]
{
  "value": "GRAPE TOMATO",
  "page": 1,
  "range": {
    "end": 248,
    "start": 236
  },
  "box": {
    "xmin": 0.37227,
    "ymin": 0.43956,
    "xmax": 0.59395,
    "ymax": 0.46645
  }
}
Item priceitems[1].total_price
5.99
The region of the sample Grocery Receipt containing Item price, with the extracted value outlined
extraction_metadata["items[1].total_price"]
{
  "value": 5.99,
  "page": 1,
  "range": {
    "end": 261,
    "start": 257
  },
  "box": {
    "xmin": 0.70243,
    "ymin": 0.43604,
    "xmax": 0.77861,
    "ymax": 0.46146
  }
}
Tax flagitems[1].tax_flag
E
The region of the sample Grocery Receipt containing Tax flag, with the extracted value outlined
extraction_metadata["items[1].tax_flag"]
{
  "value": "E",
  "page": 1,
  "range": {
    "end": 221,
    "start": 220
  },
  "box": {
    "xmin": 0.13637,
    "ymin": 0.44601,
    "xmax": 0.15699,
    "ymax": 0.46867
  }
}
Subtotalsubtotal
38.48
The region of the sample Grocery Receipt containing Subtotal, with the extracted value outlined
extraction_metadata["subtotal"]
{
  "value": 38.48,
  "page": 1,
  "range": {
    "end": 374,
    "start": 369
  },
  "box": {
    "xmin": 0.68597,
    "ymin": 0.50117,
    "xmax": 0.77942,
    "ymax": 0.52817
  }
}
Totaltotal
38.48
The region of the sample Grocery Receipt containing Total, with the extracted value outlined
extraction_metadata["total"]
{
  "value": 38.48,
  "page": 1,
  "range": {
    "end": 470,
    "start": 465
  },
  "box": {
    "xmin": 0.61059,
    "ymin": 0.56211,
    "xmax": 0.82593,
    "ymax": 0.59831
  }
}
Page 1 of the sample Grocery Receipt, with every featured field outlined

Performance

Parsed and extracted with v2 APIs using dpt-3-pro-20261111 and extract-20261111, at the Standard service tier.

1page
0.7parse credits per page
6 sparse time
19schema fields
0.053extract credits per field
191.2 sextract time
Capabilities

Grocery Receipt processing highlights

Every item line extracted
Item numbers split from names
Tax code per item
Subtotal, tax and total
Quantity and unit price
Store name and address
Transaction date and time
Card type and entry method
Phone photos of thermal paper
Totals in inverted print
No per-retailer templates
Bounding box for every value
Get started

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. VPC and on-prem deployment require an Enterprise plan.

Compare plans
FAQs

Questions, answered

Yes. DPT-3 Pro parses photos and scans as well as digital files, and a phone photo with EXIF orientation is parsed upright. Grounding comes back against the page image, so a reviewer sees each value on the photo the shopper took.

Define the items as an array in your schema, with fields for the item number, description, quantity and price. Each printed item line comes back as its own entry, in the order the receipt prints them.

Yes. Ask for the printed tax code and a taxable flag as separate fields, and describe what the retailer's letters mean. The code comes back exactly as printed, and the flag is derived from it.

No. A schema describes the fields you want in plain language. Where they sit on the receipt is not part of it, so one schema covers receipts from different retailers and point-of-sale systems.

Every extracted value carries the character range it was quoted from in the parsed Markdown. The Ground API maps that range to a page and a bounding box, so a reviewer sees each price on the line that printed it.

Start extracting grocery receipt data

Reliable, structured outputs with full traceability in minutes