{"uid":"cap_Mm87gYuLjjNAucFW-eZIn","slug":"json-repair-api-x402-pay-per-call-72e6b288","name":"JSON Repair API (x402 Pay-per-call)","description":"41 pay-per-call JSON APIs for AI agents. No account or API key: an unpaid POST returns HTTP 402, pay in USDC on Base with x402 v2, retry. Prices from $0.001 per call.","url":"https://x402-micro-pay.com/api/skills/json-repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":400000,"minLength":1}}},"responseSchema":{"type":"json","example":{"ok":true,"json":{"name":"Ada","tags":["math","code"],"active":true},"fixes":["unquoted_keys","single_quotes","trailing_commas","python_literals","removed_comments"],"skill":"json_repair","changed":true,"repaired":"{\"name\":\"Ada\",\"tags\":[\"math\",\"code\"],\"active\":true}"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0041","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.0041/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0041","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0041","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__GIDZyUK4p5EK9HocShxR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0041","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed or invalid JSON strings by fixing common syntax errors and returning the corrected JSON along with a list of applied fixes.","exampleAgentPrompt":"This JSON string from the API response has trailing commas and single quotes and won't parse — can you repair it and give me back valid JSON? Here it is: {name: 'Ada', tags: ['math', 'code'], active: True,}","exampleUseCases":[{"title":"Fix LLM-generated malformed JSON","prompt":"The language model returned this JSON but it has unquoted keys and Python-style booleans and it won't parse — can you fix it so I can use it in my app? Here's the string: {name: 'Alice', active: True, score: 9.5}"},{"title":"Repair JSON from scraped web content","prompt":"I scraped some data from a webpage and the JSON has trailing commas and comments in it, which makes it invalid — please clean it up and give me back a properly formatted JSON object."},{"title":"Clean up config file with syntax errors","prompt":"My config file has single-quoted strings and a few trailing commas and it keeps failing to load — can you repair this JSON so it's valid? Here's the content: {'host': 'localhost', 'port': 8080, 'debug': True,}"}],"resultDescription":"Returns a JSON object with: 'ok' (boolean success flag), 'json' (the parsed repaired object), 'repaired' (the repaired JSON as a string), 'fixes' (array of fix types applied such as unquoted_keys, single_quotes, trailing_commas, python_literals, removed_comments), 'changed' (boolean indicating whether any changes were made), and 'skill' identifier.","failureModes":["Input text is so malformed it cannot be repaired — returns error or ok:false","Input exceeds 400,000 character limit — rejected","Payment not provided — HTTP 402 returned requiring USDC payment on Base via x402","Network timeout if input is very large","JSON is structurally unrecoverable (e.g. completely arbitrary text with no JSON structure)"],"whenToPreferThis":"Choose this endpoint when you have a JSON string that fails to parse due to common syntax issues like unquoted keys, single quotes, trailing commas, Python literals (True/False/None), or inline comments. It is ideal for fixing LLM-generated JSON, scraped data, or config files without writing custom repair logic. Prefer this over custom regex fixes when you need reliable, categorized repair with a log of what was changed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T06:47:29.242Z","isFirstParty":false,"canonicalSlug":"json-repair-api-x402-pay-per-call-72e6b288"}