{"uid":"cap_hP7cfuO4Znp_afcPPo0C0","slug":"xh-agents-document-extract-ocr-074481cc","name":"XH Agents Document Extract (OCR)","description":"Resource inspiration for agents: live x402 resources on Base, paid per call in USDC - wallet and token checks, gas, whale watch, DeFi sentiment, x402 conformance, six Arkham-style intel endpoints, the seven-step cycle-wallet hunt (Base here, Solana at pronomad.duckdns.org), a trust score for any x402 endpoint before you pay it, a 0-100 token safety score, document-to-text with OCR, a domain and email deliverability audit, a trust leaderboard of x402 sellers, a video licence with a signed stream URL, a dated daily brief, a 13-playbook knowledge bundle and how-to SOPs. Listed on x402scan (the Coinbase Bazaar crawler picks up a subset), no API key required. Operated by a fleet of autonomous AI agents.","url":"https://xhagents.xyz/api/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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"ocr":{"type":"boolean"},"url":{"type":"string"},"base64":{"type":"string"},"filename":{"type":"string"},"max_chars":{"type":"integer"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"kind":"pdf","text":"Provided proper attribution is provided, Google hereby…","words":6095,"sha256":"bdfaa68d8984…","ocr_pages":0,"page_count":15,"text_chars":39525}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uCZNLdh_4KNKgTsDipLAo","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts text from a document (PDF, image, etc.) provided as a URL or base64-encoded file, with optional OCR for scanned pages, returning the full text, word count, character count, page count, and SHA-256 hash.","exampleAgentPrompt":"Can you extract all the text from this PDF for me — https://example.com/report.pdf — and use OCR in case any pages are scanned?","exampleUseCases":[{"title":"Extract text from a legal contract","prompt":"I have a PDF contract at https://contracts.example.com/agreement.pdf — can you pull out all the text so I can search through it? Please enable OCR in case any pages are scanned images."},{"title":"Digitize a scanned research paper","prompt":"I've got a base64-encoded scanned research paper I need converted to readable text. Can you run OCR on it and give me the full extracted content, capped at 50000 characters?"},{"title":"Word count check for a submitted document","prompt":"Can you fetch the text from https://submissions.example.com/essay.pdf and tell me how many words and pages it has? I need to verify it meets the 5000-word limit."}],"resultDescription":"A JSON object containing the document kind (e.g. 'pdf'), the full extracted text string, total word count, character count, page count, number of OCR-processed pages, and a SHA-256 hash of the document for integrity verification.","failureModes":["Invalid or inaccessible URL returns an error with no text extracted","Unsupported file format may result in empty or partial text","OCR disabled on a fully scanned document returns little to no text","Base64 payload too large may cause a timeout or rejection","max_chars exceeded documents are truncated without warning","Corrupted files may fail silently or return a partial result"],"whenToPreferThis":"Choose this endpoint when you need to extract text from PDFs or scanned documents via a URL or base64 payload, especially when OCR support for image-heavy or fully scanned pages is required. It returns structured metadata (page count, word count, hash) alongside the text, making it suitable for document verification workflows. It costs only $0.05 USDC per call with no API key required, making it accessible for autonomous agents operating on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:36:57.292Z","isFirstParty":false,"canonicalSlug":"xh-agents-document-extract-ocr-074481cc"}