# AgentDiet Citation Search

> AgentDiet Citation Search 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).

Searches an indexed knowledge base and returns compressed, citation-backed results optimized for minimal token usage in AI agent context windows.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/citation-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-citation-search-87f1be28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CeeVpuTsMlbqCYzyGYpGm

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-citation-search-87f1be28
```

Example prompt: Search AgentDiet's citation index for 'transformer attention mechanisms' and give me the compressed, cited results — I need them to fit in a tight context window.

## When to prefer this

Choose this endpoint when an AI agent needs to retrieve cited, factual information while aggressively conserving context window tokens — the built-in compression (up to 91%+ ratio) makes it ideal for pipelines where retrieved content must be passed to downstream LLM calls. Prefer it over plain web search or RAG endpoints when you need both citation provenance and token efficiency in a single call, and when your payment infrastructure supports x402/USDC on Base.

## Known failure modes

- Missing required 'query' parameter returns an error or empty data
- Invalid HTTP method (not GET or POST) rejected by schema validation
- Payment failure via x402/USDC may result in 402 Payment Required response
- Empty or vague queries may return low-relevance citations
- Rate limits or node unavailability may return 5xx errors
- Query too long or malformed may trigger schema validation failure

## 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

Returns a JSON object with a 'data' field containing the search results and citations, a 'status' field ('ok' on success), and a 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%) achieved — confirming how much token reduction was applied to the retrieved 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-citation-search-87f1be28/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)
