{"uid":"cap_XCE1UwS5cTlAXs2gBZ4bw","slug":"structdoc-receipt-extraction-api-a5a87451","name":"StructDoc Receipt Extraction API","description":"Extract structured receipt fields — merchant, date/time, line items, subtotal, tax, tip, total, currency — from a receipt image/PDF. ≤2 pages.","url":"https://structdoc-api.hp-vladic.workers.dev/receipt","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"Document URL (PDF/image)"},"pages":{"type":"string","description":"Page range e.g. \"1-5\""},"base64":{"type":"string","description":"Base64 document bytes (≤~6MB)"},"features":{"type":"string","description":"languages,barcodes,keyValuePairs"},"queryFields":{"type":"string","description":"custom fields, comma-separated ≤8"}}},"responseSchema":{"type":"json","example":{"model":"prebuilt-layout","pages":1,"format":"markdown","content":"# ..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_x_JWDIQdTnZ-GUN2vKWhw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured fields (vendor, totals, line items, dates) from receipt images or PDFs using OCR and prebuilt layout models, returning Markdown-formatted structured data.","exampleAgentPrompt":"Pull all the structured fields out of this receipt image — vendor name, date, line items, and total — and give it to me as clean Markdown.","exampleUseCases":null,"resultDescription":"A JSON response containing a Markdown-formatted structured representation of the receipt, including extracted fields such as vendor, date, line items, and totals, along with model metadata (model: 'prebuilt-layout', pages count, format: 'markdown').","failureModes":["Unreadable or low-quality image results in incomplete OCR extraction","Unsupported file format returns an error","Document language not among supported 100+ languages may degrade accuracy","Payment failure via x402/USDC results in 402 Payment Required response","Malformed or missing document body returns a 400 Bad Request","Handwritten receipts may have lower extraction accuracy than printed ones"],"whenToPreferThis":"Choose this endpoint when you need to extract structured fields specifically from receipts or invoices (vendor, total, line items, date) from PDF or image files, especially when you want pay-per-call pricing with no API key setup. Prefer over generic OCR when you need layout-aware structured output in Markdown format with receipt-specific field extraction across 100+ languages.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:38:46.388Z","isFirstParty":false}