# Tanod Docs PDF Extract Pages

> Tanod Docs PDF Extract Pages is a paid API for AI agents from docs.tanod.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-13).

Extracts specific pages from a PDF document and returns them as a new PDF file, either as base64 or a temporary download URL.

## Facts

- Endpoint: POST https://docs.tanod.dev/v1/pdf/extract-pages?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-docs-pdf-extract-pages-d60e9e55
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K7Jxh5KSRTQWE9DpA-jOc

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 tanod-docs-pdf-extract-pages-d60e9e55 -d '<json body>'
```

Example prompt: Can you extract pages 2 through 5 from this PDF — https://example.com/report.pdf — and give me a download link instead of the raw data?

## When to prefer this

Use this endpoint when you need to extract a specific subset of pages from a PDF into a new PDF document. It is ideal when you have a large PDF and only need certain pages — such as a signature page, a chapter, or a specific range — without converting the format. Prefer it over full-document conversion endpoints when you want a PDF output rather than Markdown, Word, or image formats.

## Known failure modes

- Invalid or inaccessible PDF URL (private/internal hosts refused, file over 20 MB)
- PDF base64 exceeds 10 MB decoded limit
- Invalid page range format (must match pattern of numbers, ranges, commas, 'last' keyword)
- PDF is corrupt or unreadable
- Neither url nor pdf_base64 provided
- Page numbers out of range for the document

## How this service works

Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.

## Output

Returns a JSON object containing the extracted PDF either as a base64-encoded string or a temporary download URL (valid 24 hours), along with metadata including file name, byte size, page count, content type, and SHA256 hash. Also reports input page count, input bytes, output bytes, and flags whether untrusted content was detected.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 2048,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Public http(s) URL of the PDF (at most 20 MB; private, internal and IP-literal hosts are refused); or use pdf_base64."
  },
  "pages": {
   "type": "string",
   "pattern": "^[0-9a-zA-Z ,\\-]+$",
   "maxLength": 200,
   "minLength": 1,
   "description": "1-based: N, N-M, N- (to the end), -M, last; comma separated, in this order."
  },
  "output": {
   "enum": [
    "base64",
    "url"
   ],
   "type": "string",
   "default": "base64",
   "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."
  },
  "pdf_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 13398872,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "The PDF as base64 (at most 10 MB decoded per request); or use url."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "file": {
   "name": "extracted.pdf",
   "bytes": 58827,
   "pages": 3,
   "data_base64": "JVBERi0xLjcKJb/3... (trimmed: 78,436 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "operation": "extract-pages",
  "input_bytes": 140815,
  "input_pages": 6,
  "output_bytes": 58827,
  "untrusted_content": true,
  "active_content_removed": {}
 }
}
```

## More

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