Endpoint
POST https://hermes-passiv.pages.dev/api/clean-copy
No API key required. No sign-up. No rate limits (be reasonable — max 10 req/s).
Request
Send a JSON object with the HTML you want to convert:
| Field | Type | Default | Description |
|---|---|---|---|
html |
string | required | The HTML content to convert. Max 50 KB. |
mode |
string | "markdown" |
Either "markdown" or "plain" (strips all formatting, returns clean plain text). |
Response
| Field | Type | Description |
|---|---|---|
ok | boolean | true on success, false on error. |
markdown | string | null | The converted output. null on error. |
mode | string | Echoes the requested mode. |
input_chars | number | Length of input HTML in characters. |
output_chars | number | Length of output in characters. |
version | string | Converter engine version (matches the Chrome extension). |
error | string | null | Error message when ok is false. |
Example
Request
curl -s https://hermes-passiv.pages.dev/api/clean-copy \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello World</h1><p>This is <strong>bold</strong> and <em>italic</em>.</p>"}'
Response
{
"ok": true,
"markdown": "# Hello World\n\nThis is **bold** and *italic*.",
"mode": "markdown",
"input_chars": 83,
"output_chars": 44,
"version": "1.5.2"
}
Code examples
Python
import requests
def clean_copy(html, mode="markdown"):
r = requests.post(
"https://hermes-passiv.pages.dev/api/clean-copy",
json={"html": html, "mode": mode},
timeout=30,
)
data = r.json()
if not data.get("ok"):
raise ValueError(data.get("error"))
return data["markdown"]
JavaScript / TypeScript
async function cleanCopy(html, mode = "markdown") {
const res = await fetch(
"https://hermes-passiv.pages.dev/api/clean-copy",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ html, mode }),
}
);
const data = await res.json();
if (!data.ok) throw new Error(data.error);
return data.markdown;
}
Plain-text mode
curl -s https://hermes-passiv.pages.dev/api/clean-copy \
-H "Content-Type: application/json" \
-d '{"html": "<p>Some <b>bold</b> text</p>", "mode": "plain"}'
# {"ok": true, "markdown": "Some bold text", "mode": "plain", ...}
Try it live
Paste some HTML below and click Convert:
Usage guidelines
- Free for any use — personal, commercial, open-source. No attribution required.
- 50 KB max input per request. Need more? Use the web tool (runs entirely in your browser, no size limit).
- No SLA. This is a free side-project API. If you need reliability, run the CLI locally — same engine, zero dependencies.
- Future Pro tier (when Lemon Squeezy payment is set up): higher limits, custom cleanup rules, API key with usage tracking. No timeline yet.
- Privacy: The API does not log or store submitted HTML. Conversion happens server-side and the result is returned — no retention.
Install the real thing
The API is powered by the same engine as Clean Copy. Install it locally for zero-latency, offline-capable conversion:
- Chrome extension (or load unpacked from source) — right-click or Ctrl+Shift+C
- CLI —
brew tap mahope/clean-copy && brew install clean-copyornpx github:mahope/clean-copy-cli - Bookmarklet — works in any browser, no install
- Web tool — paste HTML, get Markdown. Runs in your browser.