HTML to Markdown API
Strip scripts, navigation chrome, ads, and cookie banners from raw HTML to produce deterministic, LLM-ready Markdown with calibrated token counts.
Why engineering teams use EdgeDocAPI
- Deterministic boilerplate & XSS removal (<script>, <iframe>, <nav>, <footer>, ads)
- Preserves headings, fenced code blocks with language hints, lists, and GFM tables
- Zero-retention processing in ephemeral Cloudflare Workers memory
Copy-Paste Integration (/v1/url-to-markdown)
curl -X POST https://api.docopsapi.com/v1/url-to-markdown \
-H "Authorization: Bearer edk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"html":"<article><h1>Release Notes</h1><p>EdgeDocAPI converts <strong>HTML</strong> cleanly.</p></article>","include_links":true}'import requests
resp = requests.post(
"https://api.docopsapi.com/v1/url-to-markdown",
headers={"Authorization": "Bearer edk_live_YOUR_API_KEY"},
json={
"html": "<article><h1>Release Notes</h1><p>EdgeDocAPI converts <strong>HTML</strong> cleanly.</p></article>",
"include_links": true
},
timeout=15,
)
resp.raise_for_status()
print(resp.json())const res = await fetch("https://api.docopsapi.com/v1/url-to-markdown", {
method: "POST",
headers: {
"Authorization": "Bearer edk_live_YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"html": "<article><h1>Release Notes</h1><p>EdgeDocAPI converts <strong>HTML</strong> cleanly.</p></article>",
"include_links": true
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);