{"uid":"cap__5HE6bVRA04IWdKYAK7_g","slug":"402utils-json-schema-validator-83676692","name":"402utils JSON Schema Validator","description":"Validate a JSON value against a JSON Schema (draft 2020-12 default; 2019-09/7/4 via $schema). Send {data, schema}; returns {valid, errors:[{path, message, keyword}]} with a JSON Pointer path per failure. For agents checking structured/tool-call output before use. Runs on an eval-less validator (Ajv can't run on Workers). Remote $ref is refused (self-contained only); unsafe regex patterns are rejected before compilation.","url":"https://402utils.com/v1/json-validate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"description":"The JSON value to validate (any type: object, array, string, number, boolean, null)."},"schema":{"type":"object","description":"A self-contained JSON Schema. Only local #… $refs; no remote $ref."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":{"p10Cents":"0.2000","medianCents":"0.2000","p90Cents":"0.2000","minCents":"0.2000","maxCents":"0.2000","p95Cents":"0.2000","sampleCount":1,"varies":false,"failureChargeRate":1},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ajiYhAZbyolLzisDX5QU2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates any JSON value against a self-contained JSON Schema (drafts 2020-12, 2019-09, 7, 4) and returns per-failure error details with JSON Pointer paths","exampleAgentPrompt":"Before I store this tool-call response, check whether it's valid against this JSON Schema — run it through the JSON Schema validator and tell me if there are any errors, including which fields fail and why: data is {\"name\":\"Alice\",\"age\":\"thirty\"} and the schema requires name as string and age as integer.","exampleUseCases":null,"resultDescription":"Returns a JSON object with a boolean 'valid' field and an 'errors' array. Each error entry contains a 'path' (JSON Pointer string indicating the failing location in the data), a 'message' describing the violation, and the 'keyword' that triggered it (e.g. 'type', 'required', 'minimum').","failureModes":["Remote $ref in schema is refused — only local #... references are allowed; returns an error indicating remote refs are not supported","Unsafe or exponential-backtracking regex patterns in schema are rejected before compilation","Malformed JSON in request body causes a parse error response","Unsupported $schema draft version may fall back to default (2020-12) or return an error","Missing 'data' or 'schema' fields in the request body may return a validation or bad-request error","Payment not included or insufficient USDC triggers x402 payment-required response"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically verify that structured data — such as tool-call outputs, API responses, or user-submitted JSON — conforms to a known JSON Schema before acting on it. It supports multiple JSON Schema drafts (2020-12 default, 2019-09, 7, 4), returns granular per-field errors with JSON Pointer paths, and runs in an eval-less environment safe for edge/worker deployments. Prefer it over client-side Ajv when you cannot run eval in your environment, or when you want a paid, logged, auditable validation call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:47:16.508Z","isFirstParty":false,"canonicalSlug":"402utils-json-schema-validator-83676692"}