# ReadFetch PDF Extraction

> ReadFetch PDF Extraction is a paid API for AI agents from readfetch.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-31).

Fetches a PDF by URL or inline content and returns its text plus a Markdown-formatted body, up to 200 pages.

## Facts

- Endpoint: POST https://readfetch.com/v1/pdf?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/readfetch-pdf-extraction-3a04d0f8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3j1DJ7GEzFWRTUD6xIrpb

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 readfetch-pdf-extraction-3a04d0f8 -d '<json body>'
```

Example prompt: Can you fetch this PDF and extract its text as Markdown — here's the URL: https://arxiv.org/pdf/2401.00001.pdf — and only process up to 30 pages?

## When to prefer this

Choose this endpoint when you specifically need to extract text or Markdown content from a PDF document — either via a remote URL or an inline base64-encoded file. It is the right choice when the target document is a PDF (not an HTML page or other format), when you need structured Markdown output, or when the PDF host blocks datacenter IPs and you need residential egress. For generic web page text extraction, prefer the /v1/fetch sibling endpoint.

## Known failure modes

- PDF URL is unreachable or returns a non-PDF response
- Inline base64 content exceeds 20 MB limit
- max_pages out of range (below 1 or above 200)
- Residential egress unavailable for the target host
- PDF is password-protected or encrypted and cannot be parsed
- Network timeout fetching remote PDF URL

## How this service works

Extract text from a PDF (%PDF- magic, not Content-Type). Send exactly one of `url` (public http(s) link — egress GET, ≤ 20 MB) or `content_base64` (bytes you already have, ≤ 20 MB decoded; optional `filename` labels the upload). Returns `pages` (per-page text), one concatenated `markdown` body, `title`, and `metadata`; $0.005 per document, not per page. `max_pages` limits extraction (default 50, max 200); documents over 200 pages or above your cap return 413 and are not bille

## Output

Returns the extracted plain text and a Markdown-formatted body of the PDF document, structured per page, up to the specified page limit (default 50, max 200).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "example": "https://example.com/paper.pdf",
   "description": "Public PDF URL; fetched through egress (≤ 20 MB). Mutually exclusive with content_base64."
  },
  "filename": {
   "type": "string",
   "description": "Optional label when using content_base64 (default upload.pdf); ignored for url-only requests."
  },
  "max_pages": {
   "type": "number",
   "default": 50,
   "maximum": 200,
   "minimum": 1,
   "description": "Extract at most this many pages. Default 50; raise up to 200 when the document is longer. Over cap → 413, unbilled."
  },
  "content_base64": {
   "type": "string",
   "description": "Base64-encoded PDF bytes (≤ 20 MB). Mutually exclusive with url; pair with filename when the label matters."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/readfetch-pdf-extraction-3a04d0f8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from readfetch.com](https://www.zero.xyz/host/readfetch.com/llms.txt)
