JSON Schema Checker and Schema Inference
Pricing
from $5.00 / 1,000 successful validation or inferences
JSON Schema Checker and Schema Inference
Validate a JSON document against a JSON Schema and list each failing path with its message, or infer a draft 2020-12 schema from JSON samples. Unsupported keywords are reported, not enforced. Makes no outside requests in its own code.
Pricing
from $5.00 / 1,000 successful validation or inferences
Rating
0.0
(0)
Developer
Brightwater Tools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
12 days ago
Last modified
Categories
Security
Limited permissionsShare
Check one JSON document against a JSON Schema and get every failing path with its message, or infer a JSON Schema (draft 2020-12) from one document or several samples. Paste your JSON, pick a mode, get the result. Each run does one mode.
$0.005 per successful run (UNCONFIRMED against the live Store). Failed runs are not charged.
What you can do with it
- Check an API payload or config file against the schema your team agreed on, and see every field that breaks it, with its JSON Pointer path such as
/items/2/sku. - Start a schema from examples. Paste a few sample records and get a draft 2020-12 schema with the types, the properties, and the properties that appear in every sample as
required. - Use it as a step in your Apify integrations, Make, Zapier or n8n workflows, or call it from the Apify API.
How to use it
- Choose a mode:
validateto check data against a schema, orinferto build a schema from data. - Fill in the fields for that mode (see below).
- Click Start. The result appears in the Output tab and the dataset.
Mode: validate
| Field | What to enter |
|---|---|
data | The JSON document to check (required) |
schema | The JSON Schema to check it against |
max_input_bytes | Optional size limit for schema and for data, each checked separately (default 1,000,000; up to 5,000,000) |
Example input:
{"mode": "validate","schema": "{\"type\": \"object\", \"required\": [\"part\", \"qty\"], \"properties\": {\"part\": {\"type\": \"string\"}, \"qty\": {\"type\": \"integer\", \"minimum\": 1}}}","data": "{\"part\": \"Bolt M6\", \"qty\": 0}"}
Output (one dataset item):
{"mode": "validate","valid": false,"error_count": 1,"errors": [{ "path": "/qty", "message": "must be at least 1, found 0", "keyword": "minimum" }],"unsupported_keywords": [],"sample_count": null,"schema": null}
Each error has a path (a JSON Pointer; an empty string means the whole document), a message and the keyword that failed. Every error is listed, not only the first.
Mode: infer
| Field | What to enter |
|---|---|
data | One JSON document, or a JSON array of samples (required). Any value in the schema field is ignored. |
max_input_bytes | Optional size limit for the data (same rules as above) |
In infer mode a top-level array is read as a list of samples, one per item. A single object or value is read as one document. To infer the schema of an array value itself, wrap it in another array. An empty array is refused.
Example input:
{"mode": "infer","data": "[{\"part\": \"Bolt M6\", \"qty\": 4}, {\"part\": \"Nut M6\"}]"}
Output (one dataset item):
{"mode": "infer","valid": null,"error_count": 0,"errors": [],"unsupported_keywords": [],"sample_count": 2,"schema": {"$schema": "https://json-schema.org/draft/2020-12/schema","type": "object","properties": {"part": { "type": "string" },"qty": { "type": "integer" }},"required": ["part"]}}
How the schema is built:
- A key that appears in every object sample is
required. A key missing from some samples is optional. - Numbers written without a decimal point give
integer. A mix of whole and decimal numbers givesnumber. - Mixed kinds give a list of types, for example
["null", "string"]when a value is sometimesnull. - Items of all arrays are merged into one
itemsschema. - The inferred schema does not include
enum,format, length limits or ranges.
Keywords the validator enforces
Validation covers a subset of JSON Schema, not a full validator for any draft. In validate mode these 24 keywords are enforced. Keywords next to $ref are applied too.
| Group | Keywords |
|---|---|
| Types and fixed values | type, enum, const |
| Strings | minLength, maxLength, pattern |
| Numbers | minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf |
| Objects | required, properties, additionalProperties |
| Arrays | items, prefixItems, minItems, maxItems, uniqueItems |
| Combining schemas | allOf, anyOf, oneOf, not |
| References | $ref (local only: it must point into $defs or definitions) |
Notes on the rules:
patternuses Python's regular expression syntax and matches anywhere in the string. A pattern written for another validator may behave slightly differently.minLengthandmaxLengthcount Unicode code points.multipleOfcompares the decimal values as written, so0.3is a multiple of0.1.integeraccepts2.0.trueis not a number, and1does not equaltrueinconst,enumoruniqueItems.
Keywords that are reported, not enforced
Any other keyword in the schema is not enforced. It is listed in unsupported_keywords with its schema path, so you can see what was skipped. The result is still based only on the supported keywords. Examples: format, contains, minProperties, maxProperties, patternProperties, propertyNames, if, then, else, dependentRequired, dependentSchemas, unevaluatedProperties and unevaluatedItems. Keywords nested inside an unsupported keyword are not read and are not listed.
Annotation keywords ($schema, $id, $comment, title, description, default, examples) are ignored and not listed.
A schema is refused with a message, and the run is not charged, when:
- a supported keyword has the wrong shape (for example
"required": "a"or"minimum": "1"), - a
$refpoints outside$defsordefinitions, or to a target that does not exist, itemsis given as an array of schemas (the draft-07 tuple form). UseprefixItemsfor that.
The draft named in the schema's $schema is not used to choose the rules in validate mode. The draft 2020-12 name applies only to the schema that infer mode writes.
Pricing
- $0.005 per successful run, in either mode (UNCONFIRMED against the live Store).
- Failed runs are not charged: bad input, a refused schema, or data too large.
Good to know
- Size limit: the schema and the data are each limited to 1 MB by default (
max_input_bytes, up to 5 MB). - Only JSON is accepted.
NaN,Infinityand numbers too large for a standard floating-point value are refused. - Nesting depth: Nesting deeper than 200 levels is rejected with a clear error.
FAQ
Does it send my data anywhere? No. The actor's own code makes no outside requests. Results are saved to your run's dataset on Apify, as with any Apify actor.
Which schema draft does validation follow? None is selected. The same keyword set applies whatever $schema the schema names. Keywords outside the set are listed as unsupported.
Can I call it from code? Yes, through the Apify API or the Apify client for JavaScript or Python, like any Apify actor.
I found a bug or need a keyword. Open an issue on this actor's Issues tab.
AI use
This actor was written with the help of AI coding tools. The rules above describe exactly what the validation and inference do.
Made by Brightwater Tools.