Skip to content
Fourohtwo

Strip all HTML tags and return plain text

agent402.tools/api/html-strip

Strip all HTML tags and return plain text. Preserves block-level structure (paragraphs and headings become newline-separated). 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.

SolanaBaseAnswering
POSThttps://agent402.tools/api/html-strip

Uptime100% of 1 check in 30 days

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

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/html-strip", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"html":"<h1>Title</h1><p>First paragraph.</p><p>Second.</p>"}),
});
console.log(await res.json());

Example input

{
  "html": "<h1>Title</h1><p>First paragraph.</p><p>Second.</p>"
}