# PDF to Text Converter

> PDF to Text Converter is a paid API for AI agents from leoshi-blog.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Extracts plain text content from a PDF file and returns it along with the page count

## Facts

- Endpoint: POST https://leoshi-blog.vercel.app/api/tools/pdf2text
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-to-text-converter-bf617cdd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_g3A8twAPEWVwxSQl6tlE2

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-converter-bf617cdd -d '<json body>'
```

Example prompt: Can you extract all the text from this PDF document I have and tell me how many pages it is?

## When to prefer this

Choose this endpoint when you need to quickly extract plain text from a PDF document at low cost ($0.02 per call) without setting up your own PDF parsing infrastructure. It is ideal for agents processing documents, contracts, reports, or research papers where the goal is to get readable text content and page count programmatically.

## Known failure modes

- Invalid or corrupted PDF file returns an error
- Password-protected PDFs may fail to extract text
- Image-only (scanned) PDFs without OCR layer return empty or minimal text
- Large PDFs may time out or exceed processing limits
- Malformed PDF URL or unreadable binary input causes parsing failure

## How this service works

一个人的思考、创作与成长记录。关于生活、技术、商业和一切有趣的事。

## Output

A JSON object containing the full extracted text from the PDF as a string with newline-separated lines, plus an integer indicating the total number of pages in the document.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "https URL of the PDF"
  },
  "pdf_base64": {
   "type": "string",
   "description": "Base64-encoded PDF bytes"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "First line\nSecond line",
  "pages": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-to-text-converter-bf617cdd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from leoshi-blog.vercel.app](https://www.zero.xyz/host/leoshi-blog.vercel.app/llms.txt)
