Markdown to HTML API
This API provides high-speed conversion of Markdown syntax into sanitized HTML. It supports standard Markdown features including tables, code blocks, lists & more.
Endpoint
Section titled “Endpoint” POST
/api/v1/markdown Request Parameters
Section titled “Request Parameters”The following parameters are accepted in the request body:
| Field | Type | Required | Description |
|---|---|---|---|
markdown | string | Yes | The raw Markdown text to convert. |
Request Examples
Section titled “Request Examples”curl -X POST https://heavstal.com.ng/api/v1/markdown \-H "Content-Type: application/json" \-H "x-api-key: <YOUR_API_KEY>" \-d '{"markdown": "# Hello **World**"}'const response = await fetch('https://heavstal.com.ng/api/v1/markdown', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': '<YOUR_API_KEY>' }, body: JSON.stringify({ markdown: '# Hello **World**' })});
const res = await response.json();console.log(res.data.html);import { tools } from '@heavstal/api';
const html = await tools.markdownToHtml("# Hello **World**");console.log(html.data.html);// Outputs: <h1>Hello <strong>World</strong></h1>import requests
url = "https://heavstal.com.ng/api/v1/markdown"headers = { "Content-Type": "application/json", "x-api-key": "<YOUR_API_KEY>"}payload = { "markdown": "# Hello **World**"}
response = requests.post(url, headers=headers, json=payload)print(response.json()["data"]["html"])Response Examples
Section titled “Response Examples”{ "status": "success", "creator": "HEAVSTAL TECH", "data": { "html": "<h1>Hello <strong>World</strong></h1>\n" }}{ "status": "error", "error": "Missing required 'markdown' field."}