PageVerified tools · json_schema_validate

Validate JSON against a JSON Schema

a task needs to know whether a JSON value satisfies a JSON Schema (2020-12 and draft-07 keywords, local $ref), with the path and reason for every failure, before passing the value to another system.

1 credit per successful callPOST /api/v1/json/schema-validate

Bearer key · JSON

POST /api/v1/json/schema-validate

curl -s -X POST https://pageverified.com/api/v1/json/schema-validate \
  -H "authorization: Bearer $PAGEVERIFIED_API_KEY" \
  -H "content-type: application/json" \
  -d '{"schema":{"type":"object","required":["sku","price"],"properties":{"sku":{"type":"string","pattern":"^[A-Z]{3}-[0-9]+$"},"price":{"type":"number","minimum":0}},"additionalProperties":false},"instance":{"sku":"abc-1","price":-2}}'

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including PageVerified Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

Captured 2026-11-09

Example

This request was run against the running service on 2026-11-09 and the response below is what came back, unedited.

Request JSON

{
  "schema": {
    "type": "object",
    "required": [
      "sku",
      "price"
    ],
    "properties": {
      "sku": {
        "type": "string",
        "pattern": "^[A-Z]{3}-[0-9]+$"
      },
      "price": {
        "type": "number",
        "minimum": 0
      }
    },
    "additionalProperties": false
  },
  "instance": {
    "sku": "abc-1",
    "price": -2
  }
}

Captured response JSON

{
  "call_id": "b2539d81-d5f8-44e9-ac1e-45ec16f8ede0",
  "valid": false,
  "error_count": 2,
  "errors": [
    {
      "instance_path": "/sku",
      "schema_path": "/properties/sku/pattern",
      "keyword": "pattern",
      "message": "Does not match the required pattern."
    },
    {
      "instance_path": "/price",
      "schema_path": "/properties/price/minimum",
      "keyword": "minimum",
      "message": "Must be at least 0."
    }
  ],
  "errors_truncated": false,
  "ignored_keywords": [],
  "formats_not_enforced": [],
  "notice": "format is reported, not enforced, and pattern runs on RE2, which has no lookaround or backreferences and differs from ECMAScript: \\s matches ASCII whitespace only, dot excludes only a newline so it matches carriage return and U+2028, and inline flags such as (?i) are accepted. Computed in this process; nothing sent here is stored.",
  "checked_at": "2026-11-09T11:57:55.193Z",
  "credits_charged": 1,
  "credits_remaining": 999
}

For agents

Use when

Use this when a task needs to know whether a JSON value satisfies a JSON Schema (2020-12 and draft-07 keywords, local $ref), with the path and reason for every failure, before passing the value to another system.

2 fields

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
schemaobjectRequiredThe JSON Schema, an object or a boolean. Only local $ref is followed; no network reference is fetched.
instance—RequiredThe JSON value to validate, of any type.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
validWhether the instance satisfies the schema.
error_countHow many failures are listed.
errorsEach failure: instance_path, schema_path, keyword and message.
errors_truncatedTrue when the error list reached its cap.
ignored_keywordsUnknown keywords in the schema. JSON Schema says to ignore these, and a typo lands here.
formats_not_enforcedformat values the schema used, which were reported and not checked.
noticeWhat this validator does not enforce.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
schema_required400No schema was sent.
instance_required400No instance was sent.
invalid_schema400The schema is malformed; the response names the path. Not charged.
unsupported_schema_keyword400The schema uses a keyword this validator does not implement: $dynamicRef, $dynamicAnchor, $recursiveRef, $recursiveAnchor, $vocabulary, unevaluatedItems, unevaluatedProperties.
unresolved_ref400A $ref is remote or points nowhere in this schema.
unsupported_regex400A pattern uses lookaround or backreferences, which RE2 does not have.
invalid_pattern400A pattern is not valid RE2 syntax.
pattern_too_costly400A compiled pattern multiplied by the instance size is past the work cap, so it is refused rather than run.
too_many_groups400A pattern has more capture groups than the cap.
document_too_large400schema or instance is larger than 1 MiB.
validation_too_complex422The schema or instance passed a work cap: too many or too long patterns, or too much validation work. Not charged.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

Implements these JSON Schema keywords: $anchor, $comment, $defs, $id, $ref, $schema, additionalItems, additionalProperties, allOf, anyOf, const, contains, contentEncoding, contentMediaType, contentSchema, default, definitions, dependencies, dependentRequired, dependentSchemas, deprecated, description, else, enum, examples, exclusiveMaximum, exclusiveMinimum, format, if, items, maxContains, maxItems, maxLength, maxProperties, maximum, minContains, minItems, minLength, minProperties, minimum, multipleOf, not, oneOf, pattern, patternProperties, prefixItems, properties, propertyNames, readOnly, required, then, title, type, uniqueItems, writeOnly. Pattern matching uses RE2 via re2js (MIT).

PageVerified reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All PageVerified tools · Service list as JSON · OpenAPI

Same key as every PageVerified tool

One key. One balance. 1 credit a call.

Issue a free key, then use it here, on PageVerified Capture and on every other tool in the box.

Get a free key