{"uid":"cap_5hvF4TNBB4qODezPkSGd3","slug":"pdf-to-text-a121eb87","name":"PDF to Text","description":"PDF to text: give a PDF URL, get the text of every page with the title, author and page count. For RAG, research and summarizing reports, filings and papers.","url":"https://web.tollkit.dev/pdf?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"Absolute http(s) URL of a PDF."},"max_pages":{"type":"integer","default":50,"maximum":300,"minimum":1,"description":"Read at most this many pages."}}},"responseSchema":{"type":"json","example":{"url":"https://www.irs.gov/pub/irs-pdf/fw9.pdf","bytes":140815,"pages":[{"page":1,"text":"Form W-9(Rev. March 2024)\nRequest for Taxpayer\nIdentification Number and Certification\nDepartment of the Treasury\nInternal Revenue Service Go to www.irs.gov/FormW9 for instructions and the latest information.\nGive form to the\nrequester. Do not\nsend to the IRS.\nBefore you begin. …"},{"page":2,"text":"Form W-9 (Rev. 3-2024) Page 2\nmust obtain your correct taxpayer identification number (TIN), which\nmay be your social security number (SSN), individual taxpayer\nidentification number (ITIN), adoption taxpayer identification number\n(ATIN), or employer identification number (EIN),…"}],"title":"Form W-9 (Rev. March 2024)","author":"SE:W:CAR:MP","created":"2024-03-06","final_url":"https://www.irs.gov/pub/irs-pdf/fw9.pdf","truncated":true,"fetched_at":"2026-10-05T00:25:27.940Z","page_count":6,"pages_read":2,"text_length":13826}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jpqOVvJt9GWSZw_JZl59T","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a PDF from a URL and extracts the full text of every page along with metadata like title, author, and page count.","exampleAgentPrompt":"Can you extract all the text from this PDF — https://www.sec.gov/Archives/edgar/reports/annual2024.pdf — up to 100 pages, so I can read through the filing?","exampleUseCases":[{"title":"RAG ingestion of research papers","prompt":"Pull the full text out of this arXiv paper PDF — https://arxiv.org/pdf/2401.00001.pdf — up to 50 pages, so I can chunk it into my vector database."},{"title":"Summarizing an SEC annual filing","prompt":"Grab the text from this SEC 10-K filing PDF at https://www.sec.gov/Archives/edgar/data/12345/filing.pdf, reading up to 200 pages, so I can summarize the financial highlights."},{"title":"Reading an IRS tax form","prompt":"Extract the text from the IRS W-9 form at https://www.irs.gov/pub/irs-pdf/fw9.pdf and tell me what fields it asks for."}],"resultDescription":"Returns a JSON object containing the document URL, file size in bytes, page count, number of pages read, total text length, title, author, creation date, a truncation flag, the fetch timestamp, and an array of page objects each with a page number and its extracted text string.","failureModes":["URL is not a valid or accessible PDF — returns an error","PDF is password-protected or DRM-restricted — text cannot be extracted","PDF contains only scanned images with no embedded text — returns empty or minimal text","URL is unreachable or returns a non-PDF response — returns an error","max_pages exceeds the allowed maximum of 300 — validation error","Response truncated if document exceeds max_pages limit — truncated flag set to true"],"whenToPreferThis":"Choose this endpoint when you need to extract structured, page-by-page text from a PDF accessible via a public URL, especially for RAG pipelines, research paper ingestion, financial filings, or government documents. It is preferable over generic web scrapers when the target is specifically a PDF file, and over OCR services when the PDF contains embedded (selectable) text rather than scanned images.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:35:07.294Z","isFirstParty":false,"canonicalSlug":"pdf-to-text-a121eb87"}