FREE API

Clean Copy API

POST HTML, get clean Markdown back.
Same engine as the Chrome extension, the CLI, and the web tool.

Try it ↓ About Clean Copy → Web tool →

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:

FieldTypeDefaultDescription
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

FieldTypeDescription
okbooleantrue on success, false on error.
markdownstring | nullThe converted output. null on error.
modestringEchoes the requested mode.
input_charsnumberLength of input HTML in characters.
output_charsnumberLength of output in characters.
versionstringConverter engine version (matches the Chrome extension).
errorstring | nullError 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

Install the real thing

The API is powered by the same engine as Clean Copy. Install it locally for zero-latency, offline-capable conversion: