Blog/General

How to Convert Any Receipt to Structured JSON in One API Call

February 5, 2026 · 3 min read

Receipts are messy. A receipt from a New York deli, a Tokyo convenience store, and a French brasserie all look completely different — different languages, layouts, tax structures, and date formats. Yet they all contain the same core information: who you paid, how much, and when.

The ReceiptConverter API turns any receipt image or PDF into a clean, consistent JSON object in a single HTTP request. Here's how it works.


What you get back

A successful API response looks like this:

{
  "success": true,
  "processing_ms": 1180,
  "data": {
    "vendor": "Blue Bottle Coffee",
    "date": "2024-03-15",
    "total": 14.25,
    "subtotal": 13.00,
    "currency": "USD",
    "payment_method": "Visa ****4242",
    "category": "Food & Drink",
    "taxes": [
      { "label": "CA Sales Tax 10%", "amount": 1.30 }
    ],
    "tip": null,
    "items": [
      { "name": "Single Origin Drip", "quantity": 2, "unit_price": 4.50, "total_price": 9.00 },
      { "name": "Almond Croissant",   "quantity": 1, "unit_price": 4.00, "total_price": 4.00 }
    ]
  }
}

Every field is consistent regardless of the original receipt format. Numbers are numbers, not strings. Dates are ISO 8601. Arrays are arrays. You can immediately insert this into a database, spreadsheet, or accounting system.


Getting started

Get a free API key at receiptconverter.com/dashboard. Free accounts include 10 conversions/month — no credit card required.


cURL

# File upload
curl -X POST https://receiptconverter.com/api/v1/convert \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -F "file=@receipt.jpg"

# URL
curl -X POST https://receiptconverter.com/api/v1/convert \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/receipts/lunch.pdf"}'

Python

import requests, os

API_KEY = os.environ["RECEIPTCONVERTER_API_KEY"]

def parse_receipt(file_path: str) -> dict:
    with open(file_path, "rb") as f:
        res = requests.post(
            "https://receiptconverter.com/api/v1/convert",
            headers={"Authorization": f"Bearer {API_KEY}"},
            files={"file": f},
            timeout=30,
        )
    res.raise_for_status()
    return res.json()["data"]

data = parse_receipt("coffee_shop.jpg")
print(f"{data['vendor']}: ${data['total']}")
# Blue Bottle Coffee: $14.25

See the Python guide for error handling and batch processing examples.


JavaScript / Node.js

import { readFileSync } from "node:fs";

const API_KEY = process.env.RECEIPTCONVERTER_API_KEY;

async function parseReceipt(filePath) {
  const file = new File([readFileSync(filePath)], "receipt.jpg");
  const form = new FormData();
  form.append("file", file);

  const res = await fetch("https://receiptconverter.com/api/v1/convert", {
    method:  "POST",
    headers: { Authorization: `Bearer ${API_KEY}` },
    body:    form,
  });

  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
  const { data } = await res.json();
  return data;
}

const data = await parseReceipt("coffee_shop.jpg");
console.log(`${data.vendor}: $${data.total}`);

See the JavaScript guide for TypeScript types and browser usage.


Accepted formats

| Format | Notes | |--------|-------| | JPEG / JPG | Most common receipt format | | PNG | Screenshots work well | | HEIC | iPhone photos (converted automatically) | | PDF | Digital PDFs only — scanned PDFs require image conversion first | | WebP | Supported |

Max file size: 10MB. For larger files, compress before uploading.


What the API handles automatically

Multilingual receipts — French, Spanish, Japanese, Arabic, Chinese, and more. The model reads the language and returns normalized fields in English.

Various date formats03/15/24, 15.03.2024, March 15, 15 mars 2024 — all normalized to YYYY-MM-DD.

Multiple tax lines — Receipts with state tax + city tax + special taxes get separate taxes array entries with their labels.

Partial/damaged receipts — If some fields can't be read, they return as null rather than guessing incorrectly.


Full API reference

Get your free API key →

Try it on your own receipts

Free to start. No account, no credit card.

Try free →