HTML to Markdown
Try it interactively →POST /api/html-to-markdownConvert HTML to Markdown. Headings, lists, tables, blockquotes, links, and images are preserved; presentational tags collapse cleanly.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| html* | string | — | HTML source. |
| headingStyle | enum (atx | setext) | "atx" | `atx` (`# H1`) or `setext` (`H1\n===`). |
| bulletListMarker | enum (* | - | +) | "*" | Unordered list marker character. |
| codeBlockStyle | enum (fenced | indented) | "fenced" | Fenced (```) or 4-space indented code blocks. |
Response
Modes: json, text. Cache: yes (24h TTL).
Code samples
Built from the article example.
curl -X POST https://api.xtract.bot/api/html-to-markdown \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"html": "<h1>Hello</h1><p>This is <strong>bold</strong> and <em>italic</em>.</p><ul><li>One</li><li>Two</li><li>Three</li></ul>"
}'