{"uid":"cap_QCqrte-tJt4C5Kb6woyL1","slug":"saylor-innovations-json-schema-inference-95d74fd7","name":"Saylor Innovations JSON Schema Inference","description":"Infer a JSON Schema from a sample JSON document - types, nested objects and arrays, required fields and string formats like email, date, uri and uuid","url":"https://saylorinnovations.com/api/dev/json-schema?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","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["json"],"properties":{"json":{"type":"string","description":"URL-encoded sample JSON document (up to 6000 characters)"},"title":{"type":"string","description":"optional schema title"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["root_type","schema","fields"],"properties":{"note":{"type":"string","description":"Caveat or context for reading the result"},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":["string","null"],"description":"Dotted path of the field"},"type":{"type":"string","description":"Type or kind"}},"additionalProperties":true},"description":"Flattened list of field paths with inferred types"},"schema":{"type":"object","properties":{"type":{"type":["string","null"],"description":"Type or kind"},"title":{"type":["string","null"],"description":"Title"},"$schema":{"type":["string","null"],"description":"JSON Schema dialect"},"required":{"type":["array","null"],"items":{"type":"string"},"description":"Fields present in every sample object"},"properties":{"type":"object","properties":{"id":{"type":["object"],"properties":{"type":{"type":["string"]}},"additionalProperties":true},"name":{"type":["object"],"properties":{"type":{"type":["string"]}},"additionalProperties":true},"tags":{"type":["object"],"properties":{"type":{"type":["string"]},"items":{"type":["object"],"properties":{"type":{"type":["string"]}},"additionalProperties":true}},"additionalProperties":true},"email":{"type":["object"],"properties":{"type":{"type":["string"]},"format":{"type":["string"]}},"additionalProperties":true},"score":{"type":["object"],"properties":{"type":{"type":["string"]}},"additionalProperties":true},"active":{"type":["object"],"properties":{"type":{"type":["string"]}},"additionalProperties":true},"joined":{"type":["object"],"properties":{"type":{"type":["string"]},"format":{"type":["string"]}},"additionalProperties":true}},"additionalProperties":true},"description":{"type":["string","null"],"description":"Short description"},"additionalProperties":{"type":["boolean","null"],"description":"Additional properties"}},"description":"Inferred JSON Schema (draft 2020-12)","additionalProperties":true},"source":{"type":"string","description":"Data source the values come from"},"root_type":{"type":"string","description":"Root type"},"checked_at":{"type":"string","description":"Time the check was run (UTC)"},"schema_nodes":{"type":"number","description":"Schema nodes"}},"additionalProperties":true},"description":{"type":"string"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_G0Y1bEM1ThwDuosxxYgMM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Infers a JSON Schema from a sample JSON document, detecting types, nested structures, required fields, and common string formats like email, date, URI, and UUID","exampleAgentPrompt":"Can you infer the JSON Schema for this sample document I have — it's a user profile object with nested address and contact info fields, and I want to know which fields are required and whether any strings look like emails or dates?","exampleUseCases":[{"title":"Document an API response schema","prompt":"I just got a sample JSON response from a third-party API and I want to auto-generate a JSON Schema from it so I can document what fields exist, which are required, and what formats the strings use — can you infer the schema from this JSON?"},{"title":"Validate data structure before integration","prompt":"Before I start consuming this webhook payload in my app, can you analyze this sample JSON and tell me the inferred schema including types, nested objects, and any fields that look like UUIDs or ISO dates?"},{"title":"Reverse-engineer schema from raw data","prompt":"I have a JSON export from a database and I need to figure out its schema — which fields are always present, which are optional, and whether any strings match formats like email or URI. Can you run schema inference on it?"}],"resultDescription":"Returns a JSON Schema (draft 2020-12) inferred from the sample, including root type, property types for nested objects and arrays, required field lists based on presence in the sample, and string format annotations (email, date, URI, UUID). Also returns a flattened list of dotted field paths with inferred types, a count of schema nodes, the identified root type, and optional caveats about the inference.","failureModes":["Missing required 'json' query parameter returns an error","JSON document exceeds 6000 character limit after URL encoding","Malformed or invalid JSON input that cannot be parsed","Ambiguous types in arrays with mixed types may produce approximate schemas","Single-sample inference may mark optional fields as required if they appear in the one example","Network timeout or service unavailability"],"whenToPreferThis":"Choose this endpoint when you need to quickly infer a JSON Schema from a concrete sample document without writing schema by hand — especially useful for unknown or undocumented API responses, webhook payloads, or database exports. It handles nested objects, arrays, and common string format detection automatically. Prefer this over manual schema authoring when you have an example document but no schema, and need draft 2020-12 compatibility.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-03T06:40:07.743Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-json-schema-inference-95d74fd7"}