# agent402.tools HTML Strip

> agent402.tools HTML Strip is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Strips all HTML tags from a raw HTML string and returns clean plain text, preserving paragraph and heading structure as newline-separated blocks.

## Facts

- Endpoint: POST https://agent402.tools/api/html-strip
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-html-strip-29e77ba8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dTsuBm_4Dw5Nlb6c02R8G

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-html-strip-29e77ba8 -d '<json body>'
```

Example prompt: Strip all the HTML tags from this string and give me just the readable text, keeping paragraphs and headings as separate lines: '<html><body><h1>Hello</h1><p>World</p></body></html>'

## When to prefer this

Use this endpoint when you already have a raw HTML string in memory and need fast, predictable tag stripping with structural preservation. It is faster and more deterministic than using a full web-extraction or scraping endpoint on a raw HTML string. Prefer this over general-purpose extract endpoints when you don't need content inference or AI summarization — just clean text.

## Known failure modes

- HTML string exceeds 5MB limit — request rejected
- Invalid CSS selector provided — selector parsing error returned
- Malformed or non-HTML input — may return empty string or partial output
- Network timeout for very large payloads near the size limit

## How this service works

Strip all HTML tags and return plain text. Preserves block-level structure (paragraphs and headings become newline-separated). Faster and more predictable than running extract on a raw HTML string when you already have it.

## Output

A plain text string with all HTML tags removed. Block-level elements like paragraphs and headings are preserved as newline-separated content, making the output structurally readable without any markup.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "description": "Raw HTML string to strip (max 5MB)"
  },
  "selector": {
   "type": "string",
   "description": "Optional CSS selector - strip only within this element (default: whole document)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Title\n\nFirst paragraph.\n\nSecond.",
  "chars": 30
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-html-strip-29e77ba8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
