{"uid":"cap_CTa6-4RdtjU4gnzHHwBEJ","slug":"switch402-pdf-to-text-extractor-61af97cd","name":"switch402 PDF to Text Extractor","description":"switch402 PDF to text: a public PDF URL in, its text page by page out (up to 50 pages, 10 MB). Charged only when text comes back.","url":"https://api.switch402.com/v1/pdf?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","maxLength":2048,"description":"Public http(s) URL of a PDF (up to 10 MB)"},"pages":{"oneOf":[{"type":"array","items":{"type":"integer","maximum":10000,"minimum":1},"maxItems":50,"minItems":1},{"type":"string","maxLength":400}],"description":"Optional page numbers, up to 50: an array like [1, 2] or a string like \"1-3,7\" (default: from page 1, up to 50 pages)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AAy_VWAMXCQ2fKrOwLBBV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a public PDF URL and returns its text content page by page, up to 50 pages or 10 MB.","exampleAgentPrompt":"Can you extract the text from this PDF for me — https://example.com/report.pdf — just pages 1 through 5?","exampleUseCases":[{"title":"Research paper text extraction","prompt":"Pull the text out of this academic PDF at https://arxiv.org/pdf/2301.00001.pdf — I just need the first 10 pages so I can read the abstract and methodology."},{"title":"Legal contract content review","prompt":"Extract all the text from this contract PDF at https://contracts.example.com/agreement.pdf so I can search through it for the termination clauses."},{"title":"Invoice data retrieval","prompt":"Get the text from this invoice PDF at https://billing.acme.com/invoice-1042.pdf — grab all pages so I can find the line items and total amount due."}],"resultDescription":"A page-by-page breakdown of the PDF's text content, structured as an object with each page's extracted text. Only returned (and charged) when text is successfully extracted.","failureModes":["PDF URL is not publicly accessible or requires authentication — returns an error","PDF exceeds 10 MB size limit — rejected","More than 50 pages requested — capped or rejected","PDF is image-based or scanned with no embedded text — returns empty or minimal text","Invalid or malformed URL provided — returns an error","PDF is password-protected — extraction fails"],"whenToPreferThis":"Choose this endpoint when you have a publicly accessible PDF URL and need its text content extracted page by page. Ideal for processing documents, reports, contracts, invoices, or research papers where the PDF has embedded (not scanned) text. Prefer this over screenshot or scrape endpoints when the source is definitively a PDF file and you need machine-readable text rather than visual output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:30:22.607Z","isFirstParty":false,"canonicalSlug":"switch402-pdf-to-text-extractor-61af97cd"}