{"uid":"cap_rQn0pJgNfwSWbFARvfFvW","slug":"17711-smart-services-json-extraction-correction-290407b5","name":"17711 Smart Services – JSON Extraction & Correction","description":"A fleet of independent, x402-payable microservices callable by AI agents.","url":"https://api.17711.xyz/registry/extract-correct-service/v1/extract-correct/parse_json","method":"POST","headers":{},"bodySchema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Free-form or messy text to extract structured JSON from -- already-valid JSON, JSON\nwrapped in prose or a markdown code fence, or malformed JSON (trailing commas,\nsingle-quoted strings, unquoted keys, a truncated array/object)."},"schema":{"type":"string","description":"Optional JSON Schema to validate the extracted value against and auto-correct where a\nbounded, deterministic fix rule applies. Omitted = extraction only, no validation."}}},"responseSchema":{"data":null,"valid":false,"applied_fixes":[{"path":"string","rule":"string","detail":"string"}],"remaining_issues":[{"path":"string","keyword":"string","message":"string"}],"extraction_method":"string"},"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_mat5GICVcZYOVE1HL-yFQ","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":"Extracts structured JSON from free-form, wrapped, or malformed text and optionally validates and auto-corrects it against a provided JSON Schema","exampleAgentPrompt":"I got this messy LLM response that has JSON buried inside some prose and markdown fences — can you pull out the structured JSON and validate it against this schema: {\"type\":\"object\",\"required\":[\"name\",\"age\"]}?","exampleUseCases":[{"title":"Repair malformed LLM-generated JSON","prompt":"The model returned JSON with trailing commas and single-quoted strings that my app can't parse — can you extract and fix it so I get valid JSON back?"},{"title":"Validate API response against schema","prompt":"I have this API response text and a JSON Schema for what it should look like — can you extract the JSON, check it against the schema, and auto-correct any simple issues?"},{"title":"Extract JSON from markdown code block","prompt":"My assistant wrapped the output in a markdown code fence with some explanation around it — can you strip all that away and give me just the raw JSON object?"}],"resultDescription":"Returns an object with: `data` (the extracted/corrected JSON value or null if extraction failed), `valid` (boolean indicating schema validity after corrections), `applied_fixes` (list of auto-corrections made, each with path, rule, and detail), `remaining_issues` (unresolved schema violations with path, keyword, and message), and `extraction_method` (string describing how the JSON was found in the input).","failureModes":["Input contains no recoverable JSON structure — data returns null","Malformed JSON too severely corrupted to auto-repair — remaining_issues populated","Schema provided is itself invalid JSON Schema — may cause validation error","Truncated JSON object with missing closing brackets may not be fully recoverable","Schema violations that fall outside deterministic fix rules left as remaining_issues"],"whenToPreferThis":"Use this endpoint when you need to reliably extract JSON from noisy or untrusted text sources — such as LLM completions, scraped web content, or user input — especially when the JSON may be malformed, wrapped in prose, or enclosed in markdown fences. It is the right choice when you also need schema validation and deterministic auto-correction in a single call. Prefer it over a raw JSON parser when inputs are unreliable, and over a general-purpose LLM when you need deterministic, auditable fix rules rather than probabilistic rewriting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:38:49.053Z","isFirstParty":false}