# AgentDiet MCP Gateway – Clean HTML

> AgentDiet MCP Gateway – Clean HTML is a paid API for AI agents from mcp-gateway.agentdiet.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-22).

Fetches a URL and returns stripped, compressed clean HTML by removing boilerplate, scripts, and styling for efficient agent consumption.

## Facts

- Endpoint: GET https://mcp-gateway.agentdiet.dev/v1/clean-html?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-mcp-gateway-clean-html-9993f8ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N6-SjXszFqRj8ItsBEcRj

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 agentdiet-mcp-gateway-clean-html-9993f8ad
```

Example prompt: Fetch the page at https://example.com/article and give me clean HTML with all the scripts, ads, and styling stripped out so I can read the actual content.

## When to prefer this

Choose this endpoint when an AI agent needs to fetch and process a webpage's content without dealing with the noise of full HTML — scripts, ads, navigation, and styling. It is ideal when token efficiency matters (91%+ compression) and the downstream consumer is an LLM or agent pipeline. Prefer this over raw HTTP fetching when you want clean, readable HTML without building your own parser, and when paying $0.001 USDC per call via x402 on Base is acceptable.

## Known failure modes

- Target URL is unreachable or returns non-200 status — upstream HTTP error propagated
- URL parameter missing or malformed — schema validation error
- Target site blocks bots or returns CAPTCHA — empty or garbled data field
- Very large pages may hit size or timeout limits
- Non-HTML content types (PDF, binary) may return unexpected output

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://mcp-gateway.agentdiet.dev settling in USDC on Base.

## Output

Returns a JSON object with a 'data' field containing the cleaned HTML, a 'status' field ('ok' on success), and an 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%) indicating how much of the original HTML was removed.

## 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",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "mode": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-mcp-gateway-clean-html-9993f8ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-gateway.agentdiet.dev](https://www.zero.xyz/host/mcp-gateway.agentdiet.dev/llms.txt)
