# Web URL Markdown Distiller

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

Fetches a web URL and compresses it into compact, agent-ready tokens using multiple extraction modes including markdown, structured JSON, skeleton outline, or BM25-focused budget excerpts.

## Facts

- Endpoint: GET https://json-repair.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: json-repair.agentdiet.dev
- Website: https://json-repair.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/json-repair-agentdiet-dev-web-url-markdown-distiller-6f73d76a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RxBPHVotHkWxydrFHdoCS

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 json-repair-agentdiet-dev-web-url-markdown-distiller-6f73d76a
```

Example prompt: Can you distill https://stripe.com/docs/payments into compact markdown — I want to save as many tokens as possible so use budget mode with a max of 500 tokens and focus on 'payment intents'.

## When to prefer this

Choose this endpoint when an AI agent needs to read a live webpage but must minimize token consumption — especially when the target page is long, documentation-heavy, or when you have a strict context budget. The budget mode with BM25 query filtering is particularly valuable for focused information retrieval. Prefer over generic scrapers when you need ROI proof of token savings or want structured/skeleton extraction modes.

## Known failure modes

- Invalid or unreachable URL returns an error status
- URL blocked by robots.txt or paywalls may return empty or partial content
- budget mode without a query or max_tokens may return default-sized output
- max_tokens set below 20 is rejected by schema validation
- Rate limits or payment failures via x402 may block the request
- Dynamic JavaScript-heavy pages may not render fully

## How this service works

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

## Output

Returns a 'data' object containing the distilled content (markdown text, structured JSON tables/metadata, skeleton headers, or BM25 excerpt depending on mode), plus an 'roi_proof' block showing raw vs. distilled token counts, compression ratio percentage, tokens saved, estimated LLM cost saved in USD, and an ROI multiplier. Also includes cache status (HIT/MISS), billing info, and execution status.

## 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/json-repair-agentdiet-dev-web-url-markdown-distiller-6f73d76a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from json-repair.agentdiet.dev](https://www.zero.xyz/host/json-repair.agentdiet.dev/llms.txt)
