# HTML to Markdown Converter

> HTML to Markdown Converter is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Converts raw HTML or a fetched web page URL into clean Markdown, stripping boilerplate and preserving structure.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/html-to-markdown
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-2ad899e9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9-M1sY7CgyAi97gshEtdO

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 x402-deployer-x402-deployer-workers-dev-2ad899e9 -d '<json body>'
```

Example prompt: Fetch the article at https://example.com/blog/post-1 and convert it to clean Markdown — strip out nav, ads, and scripts so I can feed it into my LLM context window.

## When to prefer this

Use this endpoint when you need to convert a URL or raw HTML into clean, structured Markdown suitable for LLM context windows, RAG pipelines, or content archival — especially when you want boilerplate like nav, scripts, and ads automatically stripped while preserving headings, lists, tables, code blocks, links, and images.

## Known failure modes

- URL unreachable or returns non-200 status — fetch error returned
- Malformed HTML causes parser to produce minimal or empty Markdown
- Page is JavaScript-rendered and server-side fetch returns empty body
- Input is neither valid HTML nor a reachable URL — validation error
- Very large HTML documents may exceed processing limits

## How this service works

Convert HTML to Markdown. Strips nav, scripts, ads, and other boilerplate. Preserves headings, lists, tables, code blocks, links, and images. Accepts raw HTML or a URL — when given a URL the server fetches the page and runs the converter on the body. Returns clean Markdown plus title and char counts. Ideal for LLM context windows, RAG ingestion, and content archival.

## Output

Returns clean Markdown of the page or HTML content, along with the extracted page title and character counts for the raw and converted content.

## Example request

```json
{
 "input": {
  "body": {
   "html": "<html><head><title>Test Article</title></head><body><h1>Sample Article</h1><p>This is a test paragraph with some <strong>bold text</strong> and a <a href=\"https://example.com\">link to example</a>.</p><p>Here is another paragraph with an image: <img src=\"https://example.com/image.jpg\" alt=\"test image\"></p></body></html>",
   "include_links": true,
   "include_images": true
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-2ad899e9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
