Skip to content
Fourohtwo

agent402.tools/api/html-to-markdown

Convert an HTML fragment or document you already have into clean markdown. hiddenContent reports text a reader cannot see (HTML comments, display:none or hidden elements, white-on-white or off-screen text, zero-width characters) and quotes any of it that reads as an instruction to an AI; send hidden: "drop" to leave it out of the markdown. (To fetch + convert a live URL, use /api/extract.)

SolanaBaseUnchecked
POSThttps://agent402.tools/api/html-to-markdown

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agent402.tools/api/html-to-markdown", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"html":"<h1>Hi</h1><p><b>bold</b></p>"}),
});
console.log(await res.json());

Example input

{
  "html": "<h1>Hi</h1><p><b>bold</b></p>"
}