How to extract text from a PDF URL
Updated 2026-11-10
Use when an agent must read the text of a public PDF given only its URL.
From an MCP client, add https://tanod.dev/mcp and call extract_pdf; its free daily calls are applied automatically, no key or signup.
POST a public PDF URL to /v1/pdf. It downloads the file, extracts the text of the first pages you ask for and returns it with the PDF's metadata (title, author, producer, created, modified).
Request
max_pages is 1 to 200 and defaults to 50; pages are read from the first.
curl -s -X POST https://tanod.dev/v1/pdf \
-H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
-d '{"url":"https://www.rfc-editor.org/rfc/rfc9110.pdf","max_pages":50}'Response
{
"url": "https://www.rfc-editor.org/rfc/rfc9110.pdf",
"pages": 194,
"extracted_pages": 50,
"page_errors": 0,
"metadata": {
"title": "RFC 9110: HTTP Semantics",
"author": "Roy T. Fielding, Mark Nottingham, Julian Reschke",
"producer": "cairo 1.16.0 (https://cairographics.org)"
},
"text": "RFC 9110\nHTTP Semantics\nAbstract\nThe Hypertext Transfer Protocol ...",
"truncated": true,
"encrypted": false,
"untrusted_content": true
}How it compares
Other pay-per-call PDF text APIs that the Agent402 router returned for "extract text from a pdf" on 13 October 2026, with their listed prices:
x402.forgemesh.io/extract-text-from-pdf: USD 0.005, layout-preserving text from a public PDF URL up to 25 MB.api.delx.ai/api/v1/x402/pdf-text(also oncommerce.delx.ai): USD 0.003; the listing has no description.
This route costs USD 0.005, returns the document metadata with the text, reads up to 200 pages and 200k characters from PDFs up to 20 MB, and has 5 free calls per IP per UTC day. Prices are as listed on that date and change; check each 402.
Limits and caveats
Limits. Public http(s) URLs only, at most 20 MB and 200 pages; text is capped at 200k characters, and truncated tells you when it was cut. Password-protected or malformed files are a 422 and are not charged.
Untrusted data. The extracted text comes from a third-party file and is returned with untrusted_content: true. If you pass it to a language model, treat it as data, never as instructions.
This reads the PDF's text layer. For a scanned page or an image, use the OCR guide.
How the fetch is guarded. Only public http and https addresses on ports 80 and 443 are fetched. The host name is resolved once and the connection is pinned to the address that was checked, so a DNS answer that changes between the check and the request (DNS rebinding) cannot redirect it to an internal address; a name with any private or internal record is refused, and every redirect hop is checked again. A refused address is a 422 and is not charged.
Price and free allowance
USD 0.005 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 5 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared with page metadata, OCR and static page renders. MCP tool: extract_pdf at https://tanod.dev/mcp, where the free tier is automatic.
Paying by card instead? The same conversion runs as an Apify actor, PDF to Markdown & Text Extractor (tanod/document-to-markdown), billed through your Apify account at USD 0.01 per converted document (failed files are free); give it a list of file URLs and get the converted files back in the run's storage.
All endpoints →Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/docs?via=pdf-to-text-api as a custom connector (steps), then ask in plain words, for example "Extract the text of this PDF." The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.
Related guides: Hosted PDF and OCR MCP server, How to OCR an image from a URL, How to get a page's Open Graph and meta tags, Pay-per-call APIs for AI agents with x402. Back to tanod.dev or the guide index. Results are automated and heuristic.