{"uid":"cap_Ha5k3cBDkotx66zIjgIiM","slug":"agent-tools-document-extract-08f116e6","name":"Agent Tools Document Extract","description":"One call document parsing for invoices, receipts, statements, forms and scanned pages: PDF or image URL in, full text plus extracted fields out (dates, money amounts, totals/tax/amount due, invoice or order numbers, key: value pairs, emails, phones, URLs, simple tables). Images and scans use OCR.","url":"https://agent-tools.jbarkules.workers.dev/v1/document/extract?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Public PDF or image URL"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"kind":"pdf","text":"INVOICE\nInvoice #: INV-1042\nDate: 2026-10-01\nTotal: $1,250.00","pages":1,"fields":{"urls":[],"dates":["2026-10-01"],"emails":[],"phones":[],"tables":[],"totals":[{"label":"total","value":"$1,250.00"}],"amounts":["$1,250.00"],"key_values":{"Date":"2026-10-01","Invoice":"INV-1042"},"identifiers":["Invoice #: INV-1042"]},"characters":1840}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.012","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NthnFJModmaWfiZ-uRA0R","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts full text and structured fields (dates, amounts, invoice numbers, tables, contacts) from a PDF or image URL using OCR where needed","exampleAgentPrompt":"Can you parse this invoice PDF at https://example.com/invoice-1234.pdf and pull out the invoice number, date, line items, subtotal, tax, and amount due?","exampleUseCases":[{"title":"Automated invoice ingestion pipeline","prompt":"I have an invoice PDF at https://storage.example.com/invoices/inv-9871.pdf — can you extract the invoice number, vendor name, line items, tax, and total amount due so I can log it in our accounting system?"},{"title":"Receipt data capture for expense report","prompt":"Here's a photo of my receipt from dinner: https://photos.example.com/receipt-jul12.jpg — please pull out the date, merchant name, subtotal, tax, and total so I can submit my expense report."},{"title":"Scanned form field extraction","prompt":"I've got a scanned intake form at https://docs.example.com/patient-form-scan.pdf — extract all the filled-in fields as key-value pairs, including any dates, phone numbers, and email addresses on the form."}],"resultDescription":"Returns full extracted text from the document along with structured fields: dates, monetary amounts (subtotal, tax, total, amount due), invoice or order numbers, email addresses, phone numbers, URLs, simple tables, and arbitrary key-value pairs detected in the document. Scanned images and image-based PDFs are processed through OCR first.","failureModes":["URL is not publicly accessible (returns error or empty result)","PDF is password-protected or encrypted (cannot extract text)","Image quality too low for reliable OCR (partial or garbled text returned)","URL points to an unsupported file type (error response)","Document has no machine-readable or recognizable text (empty extraction)","Network timeout fetching large documents"],"whenToPreferThis":"Use this endpoint when you need to extract structured data from a document at a URL — especially invoices, receipts, statements, or scanned forms — in a single API call without managing OCR pipelines separately. Prefer this over raw PDF-to-text endpoints when you need structured fields (amounts, dates, invoice numbers) automatically identified, not just raw text. Choose over upload-based endpoints when you already have a public URL for the document.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T06:37:03.938Z","isFirstParty":false,"canonicalSlug":"agent-tools-document-extract-08f116e6"}