# AgentWork PDF Text Extraction

> AgentWork PDF Text Extraction is a paid API for AI agents from api.agentwork.run, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Extracts embedded text from a public PDF URL into page-numbered JSON, including SHA-256 hashes and warnings, for RAG pipelines and document ingestion.

## Facts

- Endpoint: POST https://api.agentwork.run/v1/pdf/read
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentwork-pdf-text-extraction-ba251fbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y6o9pQPEpw5tWK87iHqrU

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 agentwork-pdf-text-extraction-ba251fbc -d '<json body>'
```

Example prompt: Can you extract all the text from this PDF — https://example.com/report.pdf — and give it back to me organized by page number so I can index it for search?

## When to prefer this

Choose this endpoint when you need reliable, page-numbered plain-text extraction from a digitally-created (not scanned) public PDF for downstream RAG, search indexing, or document analysis. It is ideal when you need SHA-256 hashes for deduplication or change detection, and when you do not need OCR, table reconstruction, or image understanding. Prefer this over general web scrapers when your source is specifically a PDF file.

## Known failure modes

- PDF is password-protected — extraction fails and no charge is made
- URL is not publicly accessible or requires authentication — request rejected
- PDF contains only scanned images with no embedded text — returns empty or near-empty pages with warnings
- Document exceeds 20 pages, 5 MiB, or 100,000 characters — content is truncated with a warning
- URL points to a non-PDF resource — extraction fails
- Network timeout or unreachable URL — extraction fails with no settlement

## How this service works

Web reads and change checks: $0.005 on Base, $0.01 on Algorand; digital PDF-to-text $0.01. Structured JSON, hashes and x402 USDC. No API key.

## Output

A JSON object with ok status, the full extracted text as a single string, an array of page objects each containing page number, page text, and character count, plus page_count, ocr_performed flag (always false), source and text SHA-256 hashes, and a warnings array flagging empty pages or truncation if the document exceeds 20 pages, 5 MiB, or 100,000 characters.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "maxLength": 2048,
   "description": "Public HTTP/HTTPS URL to a digital PDF; no credentials or private addresses."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "text": "Dummy PDF file",
  "pages": [
   {
    "page": 1,
    "text": "Dummy PDF file",
    "characters": 14
   }
  ],
  "warnings": [
   "Embedded text only; images and table structure are not extracted."
  ],
  "page_count": 1,
  "ocr_performed": false
 }
}
```

## More

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