JSON Schema Validator API: Validate & Infer Schemas
Pricing
$1.00 / 1,000 json validations
JSON Schema Validator API: Validate & Infer Schemas
Validate JSON documents against a JSON Schema (drafts 3 to 2020-12) and get every error with its exact path, or infer a schema from sample documents. Ideal for checking LLM structured output.
Pricing
$1.00 / 1,000 json validations
Rating
0.0
(0)
Developer
Tudor Lane
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Use when: a coding or data agent must check LLM structured output (or any JSON) against a schema and get every error path, or infer a schema from sample documents.
Try this input (also the default, just click Start)
{"requests": [{"data": {"name": "Ada", "age": "36", "email": "ada@example"}, "schema": {"type": "object", "required": ["name", "age", "email"], "properties": {"name": {"type": "string"}, "age": {"type": "integer", "minimum": 0}, "email": {"type": "string", "format": "email"}}}}, {"action": "infer", "samples": [{"id": 1, "tags": ["a"], "price": 9.5}, {"id": 2, "tags": [], "price": 3, "note": null}]}]}
Sample output (real run, 11 Nov 2026, trimmed)
{"action": "validate", "valid": false, "error_count": 1, "errors": [{"path": "$.age", "message": "'36' is not of type 'integer'", "keyword": "type", "schema_path": "properties/age/type"}], "draft": "Draft202012", "error": null}{"action": "infer", "samples": 2, "schema": {"$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {"id": {"type": "integer"}, "tags": {"type": "array", "items": {"type": "string"}}, "price": {"type": "number"}, "note": {"type": "null"}}, "required": ["id", "price", "tags"]}, "error": null}
Options
- Validate against JSON Schema drafts 3, 4, 6, 7, 2019-09 and 2020-12 (picked from
$schema). - Every error includes a JSONPath (
$.age), message and failing keyword. Format checks (date-time, email, uri, ipv4...) are included. action: inferbuilds a 2020-12 schema from sample documents (types, arrays, required fields).dataandschemacan be objects or JSON strings. No API key needed.
Pricing: pay per event, $0.001 per JSON validation (one document validated or one schema inferred). Errors are not charged. No subscription.
Limits & failure modes
- A row with
valid: falseis a successful check (you still pay): it means the document did not match the schema. Missingdata/schema, or an empty infersampleslist, returns an uncharged error. - Inferred schemas are a starting point (via genson), not a hand-written contract; optional vs required fields follow what appeared in the samples.
- Libraries: jsonschema (MIT), genson (MIT).
Last tested: 11 Nov 2026.
Use from AI agents (MCP)
- Apify MCP server: add
https://mcp.apify.com/?tools=tudorlane/json-schema-validateto Claude, Cursor, ChatGPT, VS Code or any MCP client. - REST:
POST https://api.apify.com/v2/acts/tudorlane~json-schema-validate/run-sync-get-dataset-items?token=YOUR_TOKENwith the input JSON.