# HTML to Markdown Converter

> HTML to Markdown Converter is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Converts raw HTML content to clean markdown format, with optional base URL for resolving relative links

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/html-to-md?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-to-markdown-converter-44b41fbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IyWU5J1ktUn2OweWHWReO

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 html-to-markdown-converter-44b41fbc -d '<json body>'
```

Example prompt: I already have the raw HTML for this article — can you convert it to clean markdown? Here's the HTML: <html><body><h1>Hello</h1><p>World</p></body></html>

## When to prefer this

Use this endpoint when you already have the raw HTML string in memory and need it converted to markdown without any network fetch — it is faster and cheaper than endpoints that fetch URLs themselves. Prefer the free sandbox endpoint POST /v1/sandbox/html-to-md first; use this paid endpoint only when the sandbox is unavailable or rate-limited.

## Known failure modes

- Empty or missing html field returns an error (minLength:1 enforced)
- HTML exceeding 200,000 characters is rejected
- Malformed or unparseable HTML may produce degraded or partial markdown output
- Invalid or malformed base URL may cause relative link resolution to fail silently

## How this service works

Call when an agent already has HTML and needs clean markdown. No network. Optional url is a base for relative links only. Exact $0.002 USDC. Prefer unpaid POST /v1/sandbox/html-to-md first.

## Output

Returns clean markdown text derived from the provided HTML input, with relative links resolved against the optional base URL if supplied. No network requests are made; the conversion is purely local.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "examples": [
    "https://example.com/page"
   ],
   "maxLength": 2048,
   "description": "Optional base URL used only to resolve relative links. Omit it when the HTML has no relative URLs."
  },
  "html": {
   "type": "string",
   "examples": [
    "<h1>Hello</h1><p>World</p>"
   ],
   "maxLength": 200000,
   "minLength": 1,
   "description": "HTML document to convert to markdown. The handler does not fetch it."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-to-markdown-converter-44b41fbc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
