{"uid":"cap_KhJxwfRGo4jy-IFby8_NT","slug":"document-extraction-api-pdf-docx-csv-to-markdown-json-87f7844c","name":"Document Extraction API (PDF, DOCX, CSV to Markdown + JSON)","description":"Document extraction: fetch a PDF, DOCX, or CSV by URL and get clean Markdown plus structured JSON — PDF text by page with metadata (honestly flags scanned PDFs that would need OCR), DOCX converted to real Markdown, CSV parsed to typed columns + JSON rows + a Markdown table. For agents that need document contents, not bytes.","url":"https://api.webbersites.com/api/extract","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 http(s) URL of the .pdf, .docx, or .csv document"},"type":{"type":"string","description":"Force the parser: pdf, docx, or csv (default: auto-detect from content-type, extension, magic bytes)"},"max_rows":{"type":"number","description":"CSV only: max rows returned as JSON (default 1000, max 5000)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"rows":{"type":"array"},"type":{"type":"string"},"pages":{"type":"number"},"columns":{"type":"array"},"markdown":{"type":"string"},"metadata":{"type":"object"},"row_count":{"type":"number"},"word_count":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"url":"https://example.com/quarterly-report.pdf","type":"pdf","pages":12,"markdown":"## Page 1\n\nExecutive summary…","metadata":{"title":"Q2 Report","author":"Finance Team"},"word_count":4120}},"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_fmA37EaWDlnYwb4ZNTSca","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 PDF, DOCX, or CSV document by public URL and returns clean Markdown plus structured JSON with metadata","exampleAgentPrompt":"Can you extract the text and structured data from this PDF at https://example.com/report.pdf and give me the content page by page as Markdown?","exampleUseCases":[{"title":"Parse pricing table from vendor CSV","prompt":"I need you to pull the latest pricing data from our vendor's CSV at https://vendors.company.com/current-rates.csv and give me the structured rows so I can compare against our costs."},{"title":"Convert compliance document to Markdown","prompt":"Can you grab the PDF compliance checklist from https://files.legal.org/audit-2024.pdf and convert it to clean Markdown so I can embed it in our internal wiki?"},{"title":"Extract tables from multi-page report","prompt":"Please fetch the quarterly earnings report as a PDF from https://ir.company.com/q3-report.pdf and give me each page's content separately so I can identify which page has the revenue table."}],"resultDescription":"Returns a JSON object containing: for PDFs — per-page text, total page count, word count, and metadata (with honest flags if scanned/OCR-needed); for DOCX — full Markdown conversion; for CSV — typed column definitions, JSON rows (up to max_rows), row count, and a Markdown table representation. A 'markdown' field is always present for human-readable content.","failureModes":["URL is not publicly accessible or returns non-200 — fetch error returned","Document type cannot be detected and no 'type' override provided — parser error","Scanned PDF with no embedded text — returned with flag indicating OCR is needed, text may be empty","CSV exceeds max_rows limit — truncated to requested or default 1000 rows","Malformed or password-protected document — parse error returned","Non-document URL (e.g. HTML page) provided — type mismatch or error"],"whenToPreferThis":"Use this endpoint when an AI agent needs the actual readable contents of a remote PDF, DOCX, or CSV document — not raw bytes. Ideal when you have a public URL and want clean Markdown for LLM consumption or structured JSON rows/columns for data processing. Prefer over general web scrapers when the target is a document file, and over OCR services when the PDF has embedded text.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:46:15.262Z","isFirstParty":false}