# AgentDiet URL-to-Markdown Converter

> AgentDiet URL-to-Markdown Converter 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 converts its web content to clean Markdown text, achieving ~91% compression ratio

## Facts

- Endpoint: GET https://mcp-gateway.agentdiet.dev/v1/url-to-markdown?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-url-to-markdown-converter-784fad8d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qM6vbcJdlUqqaFyuiNjB-

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-url-to-markdown-converter-784fad8d
```

Example prompt: Can you fetch the content at https://en.wikipedia.org/wiki/Artificial_intelligence and convert it to clean Markdown so I can read it?

## When to prefer this

Choose this endpoint when you need to fetch a public web URL and obtain its content as clean, LLM-friendly Markdown rather than raw HTML. It is ideal for feeding web content into AI pipelines, RAG systems, or agent context windows. Prefer this over generic scraping tools when you want a compression ratio metric and structured JSON response with Markdown output, paid per-call via USDC microtransaction.

## Known failure modes

- URL is unreachable or returns non-200 HTTP status — data may be empty or error returned
- URL points to non-HTML content (PDF, binary) — conversion quality may degrade
- Rate limiting or bot protection on target site — fetch may fail silently
- Malformed URL in query params — schema validation error
- Paywalled or login-gated content — only publicly accessible portion returned

## 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 'status' field ('ok'), a 'data' object containing the Markdown-converted content of the fetched URL, and an 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%), indicating how much the content was compressed relative to the original HTML.

## 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-url-to-markdown-converter-784fad8d/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)
