# AgentDiet RAG Diet — Web URL Distiller

> AgentDiet RAG Diet — Web URL Distiller is a paid API for AI agents from email-verify.agentdiet.dev, paid per call via MPP, $0.001/call, status unknown (last checked 2026-11-21).

Fetches a web page and distills it into compact, agent-ready tokens using configurable extraction modes (markdown, structured, skeleton, or budget) with BM25 optional focus querying.

## Facts

- Endpoint: GET https://email-verify.agentdiet.dev/v1/rag-diet?utm_source=zero.xyz
- Price: $0.001/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Provider: email-verify.agentdiet.dev
- Website: https://email-verify.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/email-verify-agentdiet-dev-agentdiet-rag-diet-web-url-distiller-6edf48fc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gX1VeyOmfalHlR-SoQmSa

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 email-verify-agentdiet-dev-agentdiet-rag-diet-web-url-distiller-6edf48fc
```

Example prompt: Distill the content at https://docs.stripe.com/payments into compact markdown — keep it under 2000 tokens and focus the extraction on payment intents.

## When to prefer this

Choose this endpoint when you need to fetch and compress web content for use in LLM context windows, RAG pipelines, or agent memory — especially when token cost reduction is a priority. It is distinct from generic scrapers because it returns agent-optimized output with token savings metrics and supports multiple extraction modes including BM25-focused budget extraction. Prefer this over raw HTTP fetching whenever token efficiency, structured output, or paginated distillation of large pages matters.

## Known failure modes

- URL is unreachable or returns non-200 status — endpoint may return an error status
- URL points to a non-HTML resource (PDF, binary) that cannot be parsed
- max_tokens ceiling set too low to return meaningful content
- BM25 query returns no relevant excerpts in budget mode
- Rate limiting or payment failure via x402 causing 402 response
- Pagination cursor is stale or invalid, causing empty or error response

## How this service works

Distill a web URL into compact agent-ready tokens (Live x402 v2, IETF MPP & MCP endpoint at https://email-verify.agentdiet.dev/v1/rag-diet)

## Output

Returns a distilled representation of the target webpage in the chosen mode: clean Markdown, structured JSON tables and metadata, a heading skeleton, or a BM25-focused budget excerpt. Also includes token savings metrics (raw tokens, distilled tokens, compression ratio, estimated LLM cost saved), 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"
  },
  "limit": {
   "type": "integer",
   "default": 20,
   "maximum": 100,
   "minimum": 1,
   "description": "Maximum number of items to return per page (1-100)"
  },
  "query": {
   "type": "string",
   "description": "BM25 focus query when mode=budget"
  },
  "cursor": {
   "type": "string",
   "description": "Opaque pagination cursor for fetching the next page"
  },
  "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/email-verify-agentdiet-dev-agentdiet-rag-diet-web-url-distiller-6edf48fc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from email-verify.agentdiet.dev](https://www.zero.xyz/host/email-verify.agentdiet.dev/llms.txt)
