# AgentDiet Web Search with Context Distillation

> AgentDiet Web Search with Context Distillation is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Performs a web search and returns results compressed/distilled to reduce token usage by up to ~91%

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/web-search?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-web-search-with-context-distillation-dfeaa5fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KV6DRLQQaSOZIzu2b7wjr

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-web-search-with-context-distillation-dfeaa5fb
```

Example prompt: Search the web for 'latest developments in quantum computing 2025' and give me the distilled results — I need it token-efficient so it fits in my context window.

## When to prefer this

Choose this endpoint when your AI agent needs to search the web but is operating under tight context window constraints — the built-in ~91% compression ratio makes it ideal for agents that must retrieve current information without consuming large amounts of tokens. Prefer it over raw web search APIs when token efficiency is a priority, or when building A2A/MCP pipelines that pay per call via x402/USDC microtransactions on Base.

## Known failure modes

- Missing 'query' parameter in queryParams results in empty or error response
- Invalid 'type' value (must be 'http') causes schema validation failure
- Network or upstream search provider unavailability returns non-ok status
- Payment not settled in USDC on Base causes 402 Payment Required response
- Malformed input object missing required 'method' field causes request rejection

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.

## Output

A JSON object with a 'status' field ('ok'), a 'data' field containing the search results, and a 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%), confirming how much the output was compressed relative to raw web content.

## 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": {
      "query": {
       "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-web-search-with-context-distillation-dfeaa5fb/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)
