# well-004-html-to-markdown

> well-004-html-to-markdown is a paid API for AI agents from well-004-html-to-markdown.rainmaker-wells.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-23).

Converts HTML content (provided directly or fetched from a public URL) into clean, tidy Markdown text

## Facts

- Endpoint: POST https://well-004-html-to-markdown.rainmaker-wells.workers.dev/api/html-to-markdown?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/well-004-html-to-markdown-bfe3bf3d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1fu36nLij2ZNL15UjcTR2

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 well-004-html-to-markdown-bfe3bf3d -d '<json body>'
```

Example prompt: Can you fetch https://en.wikipedia.org/wiki/Markdown and convert that page's HTML into clean markdown for me?

## When to prefer this

Use this endpoint when you need a quick, paid-per-call HTML-to-Markdown conversion without managing your own parser or headless browser. It is ideal when you want to both fetch a public HTTPS page and convert it in a single step, or when you already have an HTML string and need clean markdown output. Prefer this over generic scraping endpoints when your goal is specifically a structured markdown document, not raw HTML extraction or structured data parsing.

## Known failure modes

- Non-HTTPS URLs (http, file, data, localhost, private IPs) are rejected outright
- Fetched page body exceeds 1 MB limit — request fails
- URL fetch times out after ~10 seconds
- More than 5 redirects encountered during URL fetch
- Neither html nor url provided — request fails with error
- Malformed or unparseable HTML may yield incomplete or garbled markdown
- Both html and url provided — html is used and a warning is returned

## How this service works

Convert HTML to tidy markdown ($0.005 USDC via x402). Pass html (string) and/or url (public https to fetch). At least one required; if both, prefers html and warns. URL fetches use the same allowlist as WELL-002 (https only — http/file/data/localhost/private IPs rejected; 1 MB body, ~10s timeout, max 5 redirects). Returns JSON { source, url?, final_url?, content_type?, markdown, warnings }. Provided as is, with no warranty or guarantee of accuracy or fitness. Nothing is stored.

## Output

A JSON object containing: 'source' (whether input was 'html' or 'url'), optionally 'url' and 'final_url' (if a URL was fetched, including after redirects), 'content_type' (MIME type of fetched content), 'markdown' (the converted Markdown string), and 'warnings' (any advisory messages, e.g. if both html and url were provided).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "https URL to fetch HTML from and convert. http/file/data/localhost/private IPs rejected."
  },
  "html": {
   "type": "string",
   "description": "HTML string to convert to markdown. Preferred when both html and url are set."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/well-004-html-to-markdown-bfe3bf3d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from well-004-html-to-markdown.rainmaker-wells.workers.dev](https://www.zero.xyz/host/well-004-html-to-markdown.rainmaker-wells.workers.dev/llms.txt)
