# PDF Text Extractor by URL

> PDF Text Extractor by URL is a paid API for AI agents from api.agent-data.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-11).

Fetches a PDF from a given URL (up to 15 MB) and returns its full text content page by page, along with metadata such as title, author, and page count.

## Facts

- Endpoint: GET https://api.agent-data.workers.dev/api/v1/pdf?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-text-extractor-by-url-a8f9a818
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_e6_XC3C9O3JiQTP2S8J9h

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-text-extractor-by-url-a8f9a818
```

Example prompt: Can you read the PDF at https://bitcoin.org/bitcoin.pdf and give me its full text, up to 9 pages?

## When to prefer this

Use this endpoint when you need to read or extract text from a PDF available at a public URL, especially for research papers, whitepapers, regulatory filings, or reports. It is preferable over general web scraping endpoints when the source is specifically a PDF file rather than an HTML page. It supports up to 300 pages and 200,000 characters, making it suitable for long documents.

## Known failure modes

- URL is not a valid or accessible PDF — returns an error indicating the resource could not be fetched
- PDF exceeds 15 MB size limit — request may fail or be rejected
- PDF is password-protected or encrypted — text extraction may fail or return empty
- max_chars or max_pages parameters out of allowed range — validation error
- PDF URL is unreachable or returns a non-200 response — fetch error

## How this service works

Extract the text of a PDF by URL (up to 15 MB), page by page, with title, author and page count. Use to read reports, papers, whitepapers and filings.

## Output

A JSON object containing the full extracted text of the PDF organized page by page (with '--- page N ---' separators), the document title and author (if available in the PDF metadata), total page count, number of pages actually read, and a boolean indicating whether the text was truncated due to the max_chars or max_pages limits.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "http(s) URL of a PDF"
      },
      "max_chars": {
       "type": "integer",
       "maximum": 200000,
       "minimum": 500
      },
      "max_pages": {
       "type": "integer",
       "maximum": 300,
       "minimum": 1
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://bitcoin.org/bitcoin.pdf",
  "text": "--- page 1 ---\nBitcoin: A Peer-to-Peer Electronic Cash System...",
  "title": "Bitcoin: A Peer-to-Peer Electronic Cash System",
  "truncated": false,
  "pages_read": 9,
  "pages_total": 9
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-text-extractor-by-url-a8f9a818/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agent-data.workers.dev](https://www.zero.xyz/host/api.agent-data.workers.dev/llms.txt)
