JSON Schema Contract Validator
Pricing
from $0.30 / 1,000 record validateds
JSON Schema Contract Validator
Validate JSON/JSONL records against your JSON Schema, or infer a schema + TypeScript interface from a sample. Per-record errors and VALID/DEAD_LETTER files.
Pricing
from $0.30 / 1,000 record validateds
Rating
0.0
(0)
Developer
Colton Mcclain
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 days ago
Last modified
Categories
Features
Share
Enforce a data contract on scraped or exported data and see exactly which records break it.
What problem does it solve?
Pipelines break when a source quietly changes shape. You need a clear valid / dead-letter split and the reason for every rejected record.
What it does
- Validates each record against your JSON Schema with the Python jsonschema library.
- Reports up to 10 violations per record (JSON-pointer path, message, keyword) and exact error counts.
- Writes VALID.jsonl and DEAD_LETTER.jsonl to the key-value store.
- Or infers a schema and TypeScript interface from a sample (required = present in every row).
Pricing (pay per event)
| Event | Price |
|---|---|
| Actor start (once per run, per GB of memory, minimum one) | $0.0050 |
| Record validated (per record validated) | $0.0003 |
You pay only for the events above plus nothing else from ELYRAON; Apify platform usage is covered by the event prices. The start event is charged on every run, including a run rejected for invalid input (nothing else is charged in that case). If you set a maximum charge per run, the Actor stops when it is reached and reports PARTIAL_MAX_CHARGE in the OUTPUT record, so you are never silently billed beyond your cap and never told a partial result is complete.
Input
| Field | Title | Required | Description |
|---|---|---|---|
records | Records | no | Records to process. Each item is a JSON object or a plain string. |
file_url | File URL | no | Public http(s) URL of a JSON array or JSONL file. Use instead of Records. |
schema | JSON Schema | no | Your JSON Schema (draft 4-2020-12; local $refs only). Use this OR Infer schema. |
infer_schema | Infer schema from the records | no | Build a schema (and TypeScript interface) from your sample instead of validating against one. |
Example input:
{"records": [{"id": 1}],"schema": {"type": "object","required": ["id","name"]}}
Output
Results go to the run's default dataset (download as JSON, CSV or Excel). Each item:
| Field | Type | Description |
|---|---|---|
record_index | integer | 1-based position. |
valid | boolean | Passed the schema. |
error_count | integer | Total violations. |
errors | array | Up to 10 violations: path, message, keyword. |
Example item:
{"record_index": 1,"valid": false,"error_count": 1,"errors": [{"path": "/","message": "'name' is a required property","keyword": "required"}]}
The key-value store holds OUTPUT (run summary: status, counts, warnings, limitations, version, source commit) and REPORT.md (readable summary). OUTPUT.status is SUCCEEDED, PARTIAL_MAX_CHARGE, PARTIAL_RESULT_LIMIT or FAILED (with a structured error code/message/field). Invalid or empty input fails the run immediately with an explanation and returns no results.
Use from code
curl -X POST "https://api.apify.com/v2/acts/colt2822~json-schema-contract-validator/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" -d '{"records": [{"id": 1}], "schema": {"type": "object", "required": ["id", "name"]}}'
from apify_client import ApifyClientrun = ApifyClient("$APIFY_TOKEN").actor("colt2822/json-schema-contract-validator").call(run_input={"records": [{"id": 1}], "schema": {"type": "object", "required": ["id", "name"]}})
This Actor can also be called by AI agents through the Apify MCP server (https://mcp.apify.com), which exposes Actors as tools.
Limitations
- Remote $ref fetching is not supported.
- An inferred schema describes your sample, not your intended contract: review before enforcing.
- Max 50,000 records per run.
Support
Questions or problems: https://elyraon.com.co/contact/ (ELYRAON). Source revision: 64dbaa5. Actor version 1.0.