NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

JSON Schema Validator API

POST

Catch invalid JSON payloads before they hit your database.

JSON Schema Validator is a JSON validator API that tests any JSON object against a JSON Schema you provide, so you can check JSON against its schema before trusting it. It reports pass-fail status and total error count, while paid plans add specific error messages.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/jsonschemavalidator
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "valid": true,
    "errors": [],
    "error_count": 0
  }
}

About the JSON Schema Validator API

A JSON schema validator API for checking payloads before they reach your database or downstream services. JSON Schema Validator works by comparing JSON data against a JSON Schema definition you send in the same request, so you can validate JSON against a schema without bundling a validation library into every client, script or no-code workflow.

It checks types, required fields, string patterns and lengths, numeric ranges, array sizes, enums and a set of common string formats, then reports whether the document is valid and how many problems it found. Teams use it to vet webhook bodies, form submissions, config files and data imports, and to test a schema against sample records while they are still writing it.

The Free plan returns the valid flag and the error count, which is enough to accept or reject a document. Paid plans add the full error list, where each entry names the failing field path, says what rule it broke, and shows the offending value, so you can tell users exactly what to fix.

How it works

JSON Schema Validator walks your json document alongside schema recursively and records every rule that fails. It implements a focused subset of JSON Schema rather than a full draft: type (a single type or an array of types; an integer satisfies number), required and properties for objects, items with minItems and maxItems for arrays, minLength, maxLength, pattern and format for strings, minimum and maximum for numbers, and enum for any value. Keywords outside that list, such as $ref, oneOf, additionalProperties or exclusiveMinimum, are ignored rather than rejected.

When a value fails its type check, validation stops for that branch, so you get one type error instead of a cascade. Object and array rules only run when the schema's type is exactly object or array, and properties that are absent from the data are not validated unless they are listed in required. Supported formats are email, uri and url (which require an http or https prefix), date (YYYY-MM-DD), date-time and ipv4; any other format name passes. Format checks are pattern-based, so 2024-13-45 passes as a date.

valid is true when no errors were recorded and error_count is the number of errors. On paid plans, each object in errors has field (a dotted path such as user.email or items[2], or root), message, and value; type errors add expected and actual. Schema pattern regexes run in a sandbox with a two-second limit, and a pattern that exceeds it returns a 400 error. An empty object is a valid json input.

What people use it for

API Validation
Validate incoming API request payloads against defined schemas before processing to ensure data quality
Configuration Files
Verify configuration files match expected schemas before deployment to prevent runtime errors
Data Quality
Validate data integrity in ETL pipelines by checking against schemas during data transformation
Contract Testing
Ensure API responses match contract specifications by validating against JSON schemas in tests

Without writing code

JSON Validator for Windows checks your JSON and repairs it when it is broken.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use JSON Schema Validator

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the JSON Schema Validator API.

Read the docs →
Is it cheap enough to validate every incoming API request?
Yes. Each validation costs 2 credits, which works out to about $0.0003 per call on the Starter plan, or $0.30 per 1,000 requests. The Starter plan provides enough credits for 100,000 validations per month, while the Free plan includes 100 calls each month to test your schemas.
Do I get the detailed validation error messages on the Free plan?
No. The Free plan provides the validation status and the error count, but the list of error messages is a premium field. Upgrading to any paid plan unlocks the errors array so you can see field-level explanations of what failed.
What schema rules and constraints does the validator support?
The validator checks data types, required fields, string patterns, numeric ranges, array constraints, and format specifications. You provide both the JSON Schema definition and the JSON data to validate in the request body.
Can I validate configuration files as well as API payloads?
Yes. As long as your data and schema are valid JSON objects, you can validate configuration files, incoming webhook payloads, or test fixtures for contract testing. The validator evaluates the data object directly against your supplied schema object.
What does the response return when a payload fails validation?
When validation fails, the valid field is set to false and error count indicates the number of failed constraints found. On paid plans, the errors field lists the specific violation messages, whereas on the Free plan that field is omitted.

Ready to build with JSON Schema Validator? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs