# Web URL Markdown Distiller

> Web URL Markdown Distiller is a paid API for AI agents from mcp-compiler.agentdiet.dev, paid per call via MPP, $0.001/call, status unknown (last checked 2026-10-21).

Fetches a webpage and distills it into compact, token-efficient agent-ready content in markdown, structured, skeleton, or BM25-budget-focused modes.

## Facts

- Endpoint: GET https://mcp-compiler.agentdiet.dev/v1/markdown-distill?utm_source=zero.xyz
- Price: $0.001/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: mcp-compiler.agentdiet.dev
- Website: https://mcp-compiler.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/mcp-compiler-agentdiet-dev-web-url-markdown-distiller-9c3f1390
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ul0dftgiE_-IqDaXDlwRM

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 mcp-compiler-agentdiet-dev-web-url-markdown-distiller-9c3f1390
```

Example prompt: Can you distill https://docs.stripe.com/payments/accept-a-payment into compact markdown so I can read it without burning through too many tokens — use budget mode focused on 'payment intents' and cap it at 500 tokens?

## When to prefer this

Choose this endpoint when an agent needs to read or process a webpage but token budget is a concern — especially in multi-step pipelines where injecting raw HTML or full page markdown would be too expensive. It is purpose-built for agent workflows, returning ROI metrics alongside content, and supports multiple extraction modes (full markdown, structured tables, document skeleton, or BM25-focused budget excerpts) making it more versatile than a plain web scraper. Prefer it over generic scraping tools when you need token-efficient, clean, agent-ready output with built-in compression telemetry.

## Known failure modes

- Invalid or unreachable URL — endpoint cannot fetch the page and returns an error status
- URL returns non-HTML content (e.g. binary file) — distillation may fail or return empty data
- max_tokens too low (below 20) — rejected by schema validation
- BM25 query provided without mode=budget — query parameter may be ignored
- Paywalled or JavaScript-heavy pages — content may be incomplete or empty
- Payment not included or insufficient — HTTP 402 returned requiring x402 micropayment

## How this service works

Distill a web URL into compact agent-ready tokens (Live x402 v2, IETF MPP & MCP endpoint at https://mcp-compiler.agentdiet.dev/v1/markdown-distill)

## Output

Returns a data object containing distilled page content in the requested mode (markdown, structured JSON tables/metadata, skeleton outline, or BM25-focused budget excerpt), plus an roi_proof block showing raw vs. distilled token counts, compression ratio, tokens saved, and estimated LLM cost saved. Also includes optional cache status and billing details.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "minLength": 1,
   "description": "Target webpage URL to distill (or builtin://stripe-docs)"
  },
  "mode": {
   "enum": [
    "markdown",
    "structured",
    "skeleton",
    "budget"
   ],
   "type": "string",
   "default": "markdown",
   "description": "Extraction mode: markdown, structured, skeleton, or budget"
  },
  "query": {
   "type": "string",
   "description": "BM25 focus query when mode=budget"
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 20,
   "description": "Strict token ceiling when mode=budget"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "roi_proof",
  "data"
 ],
 "properties": {
  "data": {
   "type": "object",
   "description": "Distilled Markdown, structured JSON tables/metadata, skeleton outline, or BM25 budget excerpt."
  },
  "cache": {
   "type": "object",
   "properties": {
    "status": {
     "enum": [
      "HIT",
      "MISS"
     ],
     "type": "string"
    },
    "cache_key": {
     "type": "string"
    },
    "latency_ms": {
     "type": "number"
    }
   }
  },
  "status": {
   "type": "string",
   "description": "Execution status ('ok')"
  },
  "billing": {
   "type": "object",
   "properties": {
    "agent_id": {
     "type": "string"
    },
    "payment_method": {
     "type": "string"
    },
    "fee_charged_usd": {
     "type": "number"
    }
   }
  },
  "roi_proof": {
   "type": "object",
   "properties": {
    "raw_tokens": {
     "type": "integer"
    },
    "tokens_saved": {
     "type": "integer"
    },
    "roi_multiplier": {
     "type": "number"
    },
    "distilled_tokens": {
     "type": "integer"
    },
    "llm_cost_saved_usd": {
     "type": "number"
    },
    "compression_ratio_pct": {
     "type": "number"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mcp-compiler-agentdiet-dev-web-url-markdown-distiller-9c3f1390/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-compiler.agentdiet.dev](https://www.zero.xyz/host/mcp-compiler.agentdiet.dev/llms.txt)
