# AgentWork PDF Info

> AgentWork PDF Info is a paid API for AI agents from api.agentwork.run, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Returns metadata about a PDF at a given URL — page count, version, encryption status, font presence, and text extractability — without downloading or parsing the full file.

## Facts

- Endpoint: GET https://api.agentwork.run/v1/pdf/info?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentwork-pdf-info-5618e484
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bTfGDpCV9TJ6ZrtjTjRc3

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-info-5618e484
```

Example prompt: Before we extract the text, can you check this PDF URL — https://example.com/report.pdf — to see if it's a valid PDF, how many pages it has, whether it's encrypted, and whether it actually contains extractable text?

## When to prefer this

Use this endpoint when you need to validate or triage a PDF URL before committing to a heavier extraction operation. It is ideal as a pre-flight check in document processing pipelines to filter out encrypted, non-PDF, or text-free documents cheaply at $0.001 per call. Prefer this over directly calling a full PDF-to-text extractor when you are unsure of the document's validity, page count, or text content. Does not require an API key — uses x402 USDC micropayment on Base.

## Known failure modes

- URL is not reachable or returns a non-2xx status — ok: false with reasons array populated
- URL points to a non-PDF file — is_pdf: false
- PDF is encrypted — encrypted: true, pdf_read_eligible likely false
- Network timeout fetching PDF headers — error response with timeout indication
- Malformed or non-URI URL input — validation error before payment is settled

## How this service works

Web read / URL to markdown (batch, JavaScript rendering), PDF text extraction, website change monitoring, prompt-injection check and sanctions screening for agents. From $0.001 per call on Base. x402 USDC, no API key.

## Output

Returns a JSON object with: ok (boolean), bytes (file size), is_pdf (boolean), encrypted (boolean), has_fonts (boolean), page_count (integer), pdf_version (string), likely_has_text (boolean), pdf_read_eligible (boolean), and reasons (array of strings explaining any flags). Allows agents to gate downstream PDF processing decisions without fetching the full document.

## 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",
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "maxLength": 2048
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "bytes": 13264,
  "is_pdf": true,
  "reasons": [],
  "encrypted": false,
  "has_fonts": true,
  "page_count": 1,
  "pdf_version": "1.4",
  "likely_has_text": true,
  "pdf_read_eligible": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentwork-pdf-info-5618e484/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)
