JSON Schema Validator API: Validate & Infer Schemas avatar

JSON Schema Validator API: Validate & Infer Schemas

Pricing

$1.00 / 1,000 json validations

Go to Apify Store
JSON Schema Validator API: Validate & Infer Schemas

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

Tudor Lane

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Categories

Features

Limited permissions

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: infer builds a 2020-12 schema from sample documents (types, arrays, required fields).
  • data and schema can 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: false is a successful check (you still pay): it means the document did not match the schema. Missing data/schema, or an empty infer samples list, 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-validate to 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_TOKEN with the input JSON.