# AgentDiet Clean HTML — Context Window HTML De-Bloater

> AgentDiet Clean HTML — Context Window HTML De-Bloater is a paid API for AI agents from status.agentdiet.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-22).

Fetches a URL and strips HTML down to essential content, achieving up to 91%+ token compression for AI context windows

## Facts

- Endpoint: GET https://status.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-clean-html-context-window-html-de-bloater-b84f0699
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dhee5he5VeDyXop-W81jf

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-clean-html-context-window-html-de-bloater-b84f0699
```

Example prompt: Can you fetch https://example.com/article and strip out all the HTML noise so I only get the clean readable content — I need it compressed as much as possible to fit in my context window?

## When to prefer this

Choose this endpoint when an AI agent needs to fetch and process web content but token cost is a concern — it is purpose-built for context window optimization, delivering up to 91%+ compression. Prefer it over raw HTML fetching or generic web scrapers when feeding content to LLMs, building RAG pipelines, or summarizing articles. It is especially useful in A2A and MCP workflows where multiple pages need to be ingested cheaply. The $0.001 USDC per call micropayment via x402 makes it cost-effective at scale.

## Known failure modes

- Target URL is unreachable or returns a non-200 status — endpoint may return an error status
- URL parameter is missing or malformed — request rejected
- Target page is JavaScript-rendered and content is not available in static HTML — output may be sparse
- Rate limiting or payment failure via x402/L402 — call not processed
- Target URL returns non-HTML content (PDF, binary) — cleaning may fail or return empty data

## How this service works

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

## Output

Returns a JSON object with a `data` field containing the cleaned/compressed content, a `status` field ('ok'), and a `roi_proof` object including `compression_ratio_pct` showing the percentage of tokens removed (e.g. 91.4%).

## 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-clean-html-context-window-html-de-bloater-b84f0699/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from status.agentdiet.dev](https://www.zero.xyz/host/status.agentdiet.dev/llms.txt)
