Receipt OCR API

Expense apps live or die on how well they read a crumpled receipt photo. Traditional OCR gives you a wall of noisy text; you still have to figure out which number is the total, which is the tax, and what the merchant is called. The AIDataParser receipt OCR API skips that step and returns the fields directly: merchant name, transaction date and time, subtotal, tax, tip, grand total, payment method, and an itemized list.

It reads receipts the way a person does — as an image with visual structure — so a blurry gas-station receipt, a long grocery tape, or a restaurant bill with a handwritten tip all resolve into the same predictable JSON shape. Pass a schema and the response is guaranteed to conform, which means your expense-categorization logic never has to babysit malformed data.

This is the piece an expense-tracking product, a corporate-card reconciliation flow, or a receipt-scanning agent needs: point the endpoint at an uploaded photo, get structured data back, and charge one credit only when the extraction succeeds. The confidence and review_needed signals let you auto-approve clean receipts and flag the faded ones for manual review, keeping your audit trail honest.

Fields you can extract from a receipt

merchantstring

Store or vendor name.

transaction_datestring

Purchase date/time.

subtotalnumber

Pre-tax amount.

taxnumber

Sales tax.

tipnumber

Gratuity, if present.

totalnumber

Amount charged.

payment_methodstring

Card, cash, etc.

itemsarray

Line items with name and price.

Example request

POST the receipt by URL, upload, or base64, with a JSON Schema describing the output you want.

curl -X POST https://aidataparser.com/v1/parse/document \
  -H "Authorization: Bearer adp_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/receipt.jpg",
    "schema": {
      "type": "object",
      "properties": {
        "merchant": {
          "type": "string"
        },
        "transaction_date": {
          "type": "string"
        },
        "total": {
          "type": "number"
        },
        "tax": {
          "type": "number"
        },
        "payment_method": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "price": {
                "type": "number"
              }
            }
          }
        }
      }
    }
  }'

Example response

The data field is guaranteed to match your schema.

{
  "object": "parse.document",
  "data": {
    "merchant": "Blue Bottle Coffee",
    "transaction_date": "2026-07-09T08:41:00",
    "total": 14.75,
    "tax": 1.21,
    "payment_method": "Visa •••• 4242",
    "items": [
      {
        "name": "Latte",
        "price": 5.5
      },
      {
        "name": "Croissant",
        "price": 4.75
      }
    ]
  },
  "confidence": "high",
  "review_needed": false,
  "credits_charged": 1,
  "credits_remaining": 49
}

FAQ

Does it work on photos of receipts, not just scans?

Yes — the API treats receipt images as vision input, so phone photos of crumpled or angled receipts extract just as well as flat scans. Send PNG, JPEG, or WebP.

Can it separate tax and tip from the total?

Yes. Define subtotal, tax, tip, and total in your schema and each is returned as its own numeric field, so expense categorization and reimbursement math stay exact.

What happens if a receipt is unreadable?

The response sets review_needed to true and lowers the confidence level instead of guessing, and no credit is charged on a failed extraction. You can route those to manual review.

More document types