# PDF to Text

> PDF to Text is a paid API for AI agents from web.tollkit.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Fetches a PDF from a URL and extracts the full text of every page along with metadata like title, author, and page count.

## Facts

- Endpoint: POST https://web.tollkit.dev/pdf?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-to-text-a121eb87
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5hvF4TNBB4qODezPkSGd3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pdf-to-text-a121eb87 -d '<json body>'
```

Example prompt: 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?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-to-text-a121eb87/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from web.tollkit.dev](https://www.zero.xyz/host/web.tollkit.dev/llms.txt)
