# RAG-Diet URL to Markdown Converter

> RAG-Diet URL to Markdown Converter is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-22).

Fetches a web page by URL and converts it to clean, LLM-ready Markdown by stripping 85-97% of HTML/DOM boilerplate

## Facts

- Endpoint: GET https://rag-diet.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/rag-diet-url-to-markdown-converter-6caa717c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qa1jYJef2CyQDfYGZew1F

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 rag-diet-url-to-markdown-converter-6caa717c
```

Example prompt: Fetch the page at https://en.wikipedia.org/wiki/Retrieval-augmented_generation and convert it to clean markdown, stripping all the HTML boilerplate so I can drop it straight into my LLM context.

## When to prefer this

Choose this endpoint when you need to feed web page content into an LLM or RAG pipeline and want to minimize token usage — it removes 85-97% of HTML/DOM noise, making it far more efficient than passing raw HTML. Prefer it over generic scrapers when your goal is LLM-readiness and compression ratio matters. It costs only $0.001 USDC per page via x402, making it economical for high-volume ingestion workflows.

## Known failure modes

- URL is unreachable or returns a non-200 status — page cannot be fetched
- URL points to a non-HTML resource (PDF, image) — conversion may fail or return raw bytes
- Bot-detection or CAPTCHA on target site — content may be blocked
- Payment not provided or insufficient — x402 payment required response
- Malformed URL parameter — request rejected with validation error
- Very large pages may hit timeout limits

## How this service works

RAG-Diet Web Page to Clean Markdown Extractor ($0.001/page) — Strips 85-97% of HTML/DOM boilerplate into LLM-ready Markdown.

## Output

A JSON object with a 'status' field ('ok'), a 'data' field containing the cleaned Markdown content of the page, and an 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%) — the percentage of HTML/DOM boilerplate that 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/rag-diet-url-to-markdown-converter-6caa717c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag-diet.agentdiet.dev](https://www.zero.xyz/host/rag-diet.agentdiet.dev/llms.txt)
