# ExtractPDF — PDF & DOCX Text Extraction API

> ExtractPDF — PDF & DOCX Text Extraction API is a paid API for AI agents from www.extractpdf.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-15).

Extracts plain text from a publicly accessible PDF or DOCX document via URL, returning the content with metadata such as page count, author, and title.

## Facts

- Endpoint: POST https://www.extractpdf.xyz/api/extract?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/extractpdf-pdf-docx-text-extraction-api-00eb2363
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nhlOCCe-bJ9j5H8wLMTr3

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 extractpdf-pdf-docx-text-extraction-api-00eb2363 -d '<json body>'
```

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

## When to prefer this

Choose this endpoint when an AI agent needs to read the text content of a PDF or DOCX document available at a public URL, without requiring API key setup or subscription management. It is ideal for pay-per-use workflows where document parsing is occasional rather than high-volume, and when the agent needs structured metadata (title, author, page count) alongside the extracted text. Prefer this over general-purpose scraping tools when the input is specifically a PDF or DOCX file rather than an HTML web page.

## Known failure modes

- URL is not publicly accessible or returns a non-200 HTTP response — extraction fails with an error
- Document is password-protected or encrypted — text cannot be extracted
- File is not a PDF or DOCX (e.g. image-only scanned PDF with no embedded text layer) — returns empty or minimal text
- Page range is out of bounds for the document — may return partial or empty text
- Document exceeds size limits — extraction may truncate or fail
- Network timeout fetching the remote document URL

## How this service works

Extract text from any PDF or DOCX for $0.005 USDC. No API key, no subscription. Pay per use via x402 on Base, Arc, or Polygon.

## Output

Returns a JSON object containing the full extracted plain text (up to 50,000 characters), the character count, total page count (for PDFs), the detected format (pdf, docx, or text), and optional metadata fields including the document title, author, and an ISO 8601 timestamp of when extraction occurred.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "Publicly accessible URL of a PDF or DOCX document. Must return the file directly (not an HTML page). Example: https://example.com/report.pdf"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url",
  "text",
  "chars",
  "format",
  "extracted_at"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "The URL that was fetched"
  },
  "info": {
   "type": "object",
   "properties": {
    "title": {
     "type": "string",
     "description": "Document title from metadata"
    },
    "author": {
     "type": "string",
     "description": "Document author from metadata"
    },
    "subject": {
     "type": "string",
     "description": "Document subject from metadata"
    }
   },
   "description": "Document metadata (PDF only)"
  },
  "text": {
   "type": "string",
   "description": "Extracted plain text content, up to 50,000 characters"
  },
  "chars": {
   "type": "integer",
   "description": "Total character count of the extracted text"
  },
  "pages": {
   "type": "integer",
   "description": "Total page count (PDF only)"
  },
  "format": {
   "enum": [
    "pdf",
    "docx",
    "text"
   ],
   "type": "string",
   "description": "Detected document format"
  },
  "extracted_at": {
   "type": "string",
   "format": "date-time",
   "description": "ISO 8601 timestamp of when the extraction was performed"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/extractpdf-pdf-docx-text-extraction-api-00eb2363/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.extractpdf.xyz](https://www.zero.xyz/host/www.extractpdf.xyz/llms.txt)
