# HTML Sanitizer by OpenVerbs

> HTML Sanitizer by OpenVerbs is a paid API for AI agents from html.openverbs.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Sanitizes untrusted HTML by stripping dangerous scripting tags, inline event handlers, and unsafe URL schemes while preserving safe formatting and links

## Facts

- Endpoint: POST https://html.openverbs.com/v1/sanitize
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-sanitizer-by-openverbs-476e3c5d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Xd5be3_E5iHPBIhkFTBPu

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 html-sanitizer-by-openverbs-476e3c5d -d '<json body>'
```

Example prompt: Sanitize this HTML from a user comment before I render it on the page — strip out any script tags, event handlers, or unsafe URLs but keep the formatting and links intact: '<b>Hello</b><script>alert(1)</script><a href="javascript:evil()">click me</a>'

## When to prefer this

Choose this endpoint when you need to render user-supplied or third-party HTML in a browser or application and want to prevent XSS attacks without writing your own allowlist logic. It is ideal for user-generated content pipelines (comments, forum posts, rich text editors) where you want to preserve safe formatting while removing all scripting vectors. Prefer this over client-side sanitization libraries when you need server-side guarantees or are processing HTML in a backend agent workflow.

## Known failure modes

- HTML input exceeds 200,000 character limit — request rejected
- Missing required 'html' field in request body — validation error
- Malformed JSON body — parse error
- Payment not provided or insufficient — 402 Payment Required
- Network timeout for very large HTML documents near the size limit

## How this service works

Sanitize untrusted HTML to a safe allowlist. Keeps common formatting and links but removes dangerous scripting tags, inline event handlers and unsafe URL schemes. Ideal for rendering user-supplied HTML.

## Output

Returns sanitized HTML with dangerous elements removed — script tags, inline event handlers (onclick, onerror, onload, etc.), and unsafe URL schemes (javascript:, data: in hrefs) are stripped, while safe structural and formatting tags (p, b, i, a with safe hrefs, ul, li, etc.) are preserved.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "html"
     ],
     "properties": {
      "html": {
       "type": "string",
       "maxLength": 200000,
       "description": "Untrusted HTML to sanitize."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-sanitizer-by-openverbs-476e3c5d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from html.openverbs.com](https://www.zero.xyz/host/html.openverbs.com/llms.txt)
