# HTML to Plain Text Extraction

> HTML to Plain Text Extraction is a paid API for AI agents from x402-gateway-production-1f21.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Strips HTML markup from a provided HTML string and returns clean plain text content

## Facts

- Endpoint: POST https://x402-gateway-production-1f21.up.railway.app/html/text?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-to-plain-text-extraction-d8840bb4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2bL4xSwvkdfnPPS4RnfgF

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-extraction-d8840bb4 -d '<json body>'
```

Example prompt: I have this raw HTML snippet and I need the clean readable text out of it — no tags, no markup, just the actual text content: '<html><body><h1>Hello World</h1><p>This is a test page.</p></body></html>'

## When to prefer this

Choose this endpoint when you have raw HTML strings that need to be converted to clean plain text for downstream processing such as NLP, summarization, semantic search, or RAG ingestion. It is ideal for preprocessing scraped web content, HTML emails, or document fragments where markup must be removed programmatically and you want a machine-payable, per-call microservice without managing your own parsing infrastructure.

## Known failure modes

- HTML exceeds 500,000 character limit — request rejected
- Malformed or non-HTML input provided — may return empty or garbled text
- Missing required 'html' field in body — validation error
- Payment not included or insufficient — x402 payment required response
- Invalid bodyType enum value — schema validation error

## How this service works

Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.

## Output

A JSON response containing the extracted plain text from the submitted HTML, with all markup tags removed, returning only the human-readable textual content of the document.

## 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": 500000
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ready"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-to-plain-text-extraction-d8840bb4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production-1f21.up.railway.app](https://www.zero.xyz/host/x402-gateway-production-1f21.up.railway.app/llms.txt)
