Direct answer
Extract Invoice Data From a PDF With AI
pdf_extract pulls the text out of any PDF URL; your AI then structures the totals, dates, and line items into clean data you can hand to your books. Two steps, both on the record: the extraction call returns a verifiable receipt, and the structuring happens in the open, against text you can see, instead of inside a black box that hands you numbers to trust.
Updated October 20, 2026.
The call: pdf_extract on the invoice URL
Give pdf_extract the URL of the invoice PDF. It fetches the document and returns the text it contains: vendor block, invoice number, dates, line items, totals, payment terms, in reading order. The call runs through the Zambo MCP (https://zambo.dev/mcp) and returns a verifiable receipt alongside the text, recording exactly what was fetched and what came back.
Scanned-image invoices are the one input to watch: if the PDF is a picture of an invoice rather than text, the extraction returns what text layer exists, which may be none. Check the returned text length against the page count before structuring, and treat an empty return as a scan problem, not an invoice with no data.
Structure the text into JSON
With the text in hand, ask your AI to structure it against a fixed shape and nothing else:
{
"vendor": "",
"invoice_number": "",
"invoice_date": "",
"due_date": "",
"currency": "",
"line_items": [{ "description": "", "quantity": 0, "unit_price": 0, "amount": 0 }],
"subtotal": 0,
"tax": 0,
"total": 0
}
Two instructions make the output trustworthy. First, extract only what the text says: a field the invoice does not state stays empty, never guessed. Second, quote the source line for each total, so a human can spot-check the three numbers that matter against the PDF in seconds.
Check the totals before you trust them
Run three arithmetic checks on every structured invoice, by hand or with a follow-up call: the line items sum to the subtotal, the subtotal plus tax equals the total, and the due date falls after the invoice date by the stated terms. These catch the realistic failure modes, a misread digit, a total pulled from the wrong box, a discount line dropped, far better than rereading the whole document. When a check fails, the fix is a look at the actual PDF page, guided by the quoted source lines.
Batch work follows the same shape: one pdf_extract call per invoice, one structured record per call, and a review queue containing only the invoices whose checks failed.
The receipt: keep the extraction on the record
Every pdf_extract call returns a verifiable receipt at a public URL. File it with the structured JSON and the invoice stops being a number you typed from somewhere: anyone, your bookkeeper, your future self, an auditor, can open the receipt, see the exact text the extraction returned, and recheck at zambo.dev/verify that the saved result was not changed after the fact. When a total is disputed months later, the argument ends at the record.
A Day Pass is $0.99 one time and covers 24 hours. The Zambo Pass is $29 a month or $290 a year, and $19 a month for $ZAMBO holders. Humans pay by PayPal or card through PayPal; agents pay USDC on Base via x402. Start with the Day Pass if you have a shoebox of invoices to clear this week.
Honest limits
pdf_extract returns the text a PDF contains; it cannot read a scanned image with no text layer, fix a blurry source, or know that a vendor typed the wrong total on the invoice itself. The structuring step is your AI reading that text, and AIs misread: that is why the totals checks and the quoted source lines are part of the method, not decoration. The receipt proves the extraction result was not changed after the call; it does not prove the invoice was accurate.
Frequently asked questions
How do I extract invoice data from a PDF with AI?
Run pdf_extract on the invoice PDF URL to pull the document's text, then have your AI structure that text into a fixed JSON shape: vendor, invoice number, dates, line items, subtotal, tax, and total, extracting only what the text states and quoting the source line for each total. Finish by checking that line items sum to the subtotal and the subtotal plus tax equals the total before the data touches your books.
What invoice fields can pdf_extract get?
Whatever the PDF states as text: vendor name and address block, invoice number, invoice and due dates, currency, line item descriptions with quantities and prices, subtotal, tax, total, and payment terms. If a field is not on the invoice, it stays empty. A scanned invoice with no text layer returns little or nothing, which the empty result itself tells you.
How accurate is AI invoice extraction?
Accurate enough to draft your books, never accurate enough to skip the checks. The realistic errors are a misread digit, a total taken from the wrong box, or a dropped discount line, and the three arithmetic checks on this page catch exactly those. Keep the receipt and the quoted source lines with the record, and any error found later can be traced to the extraction or to the invoice itself.
Can I extract data from many invoices at once?
Yes, one call per invoice: run pdf_extract on each PDF URL, structure each result against the same JSON shape, and review only the records whose totals checks fail. Each call returns its own verifiable receipt, so a batch of two hundred invoices produces two hundred checkable records instead of one summary nobody can audit.
What does PDF invoice extraction cost with Zambo?
pdf_extract is one of the 153 tools on the Zambo MCP, and light use fits the free tier. A Day Pass is $0.99 one time for 24 hours, which clears a serious backlog in a day. The Zambo Pass is $29 a month or $290 a year, and $19 a month for $ZAMBO holders. Humans pay by PayPal or card through PayPal; agents pay USDC on Base via x402.