# AgentDiet JSON Repair & Web Distillation Endpoint

> AgentDiet JSON Repair & Web Distillation Endpoint is a paid API for AI agents from serp-extract-72343955726.us-central1.run.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).

Fetches and distills web content or structured data into clean, agent-ready markdown with high token compression, returning distilled content alongside ROI metrics.

## Facts

- Endpoint: GET https://serp-extract-72343955726.us-central1.run.app/v1/json-repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-json-repair-web-distillation-endpoint-0f5de5f8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S4iwsLWlpflg7p4zkGOb1

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-json-repair-web-distillation-endpoint-0f5de5f8
```

Example prompt: Can you fetch and distill this documentation page into clean agent-ready markdown so I can feed it to my pipeline without blowing my token budget? Here's the URL: https://docs.example.com/api/overview

## When to prefer this

Choose this endpoint when your agent needs to ingest web page or documentation content but must minimize token consumption; it is purpose-built for LLM pipelines where context window efficiency matters. It is also the right choice when raw JSON from upstream APIs is malformed and needs structural repair before downstream processing. Prefer over generic scrapers when you want a quantified compression ROI alongside the content.

## Known failure modes

- Target URL unreachable or returns non-200 — distillation fails with error status
- Malformed or unparseable input JSON — repair may return partial results or error
- Payment via x402/USDC not fulfilled — HTTP 402 returned, endpoint not called
- Content behind login or paywalled pages — returns empty or access-denied content
- Extremely large pages may exceed processing limits — partial distillation possible

## How this service works

15-App Autonomous Business-to-Agent (B2A) API Hub & MCP Suite. Supports Web Distillation, On-Chain Risk, DEX Token Intelligence, B2B Lead Enrichment, Domain OSINT, Email Verification, SEC Filings, GitHub Audits, Prompt Firewall, and native HTTP 402 (x402 Base USDC).

## Output

Returns a JSON object with distilled content in markdown mode under data.content, a title, status indicator, and an roi_proof block showing raw_tokens, distilled_tokens, tokens_saved, compression_ratio_pct, and roi_multiplier — letting the agent quantify exactly how much token budget was saved.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "raw_json"
   ],
   "properties": {
    "raw_json": {
     "type": "string",
     "minLength": 1,
     "description": "Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "status",
    "roi_proof",
    "data"
   ],
   "properties": {
    "data": {
     "type": "object"
    },
    "status": {
     "type": "string"
    },
    "roi_proof": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "mode": "markdown",
   "title": "Example Documentation",
   "content": "# Example Documentation\nClean agent-ready markdown..."
  },
  "status": "ok",
  "roi_proof": {
   "raw_tokens": 14200,
   "tokens_saved": 13520,
   "roi_multiplier": 67.6,
   "distilled_tokens": 680,
   "compression_ratio_pct": 95.2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-json-repair-web-distillation-endpoint-0f5de5f8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from serp-extract-72343955726.us-central1.run.app](https://www.zero.xyz/host/serp-extract-72343955726.us-central1.run.app/llms.txt)
