# JSON Schema Validator

> JSON Schema Validator is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Validates a JSON data object against a provided JSON Schema and returns whether it is valid along with any validation errors

## Facts

- Endpoint: GET https://x402.agentindex.world/json/validate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-validator-2f6c9dd3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FJtnWvDKOcCbNeLf9w13v

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability json-schema-validator-2f6c9dd3
```

Example prompt: Can you check if this JSON object is valid against my schema? The data is {"name":"Alice","age":30} and the schema requires name to be a string and age to be a number greater than 0.

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call JSON Schema validation without setting up a local library or running code. Ideal for AI agents that receive dynamic JSON payloads and need to quickly verify structure before further processing. Prefer this over running code locally when the agent environment lacks execution capabilities or when you want a consistent, hosted validation service billed per use.

## Known failure modes

- Malformed JSON in data or schema input causes parse error
- Schema with unsupported JSON Schema keywords may not validate correctly
- Missing data or schema parameter returns an error
- Very large or deeply nested schemas may time out
- Schema with circular references may cause unexpected behavior

## How this service works

Validate a JSON document against a JSON Schema.

## Output

Returns a JSON object with a boolean 'valid' field indicating whether the data conforms to the schema, and an 'errors' array listing any validation errors (empty if valid). Errors typically describe which field failed, what constraint was violated, and the expected vs actual value.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "title": "Data"
  },
  "schema": {
   "type": "object",
   "title": "Schema",
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "errors": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-validator-2f6c9dd3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
