# HTML to Markdown Converter

> HTML to Markdown Converter is a paid API for AI agents from x402-gateway-production-1f21.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Converts raw HTML content into clean Markdown format via a machine-payable x402 POST endpoint

## Facts

- Endpoint: POST https://x402-gateway-production-1f21.up.railway.app/html/markdown?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-to-markdown-converter-85e7f4f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fYZ-A1gABMeww6Z_UxB0m

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-85e7f4f6 -d '<json body>'
```

Example prompt: Convert this HTML into clean Markdown — here's the raw HTML: '<html><body><h1>Hello World</h1><p>This is a test page.</p></body></html>' — and cap the output at 5000 characters.

## When to prefer this

Use this endpoint when you have raw HTML strings (e.g. from web scraping) and need clean Markdown output for LLM ingestion, RAG pipelines, or readable document storage. Prefer this over URL-based scrapers when you already have the HTML in memory and don't need a fresh fetch. The x402 micropayment model at $0.001 USDC makes it cost-efficient for high-volume document processing workflows.

## Known failure modes

- HTML exceeds 500,000 character limit — request rejected
- max_chars below 100 or above 250,000 — validation error
- Malformed or invalid JSON body — 400 error
- Payment not included or insufficient — x402 payment required response
- Empty or missing html field — required field validation error

## How this service works

Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.

## Output

Returns a JSON object with status and the converted Markdown text extracted from the submitted HTML, optionally truncated to the specified max_chars limit.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "html"
     ],
     "properties": {
      "html": {
       "type": "string",
       "maxLength": 500000
      },
      "max_chars": {
       "type": "integer",
       "maximum": 250000,
       "minimum": 100
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ready"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-to-markdown-converter-85e7f4f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production-1f21.up.railway.app](https://www.zero.xyz/host/x402-gateway-production-1f21.up.railway.app/llms.txt)
