# HTML to Plain Text Converter

> HTML to Plain Text Converter is a paid API for AI agents from markup-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Converts raw HTML into clean, readable plain text, preserving paragraphs, lists, table rows, and link text while stripping scripts, styles, and hidden elements.

## Facts

- Endpoint: GET https://markup-tools.x402tookit.com/html-to-text?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-to-plain-text-converter-4fdde0ec
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_upM_dV8kGSj8P-mFxE_5Q

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-to-plain-text-converter-4fdde0ec
```

Example prompt: Take this HTML and convert it to plain text, keeping the paragraphs and list structure but dropping all the scripts and styling — also append each link's URL after its link text: <html><body><h1>Hello</h1><ul><li><a href='/about'>About</a></li></ul></body></html>

## When to prefer this

Choose this endpoint when you need a fast, structure-preserving HTML-to-text conversion that explicitly reports dropped hidden elements, link counts, and image counts. Prefer it over generic regex-based stripping when you need paragraph and list fidelity, or when downstream processing requires auditable metadata about what was removed.

## Known failure modes

- HTML input exceeds 20,000 characters — returns HTTP 400
- Missing required 'html' query parameter — returns HTTP 400
- Malformed or non-UTF-8 HTML may produce garbled text output
- Very large inline scripts or styles may inflate hidden element reporting

## How this service works

Turn supplied HTML into readable text: keeps paragraphs, lists, table rows and link text; drops script, style, hidden.

## Output

Returns a JSON object containing the extracted plain text, character count, link count, image count, a flag indicating whether the parser truncated the input, and an array of hidden elements that were dropped (each with tag, text, and reason).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "html"
     ],
     "properties": {
      "base": {
       "type": "string",
       "description": "Optional absolute http(s) URL used to resolve relative links when links=true"
      },
      "html": {
       "type": "string",
       "description": "HTML to convert, up to 20000 characters (the URL query string limits practical size; longer is refused with 400)"
      },
      "links": {
       "type": "boolean",
       "description": "true to append each link's URL after its text (default false)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "text": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "linkCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "imageCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "characterCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "hiddenElements": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-to-plain-text-converter-4fdde0ec/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from markup-tools.x402tookit.com](https://www.zero.xyz/host/markup-tools.x402tookit.com/llms.txt)
