# agentsvc.io Document Parser

> agentsvc.io Document Parser is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.009/call, status unknown (last checked 2026-10-10).

Parses a document or web page (by URL, raw content, or base64 file) into structured markdown, metadata, and outline

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/doc-parse?utm_source=zero.xyz
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-document-parser-c8397e52
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GCdoup6bp3srHuPnfYrmZ

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 agentsvc-io-document-parser-c8397e52 -d '<json body>'
```

Example prompt: Parse this PDF for me — fetch it from https://example.com/report.pdf and give me the clean markdown text, title, author, and outline, up to 80000 characters.

## When to prefer this

Use this endpoint when you need to extract readable text, metadata, and structure from a document or web page in a single call without setting up an account or API key. It is ideal for agents that need to ingest PDF, HTML, or other documents on demand and receive clean markdown plus an outline. Prefer it over generic scrapers when you also need document metadata (author, date, language) and structural outline in addition to raw text.

## Known failure modes

- URL unreachable or returns non-200 status — parse fails or returns empty content
- Base64 file exceeds 10 MB limit — request rejected
- max_chars below 1000 or above 200000 — validation error
- Unsupported file format — parser may return empty or partial markdown
- Password-protected or paywalled document — content not accessible
- Malformed base64 string — decoding error

## How this service works

86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

Returns a JSON object with: document title, author, publication date, detected format (e.g. html, pdf), source URL, language code, an outline array of headings with levels, full markdown-rendered text content (up to max_chars), character count, word count, image count, table count, heading count, and a truncated flag if content was cut off.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string"
  },
  "from": {
   "type": "string"
  },
  "content": {
   "type": "string"
  },
  "max_chars": {
   "type": "integer",
   "default": 50000,
   "maximum": 200000,
   "minimum": 1000
  },
  "file_base64": {
   "type": "string",
   "description": "Document as base64 (max 10 MB)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "date": null,
   "title": "Docs: how agents pay per call with x402 · agentsvc.io",
   "author": null,
   "format": "html",
   "source": "https://agentsvc.io/docs",
   "outline": [
    {
     "text": "Pay per call. Nothing else to set up.",
     "level": 1
    },
    {
     "text": "Free trial, no wallet",
     "level": 2
    },
    {
     "text": "GET works too and uses the example input:",
     "level": 1
    }
   ],
   "language": "en",
   "markdown": "<div hidden=\"\">\n\n</div>\n\n<div style=\"border-bottom:1px solid var(--border);background-color:rgba(10, 14, 26, 0.92);backdrop-filter:blur(12px);position:sticky;top:0;z-index:50\">\n\n<div class=\"container\" style=\"display:flex;align-items:center;justify-content:space-between;min-height:60px;gap:1rem\">\n…",
   "truncated": true,
   "characters": 2000,
   "word_count": 8068,
   "image_count": 0,
   "table_count": 0,
   "heading_count": 8
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentsvc-io-document-parser-c8397e52/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
