{"uid":"cap_wfYnpCNDS9qMYYR8M0AV2","slug":"agentdiet-json-repair-endpoint-d90108ad","name":"AgentDiet JSON Repair 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://serp-extract.agentdiet.dev/v1/json-repair?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":{"raw_json":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{},"status":"ok","roi_proof":{"compression_ratio_pct":91.4}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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"},{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kmFQIwPmQmh8dD1pamN4Q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_pqZTaIniL4sRHgQa0m7lS","protocol":"mpp","methodType":"crypto","chain":"tempo","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":"Repairs and validates malformed JSON strings, returning cleaned, parseable JSON output","exampleAgentPrompt":"I have some broken JSON that won't parse — can you run it through the JSON repair tool to fix any syntax errors and give me back a clean, valid version? Here's the raw string: {name: 'Alice', age: 30, hobbies: ['reading', 'coding'}.","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The AI I'm using keeps outputting JSON with missing closing brackets and unquoted keys — can you repair this broken JSON so I can actually use it in my pipeline? Here it is: {user: 'bob', score: 42, tags: ['alpha', 'beta'}"},{"title":"Repair truncated API response JSON","prompt":"I got a JSON response from an external API that got cut off mid-stream and now won't parse. Can you fix it for me and return a valid JSON object? The raw string is: {\"id\":\"xyz123\",\"status\":\"active\",\"data\":{\"items\":[1,2,3"},{"title":"Validate and clean JSON before database insert","prompt":"Before I insert this user record into the database, can you check if this JSON is valid and fix any issues? Here's what I have: {\"name\":\"Carol\",\"email\":\"carol@example.com\",\"prefs\":{\"theme\":\"dark\",\"notifications\":true}"}],"resultDescription":"Returns a JSON object with a 'data' field containing the repaired JSON, a 'status' field ('ok' on success), and an 'roi_proof' object showing the compression_ratio_pct — a metric indicating how much the repair/distillation reduced or cleaned the input.","failureModes":["Input JSON is too deeply corrupted to repair — returns error status","Missing required 'input' or 'method' fields in request body — returns validation error","Malformed request schema — returns 400-level error","Payment not completed via x402/USDC — returns HTTP 402","Rate limiting or quota exceeded — returns 429"],"whenToPreferThis":"Choose this endpoint when you have malformed, truncated, or syntactically invalid JSON that needs to be made parseable before downstream processing. It is especially useful in agentic pipelines where LLM outputs or third-party API responses frequently produce broken JSON. It costs only $0.002 USDC per call via x402, making it suitable for high-frequency repair tasks. Prefer this over manual parsing hacks or custom regex-based fixes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:43:25.012Z","isFirstParty":false,"canonicalSlug":"agentdiet-json-repair-endpoint-d90108ad"}