{"uid":"cap_NEGWeN1H7Bbc_Tx13Ne_j","slug":"pdf-to-structured-json-extractor-8bcf52f7","name":"PDF to Structured JSON Extractor","description":"Web pages, PDFs and feeds turned into clean structured JSON for AI agents: metadata, schema.org data, tables, headings, readable text, per-page PDF text, feed items. Pay per call over x402, no API key.","url":"https://doc-json.agent-utils.workers.dev/v1/pdf","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","format":"uri","description":"Absolute http(s) URL of the PDF"},"pageTo":{"type":"integer","minimum":1},"maxChars":{"type":"integer","default":200000,"maximum":500000,"minimum":1000},"pageFrom":{"type":"integer","minimum":1,"description":"First page to return (1-based)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"url":{"type":"string"},"text":{"type":"string"},"bytes":{"type":"integer"},"chars":{"type":"integer"},"pages":{"type":"integer"},"status":{"type":"integer"},"hasText":{"type":"boolean","description":"false means a scanned PDF: OCR needed"},"perPage":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer"},"text":{"type":"string"},"chars":{"type":"integer"}}}},"finalUrl":{"type":"string"},"metadata":{"type":"object"},"fetchedAt":{"type":"string"},"truncated":{"type":"boolean"},"responseMs":{"type":"integer"},"contentType":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"url":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf","text":"Dummy PDF file","bytes":13264,"chars":14,"pages":1,"status":200,"hasText":true,"perPage":[{"page":1,"text":"Dummy PDF file","chars":14}],"finalUrl":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf","metadata":{"Producer":"OpenOffice.org 2.1","PDFFormatVersion":"1.4"},"fetchedAt":"2026-09-06T21:30:00.000Z","truncated":false,"responseMs":320,"contentType":"application/pdf"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Jn6cAcaiNJklzZkZ-VysF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a remote PDF by URL and returns clean structured JSON including full text, per-page text, page count, byte count, and metadata — pay-per-call via x402.","exampleAgentPrompt":"Can you fetch the PDF at https://example.com/report.pdf and extract all the text from it, page by page, so I can read through the content?","exampleUseCases":[{"title":"Research paper text extraction","prompt":"Grab the PDF at https://arxiv.org/pdf/2401.00001 and pull out all the readable text so I can summarize the findings — show me the content page by page."},{"title":"Legal document content review","prompt":"I need you to extract the full text from this contract PDF at https://contracts.example.com/agreement.pdf so I can check what the termination clauses say."},{"title":"Scanned PDF detection check","prompt":"Fetch the PDF from https://docs.example.com/scan.pdf and tell me whether it has selectable text or if it's a scanned image that would need OCR."}],"resultDescription":"Returns a JSON object with: the resolved URL, full concatenated text, per-page text array (each with page number, text, and char count), total page count, byte size, character count, PDF metadata (e.g. producer, format version), fetch timestamp, HTTP status, content type, response latency in ms, hasText flag (false = scanned/image PDF needing OCR), and a truncated flag if the text was capped at maxChars.","failureModes":["URL is not a valid or accessible PDF — returns non-200 HTTP status or content-type mismatch","PDF is scanned/image-only — hasText returns false, text is empty","PDF exceeds maxChars limit — text is truncated and truncated flag is set to true","Network timeout fetching the remote PDF — returns error response","pageFrom/pageTo out of range — may return empty perPage array or error","Payment not completed via x402 — request rejected before processing"],"whenToPreferThis":"Choose this endpoint when you need to extract structured, machine-readable text and metadata from a remote PDF without managing your own PDF parsing infrastructure. It is ideal for AI agents that need per-page text access, want to detect scanned PDFs before attempting OCR, or need PDF metadata alongside content. It requires no API key — just an x402-compatible micropayment — making it suitable for pay-as-you-go agentic workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:37:17.766Z","isFirstParty":false}