# agent402.tools PDF Extract Pages

> agent402.tools PDF Extract Pages is a paid API for AI agents from agent402.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Extracts a specified subset of pages from a remote PDF and returns the result as a base64-encoded PDF.

## Facts

- Endpoint: POST https://agent402.tools/api/pdf-extract-pages
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-pdf-extract-pages-ee809f19
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_adv_FHer-f-JfesUyPNq4

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 agent402-tools-pdf-extract-pages-ee809f19 -d '<json body>'
```

Example prompt: Can you pull out pages 1-3 and page 5 from this PDF — https://example.com/report.pdf — and give me the result as a new PDF?

## When to prefer this

Choose this endpoint when you need to programmatically extract a specific set of pages from a remotely hosted PDF and receive the result as base64 — ideal for document splitting, report subsetting, or isolating chapters without downloading and processing the entire file locally.

## Known failure modes

- Invalid or inaccessible PDF URL returns an error
- Malformed page selector string (e.g. non-numeric or out-of-range pages) returns an error
- Requested pages exceed total page count of the document
- PDF is password-protected or encrypted and cannot be read
- Network timeout fetching the remote PDF

## How this service works

Pull a subset of pages into a new PDF (split). Body: {"url":"https://…/file.pdf","pages":"1-3,5"}. Returns the new PDF as base64.

## Output

A base64-encoded string representing a new PDF file containing only the requested pages, ready to be decoded and saved or forwarded.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "Public URL of the PDF"
  },
  "pages": {
   "type": "string",
   "description": "Page selector, 1-based, e.g. \"1-3,5,8-10\""
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 12044,
  "pages": 2,
  "pdfBase64": "JVBERi0xLjcK…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-pdf-extract-pages-ee809f19/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
