{"uid":"cap_Tf9TYTG44mvj7R98Nrm9v","slug":"sitecheck-json-repair-686e9ffb","name":"SiteCheck JSON Repair","description":"Repairs broken JSON: markdown fences, comments, trailing commas, single quotes, unquoted keys, Python literals (True, False, None) and truncated endings. Pure code first; the model is asked once only when code cannot repair it. Optional JSON Schema check covers type, required, properties, items, enum, minimum, maximum, minLength, maxLength and pattern. Input max 1 MB.","url":"https://api.sitecheck-api.workers.dev/api/json/repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"The broken JSON text (max 1 MB)"},"schema":{"type":"object","description":"Optional JSON Schema to validate the repaired value against"}}},"responseSchema":{"type":"json","example":{"fixes":["replaced single quotes or removed comments","removed trailing commas","closed unbalanced brackets"],"valid":true,"value":{"name":"Ada","langs":["en","fr"]},"problems":[],"checkedAt":"2026-10-15T18:21:12.802Z","usedModel":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HzLnMnsMNkar25j6OZ6rv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed or broken JSON text and optionally validates the result against a provided JSON Schema","exampleAgentPrompt":"This JSON string has syntax errors — single quotes, trailing commas, and unclosed brackets — can you repair it and validate it against my schema so I get back a clean, valid JSON object?","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The LLM returned this JSON but it has trailing commas and comments in it and my parser is choking — can you repair it so it's valid JSON I can use programmatically?"},{"title":"Validate repaired config file","prompt":"I have a config file that's almost valid JSON but someone used single quotes and left trailing commas — fix it and then validate it against this schema I'll provide to make sure the structure is correct."},{"title":"Rescue scraped JSON data","prompt":"I scraped some JSON from a page but it came back with unbalanced brackets and some extra text — can you repair the JSON and tell me exactly what fixes were made?"}],"resultDescription":"Returns a JSON object containing the repaired value, a boolean indicating whether the result is valid, an array of fix descriptions (e.g. 'replaced single quotes', 'removed trailing commas', 'closed unbalanced brackets'), an array of remaining problems if any, a timestamp, and a flag indicating whether an AI model was used for repair.","failureModes":["Input exceeds 1 MB limit — rejected","JSON is so severely malformed it cannot be heuristically repaired — problems array will be non-empty and valid will be false","Provided JSON Schema is itself invalid — validation step may error","Repaired value does not satisfy the optional schema — valid flag is false with schema violations listed"],"whenToPreferThis":"Use this endpoint when you have JSON text with common syntax errors like trailing commas, single quotes, comments, or unbalanced brackets that need programmatic repair without manual editing. Prefer it over LLM-based JSON fixing when you need an audit trail of exactly what was changed, or when you want schema validation built into the same call. Well-suited for pipeline stages that receive JSON from scrapers, LLMs, or user input where quality is unpredictable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:48:03.744Z","isFirstParty":false,"canonicalSlug":"sitecheck-json-repair-686e9ffb"}