# Doc Tools: PDF Text Extractor

> Doc Tools: PDF Text Extractor is a paid API for AI agents from agentpay.agentpay-apis.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Fetches a PDF from a given URL and returns extracted per-page text content (supports PDFs up to 20MB).

## Facts

- Endpoint: GET https://agentpay.agentpay-apis.workers.dev/tools/v1/pdf-text?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/doc-tools-pdf-text-extractor-5a7fa339
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CqlXpsoMoTYWNu8cx60DP

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 doc-tools-pdf-text-extractor-5a7fa339
```

Example prompt: Can you extract all the text from this PDF for me? Here's the URL: https://example.com/annual-report-2024.pdf

## When to prefer this

Choose this endpoint when you need to programmatically extract text from a remotely hosted PDF file, especially when you need per-page granularity. Ideal for document analysis pipelines, contract review, research paper processing, or any workflow where a PDF's text content needs to be read and processed by an AI agent. Prefer this over general web scraping endpoints when the source is specifically a PDF document.

## Known failure modes

- PDF URL is inaccessible or returns a non-200 status — fetch fails
- PDF exceeds 20MB size limit — request is rejected
- URL does not point to a valid PDF — parsing error
- Password-protected or encrypted PDFs cannot be extracted
- Scanned image-only PDFs yield empty or minimal text (no embedded text layer)
- Network timeout fetching the remote PDF

## How this service works

Web extraction, domain lookups and document tools for AI agents. Pay per call in USDC via x402 on Base or Algorand.

## Output

A structured response containing extracted text organized per page from the PDF, allowing the agent to read and process the document's textual content programmatically.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "URL of a PDF"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/doc-tools-pdf-text-extractor-5a7fa339/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentpay.agentpay-apis.workers.dev](https://www.zero.xyz/host/agentpay.agentpay-apis.workers.dev/llms.txt)
