PDF to text, page by page
Download a public PDF (up to 10 MB) and return its text page by page, with title, author, page count and character counts. Choose a first page and how many pages to read (up to 200) and cap the output with maxChars. Scanned PDFs without a text layer, encrypted files and non-PDF URLs fail uncharged. Use to read papers, invoices, reports and manuals into an agent's context.
Inputs
| Name | Type | Description |
|---|---|---|
url (required) | string | Absolute public http(s) URL of the PDF |
firstPage | integer | First page to read (default 1) |
pages | integer | How many pages to read (1-200, default 50) |
maxChars | integer | Maximum characters of text returned across all pages (1000-200000, default 50000) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/pdf/text?url=https%3A%2F%2Fbitcoin.org%2Fbitcoin.pdf"
Or one of your 25 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/pdf/text?url=https%3A%2F%2Fbitcoin.org%2Fbitcoin.pdf&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum, Monad, World Chain or Tempo) and retries.
Example result
{
"url": "https://bitcoin.org/bitcoin.pdf",
"title": null,
"author": null,
"totalPages": 9,
"firstPage": 1,
"pagesRead": 1,
"chars": 46,
"truncated": true,
"pages": [
{
"page": 1,
"chars": 46,
"text": "Bitcoin: A Peer-to-Peer Electronic Cash System"
}
]
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is pdf_text, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp