# 24K Labs HTML to Markdown Converter

> 24K Labs HTML to Markdown Converter is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Converts a supplied HTML string to clean Markdown by stripping noise (scripts, styles, nav) and preserving semantic structure like headings, bold, italic, links, lists, code, and blockquotes.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/html-to-markdown
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-html-to-markdown-converter-e2753794
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v90axv__jIjlfaC6P_a-E

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 24k-labs-html-to-markdown-converter-e2753794 -d '<json body>'
```

Example prompt: Take this HTML string I have and convert it to clean Markdown — strip out any scripts, styles, and navigation elements but keep the headings, links, lists, and code blocks intact: `<h1>Hello</h1><p>World <a href='https://example.com'>link</a></p>`

## When to prefer this

Use this endpoint when you already have an HTML string in memory and need a server-side, deterministic conversion to Markdown without fetching any URLs. Prefer it over browser-based or local parsing when you want consistent noise-stripping (scripts, styles, nav) applied automatically. It is especially useful for LLM context preparation, note-taking pipelines, and Markdown-first storage workflows where clean formatting fidelity matters.

## Known failure modes

- Empty or missing HTML input body returns an error
- Malformed or non-HTML input may produce garbled or empty markdown
- Extremely large HTML payloads may time out or be rejected
- HTML with only scripts/styles and no semantic content may return an empty string

## How this service works

Convert a supplied HTML string to clean Markdown: strips scripts/style/nav, preserves headings, bold, italic, links, lists, code, and blockquotes. No fetch.

## Output

Returns the converted Markdown string with semantic formatting preserved (headings, bold, italic, links, lists, code blocks, blockquotes) and noise removed (scripts, styles, navigation elements). No HTTP fetching is performed — only the supplied HTML string is processed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "markdown": "# Title\n\nHello **world** and [link](http://x.io).\n\n- one\n- two"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-html-to-markdown-converter-e2753794/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
