# NetIntel Markdown Cleaner

> NetIntel Markdown Cleaner is a paid API for AI agents from netintel-production-440c.up.railway.app, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-13).

Cleans and sanitizes raw markdown text, removing noise and computing a quality grade and reduction ratio

## Facts

- Endpoint: POST https://netintel-production-440c.up.railway.app/markdown/clean
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/netintel-markdown-cleaner-6a98dd05
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Yr10dl9-ApJykApFFjP71

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 netintel-markdown-cleaner-6a98dd05 -d '<json body>'
```

Example prompt: Can you clean up this messy markdown for me and tell me how much it was reduced and what quality grade it gets? Here's the raw text: '# My Doc

Hello [world](https://example.com).

<div>some html junk</div>'

## When to prefer this

Use this endpoint when you need to programmatically clean, sanitize, or assess the quality of markdown text — especially markdown scraped from the web or generated by AI that may contain HTML noise, redundant whitespace, or structural issues. Prefer this over generic text-cleaning tools when you specifically need markdown-aware processing with a quality grade and reduction metrics.

## Known failure modes

- Missing or empty markdown body returns an error
- Malformed POST body results in a 400-level response
- Payment not included or insufficient USDC triggers a 402 Payment Required response
- Extremely large inputs may time out or be rejected
- Non-markdown or binary input may return low scores or unexpected findings

## How this service works

Convert messy HTML or text into clean, well-structured Markdown using Claude Haiku — strips boilerplate, fixes heading hierarchy, normalizes lists and links, and returns readable Markdown so agents can feed clean docs into downstream pipelines, knowledge bases, or LLM context.

## Output

Returns a JSON object with: the cleaned markdown string, a letter grade (e.g. 'A'), a numeric score (0-100), a boolean indicating if the result was cached, an array of findings (issues detected), and character counts for input and output along with a reduction ratio (e.g. 0.64 meaning 64% reduction).

## 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": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "The messy HTML or text to convert into clean Markdown. Max 10000 words or 50KB. Aliases also accepted: html, content, markdown, input."
      }
     }
    },
    "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",
     "properties": {
      "grade": {
       "type": "string",
       "description": "Letter grade A-F"
      },
      "score": {
       "type": "number",
       "description": "Quality score 0-100"
      },
      "cached": {
       "type": "boolean",
       "description": "True if served from the in-memory cache."
      },
      "findings": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Informational findings (e.g. empty_output)."
      },
      "markdown": {
       "type": "string",
       "description": "The cleaned, well-structured GitHub-flavored Markdown."
      },
      "input_chars": {
       "type": "number",
       "description": "Character count of the input."
      },
      "output_chars": {
       "type": "number",
       "description": "Character count of the cleaned markdown."
      },
      "reduction_ratio": {
       "type": "number",
       "description": "1 - (output_chars / input_chars), rounded to 2dp — how much boilerplate was stripped (informational)."
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "grade": "A",
  "score": 100,
  "cached": false,
  "findings": [],
  "markdown": "# Welcome\n\nHello [world](https://example.com).\n",
  "input_chars": 108,
  "output_chars": 39,
  "reduction_ratio": 0.64
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/netintel-markdown-cleaner-6a98dd05/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from netintel-production-440c.up.railway.app](https://www.zero.xyz/host/netintel-production-440c.up.railway.app/llms.txt)
