S

SchemaLock · Extract Receipt

by SchemaLock

POSTBase

$0.02

per call · USD Coin on Base

SchemaLock — extract structured JSON data from a receipt PDF or image (merchant, items, subtotal, tax, tip, total, payment method). Unlike generic OCR (raw text) or text-only extraction APIs, this takes the raw file directly and validates against source math: line items checked against subtotal/tax/total, dates and currency checked, one automatic retry. If it still fails after that, you aren't charged — settlement is skipped, not just flagged.

Endpoint

POST https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/receipt

3

Calls / 30d

1

Unique payers / 30d

Sep 8

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/receipt", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "file": "<binary: PDF, PNG, or JPEG of a receipt, max 15MB>"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/receipt" \
  -H "Content-Type: application/json" \
  -d '{"file":"<binary: PDF, PNG, or JPEG of a receipt, max 15MB>"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "data": {
    "confidence": {
      "fields": {
        "merchant": 0.98,
        "total": 0.99
      },
      "overall": 0.96
    },
    "currency": "USD",
    "items": [
      {
        "amount": 4.75,
        "description": "Latte",
        "quantity": 1,
        "unit_price": 4.75
      },
      {
        "amount": 3.5,
        "description": "Bagel w/ cream cheese",
        "quantity": 1,
        "unit_price": 3.5
      }
    ],
    "merchant": {
      "address": "88 5th Ave, New York, NY 10011",
      "name": "Corner Cafe",
      "phone": "212-555-0199"
    },
    "payment_method": "Visa •••• 4242",
    "subtotal": 8.25,
    "tax": 0.73,
    "tip": 1.5,
    "total": 10.48,
    "transaction_date": "2026-08-12",
    "transaction_time": "13:42"
  },
  "retried": false,
  "validation_warnings": []
}

Payment details

Pay to0x65c767c483dd862d08bc3d6500cd4cd770ae28ed
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Media & Generation and the homepage with a featured placement.

Get featured →

More from SchemaLock & similar services

S

SchemaLock · Extract Contract

doc-extract-api.thestarboy9696-4ef.workers.dev

SchemaLock — parse a contract for its key terms as structured JSON data from a PDF or image (parties, dates, term, payment terms, termination clause, governing law, obligations, signatures). Unlike generic OCR or text-only extraction APIs, this takes the raw file directly and validates date logic (expiration after effective date), one automatic retry. Still fails after that, you aren't charged. Per-field confidence included.

POSTBaseMedia & Generation
$0.03 / call4 calls / 30d
S

SchemaLock · Extract Invoice

doc-extract-api.thestarboy9696-4ef.workers.dev

SchemaLock — extract structured JSON data from an invoice PDF or image (vendor, line items, subtotal, tax, total, dates, payment terms). Unlike generic OCR (raw text) or text-only extraction APIs, this takes the raw file directly and validates against source math: line items checked against subtotal/tax/total, dates and currency checked, one automatic retry. If it still fails after that, you aren't charged — settlement is skipped, not just flagged.

POSTBaseMedia & Generation
$0.02 / call4 calls / 30d
S

SchemaLock · Extract Custom

doc-extract-api.thestarboy9696-4ef.workers.dev

SchemaLock — extract structured JSON data from any PDF/image or raw text/HTML, converting it into a JSON Schema you supply, not limited to invoice/receipt/contract/resume. Unlike the fixed invoice/receipt/contract/resume endpoints, this accepts any JSON Schema — you define the fields. Takes a PDF/image file OR raw text/HTML you already have (e.g. a scraped page). Schema-conformance, not fact-checking. A rejected schema is a 400 and costs nothing.

POSTBaseMedia & Generation
$0.02 / call3 calls / 30d