{"uid":"cap_PX7S-Azg1U_bpI7bpp1sF","slug":"sitecheck-invoice-extractor-9ec0b352","name":"SiteCheck Invoice Extractor","description":"Structured data from an invoice: seller and buyer (name, address, tax ID), invoice number, dates, currency, line items, subtotal, tax, total and payment details, with null for anything absent. The arithmetic is checked (line sum against subtotal, subtotal plus tax against total) and mismatches are returned. PDF with a text layer by URL or base64, or plain text. Not live-checked: Workers AI is checked by the owner after the merge.","url":"https://api.sitecheck-api.workers.dev/api/invoice/extract?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"https link to a PDF invoice with a text layer (JSON body field)"},"text":{"type":"string","description":"The invoice text (JSON body field); or give url or pdf_base64 instead"},"pdf_base64":{"type":"string","description":"The PDF as base64, up to 15 MB (JSON body field)"}}},"responseSchema":{"type":"json","example":{"model":"@cf/meta/llama-3.3-70b-instruct-fp8-fast","checks":[{"ok":true,"check":"lineItems sum equals subtotal"},{"ok":true,"check":"subtotal plus tax equals total","total":24,"computed":24}],"source":"text in the request","invoice":{"tax":4,"buyer":{"name":"Acme GmbH","taxId":"DE811907980","address":"Unter den Linden 77, Berlin"},"total":24,"seller":{"name":"Widgets Ltd","taxId":"GB123456789","address":"1 High Street, London"},"dueDate":"2026-10-31","currency":"EUR","subtotal":20,"issueDate":"2026-10-01","lineItems":[{"amount":20,"taxRate":20,"quantity":2,"unitPrice":10,"description":"Widget"}],"invoiceNumber":"INV-42","paymentDetails":{"iban":null,"reference":"INV-42"}},"checkedAt":"2026-10-15T00:00:00.000Z","disclaimer":"Model extraction. Check the numbers against the document before paying or booking.","allChecksPass":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RcmHfh-GyUtglIPdt_4ay","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured invoice data from a PDF or text invoice and validates line item arithmetic","exampleAgentPrompt":"Can you extract the invoice details from this PDF — https://example.com/invoices/INV-42.pdf — and tell me the buyer, seller, line items, total, due date, and whether the numbers all add up correctly?","exampleUseCases":[{"title":"Accounts payable invoice ingestion","prompt":"I just received a vendor invoice as a PDF at https://invoices.acme.com/inv-2026-001.pdf — can you pull out the seller name, buyer name, line items, subtotal, tax, total amount, and due date, and let me know if the math checks out?"},{"title":"Verify invoice arithmetic before payment","prompt":"Before I approve this payment, can you check whether the line items on this invoice actually add up to the stated subtotal and total? Here's the invoice text: 'INV-99, Widgets x3 @ $50 each = $150, tax 10% = $15, total $165, due 2026-12-01'."},{"title":"Extract invoice data from base64 PDF","prompt":"I have an invoice as a base64-encoded PDF — can you parse it and give me the invoice number, buyer and seller details including their tax IDs, currency, and all line items in structured form?"}],"resultDescription":"A JSON object containing the full structured invoice — buyer and seller (name, tax ID, address), invoice number, issue date, due date, currency, line items (description, quantity, unit price, amount, tax rate), subtotal, tax, total, and payment details (IBAN, reference). Also includes an array of arithmetic validation checks (e.g. line items sum to subtotal, subtotal plus tax equals total) each with ok/check/computed fields, the model used, the source of data, and a disclaimer to verify against the original document.","failureModes":["PDF URL unreachable or not a valid PDF returns error","PDF has no text layer (scanned image-only PDF) may produce poor extraction quality","Base64 payload exceeding 15 MB limit rejected","Missing all three input fields (url, text, pdf_base64) returns validation error","Arithmetic checks may fail if invoice has complex discount or multi-tax structures","Model hallucination on ambiguous or poorly formatted invoices — disclaimer always returned"],"whenToPreferThis":"Choose this endpoint when you need to programmatically extract structured invoice fields from a PDF or raw invoice text and simultaneously verify the arithmetic consistency of the document. It is particularly useful for accounts-payable automation, pre-payment validation, or any workflow that needs to ingest invoices into a structured format without setting up a dedicated OCR pipeline. It accepts PDFs by URL, base64, or plain text, making it flexible for different document delivery methods.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:48:18.467Z","isFirstParty":false,"canonicalSlug":"sitecheck-invoice-extractor-9ec0b352"}