{"uid":"cap_c04BvqINh_lJofjUTgNNN","slug":"agentdiet-json-repair-web-distillation-endpoint-5099fffd","name":"AgentDiet JSON Repair & Web Distillation Endpoint","description":"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).","url":"https://company-enrich-72343955726.us-central1.run.app/v1/json-repair?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}},"responseSchema":{"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}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rwQ8V3ElkhSvaV9YLx6lV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Distills and repairs messy web content or JSON into clean, agent-ready markdown with token compression metrics","exampleAgentPrompt":"Can you take this messy webpage content and distill it into clean, agent-ready markdown — I want to see the compression ratio and how many tokens we saved in the process?","exampleUseCases":[{"title":"Token-efficient documentation ingestion","prompt":"I need to pull in this API documentation page and compress it into clean markdown for my agent to use — can you distill it and tell me how many tokens we're saving compared to the raw version?"},{"title":"Repairing malformed JSON response","prompt":"I got back some broken JSON from a third-party API and need it repaired and cleaned up into a usable format — can you fix it and return it in clean markdown mode?"},{"title":"Pre-processing web content for LLM context","prompt":"Before I feed this webpage into my language model, can you strip all the boilerplate and noise and give me just the core content in distilled markdown so I don't waste context window space?"}],"resultDescription":"Returns a JSON object containing distilled markdown content with a title, plus ROI proof metrics including raw token count, distilled token count, tokens saved, compression ratio percentage, and ROI multiplier — enabling agents to quantify the efficiency gain of distillation.","failureModes":["Invalid or inaccessible URL returns an error status","Malformed input JSON that cannot be repaired returns a parsing failure","Rate limiting or payment failure via x402/HTTP 402 if USDC balance is insufficient","Empty or whitespace-only content returns minimal or null distilled output","Network timeout on large pages may result in incomplete distillation"],"whenToPreferThis":"Choose this endpoint when you need to reduce token overhead before feeding web or JSON content into an LLM context window, or when you have malformed JSON that needs structural repair. It is especially valuable in agentic pipelines where token costs matter and you need clean, structured markdown output with measurable compression metrics. Prefer it over raw scraping tools when you want both content extraction and token-efficiency reporting in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T13:01:47.148Z","isFirstParty":false,"canonicalSlug":"agentdiet-json-repair-web-distillation-endpoint-5099fffd"}