# 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-12-02).

Extracts plain text from publicly accessible PDF or DOCX documents, returning character count, page count, format, and timestamp for $0.01 USDC per call with no account required.

## Facts

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

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

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

## When to prefer this

Choose this endpoint when you need to programmatically extract plain text from a PDF or DOCX document available at a public URL, with no account setup or API key management. It is especially suited for AI agent pipelines that encounter document URLs dynamically and need fast, cheap, pay-per-use access ($0.01 USDC per call) without committing to a subscription. Prefer it over general-purpose scraping APIs when the target is specifically a PDF or DOCX file rather than an HTML webpage.

## Known failure modes

- URL is not publicly accessible or returns a non-200 response — extraction fails with an error
- URL points to a file that is not a PDF or DOCX — unsupported format error
- Password-protected or encrypted PDF — text cannot be extracted
- Scanned PDF with no embedded text layer (image-only) — returns empty or minimal text
- Network timeout reaching the remote document URL — extraction fails
- Malformed or corrupted document file — parsing error returned

## How this service works

Pay-per-use PDF and DOCX text extraction API for AI agents. $0.01 USDC per call. No API key, no account, no subscription.

## Output

Returns a JSON object containing the full extracted plain text, character count, page count (for PDFs), the detected format (pdf, docx, or text), the source URL, 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"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text",
  "chars",
  "format",
  "extracted_at"
 ],
 "properties": {
  "url": {
   "type": "string"
  },
  "text": {
   "type": "string"
  },
  "chars": {
   "type": "integer"
  },
  "pages": {
   "type": "integer"
  },
  "format": {
   "enum": [
    "pdf",
    "docx",
    "text"
   ],
   "type": "string"
  },
  "extracted_at": {
   "type": "string",
   "format": "date-time"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/extractpdf-pdf-docx-text-extraction-api-e29a172a/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)
