{"uid":"cap_8AmUr3FXLhIqaiqBV7L85","slug":"the-stall-json-extract-e90ec799","name":"The Stall — JSON Extract","description":"Extracts and parses JSON from mixed-content text. Handles LLM output with JSON embedded in prose, code fences (```json), trailing commas, single-quoted strings, JS-style comments, and bare object keys (JSON5-style). Returns the parsed data, a cleaned JSON string, extraction method used, and any repair applied. Pure text processing — zero external API calls.","url":"https://the-stall.intuitek.ai/cap/json-extract","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"required":{"type":"string"},"properties":{"type":"string"}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"text":"Here is some user data embedded in text: {\"name\":\"Bob\",\"age\":25,\"email\":\"bob@example.com\"}","schema_check":{"type":"object","required":["name","age","email"],"properties":{"age":{"type":"number"},"name":{"type":"string"},"email":{"type":"string"}}}}}},"response":{"type":"object","method":"embedded","repaired":false,"extracted":{"age":25,"name":"Bob","email":"bob@example.com"},"json_string":"{\"name\":\"Bob\",\"age\":25,\"email\":\"bob@example.com\"}","parse_error":null,"generated_at":"2026-06-18T06:26:29.160Z"}},"exampleRequest":{"text":"Here is some user data embedded in text: {\"name\":\"Bob\",\"age\":25,\"email\":\"bob@example.com\"}","schema_check":{"type":"object","required":["name","age","email"],"properties":{"age":{"type":"number"},"name":{"type":"string"},"email":{"type":"string"}}}},"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.034","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.034","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kOde4NAB0HxyIYijUBDSS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.034","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts and parses JSON data embedded in arbitrary text, optionally validating it against a provided JSON Schema.","exampleAgentPrompt":"I have this LLM response that's got JSON buried in prose and code fences — can you extract just the clean JSON from it? Here's the text: 'Sure! Here is your result: ```json {\"name\": \"Alice\", \"score\": 42} ``` Hope that helps!' Also validate it against this schema: {\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"score\":{\"type\":\"number\"}}}","exampleUseCases":null,"resultDescription":"Returns the extracted JSON object parsed out of the input text, along with an optional validation result if a JSON Schema was provided. The response indicates whether the extracted JSON conforms to the given schema.","failureModes":["No JSON found in input text — returns an error or empty result","Input text exceeds 200,000 character limit — rejected with size error","Provided schema_check is not a valid JSON Schema draft-07 subset — validation step may error","Malformed or truncated JSON in the text that cannot be fully parsed — partial or error result","Payment not completed via x402/USDC — 402 response blocking access"],"whenToPreferThis":"Use this endpoint when you have text containing JSON mixed with prose, markdown formatting, code fences, or other noise, and you need to reliably extract the structured JSON. Particularly useful for parsing LLM outputs, API responses that embed JSON in narrative text, or copy-pasted content where JSON is not cleanly isolated. Prefer over manual regex or string parsing when optional schema validation is also needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:42:57.391Z","isFirstParty":false}