# Saylor Innovations JSON Validator

> Saylor Innovations JSON Validator is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-17).

Validates whether a string is valid JSON and returns structural metadata including type, size, depth, key count, and error location

## Facts

- Endpoint: GET https://saylorinnovations.com/api/json/validate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-json-validator-cd2e0fcc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_M9REJWVup-ibnR9XZpCRD

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 saylor-innovations-json-validator-cd2e0fcc
```

Example prompt: Can you check if this JSON is valid and tell me where the error is if it isn't: '{"name": "Alice", "age": 30, "address": {"city": "New York"}'

## When to prefer this

Choose this endpoint when you need to validate JSON syntax and simultaneously get structural metadata (depth, key count, size, error location) in a single call. It is ideal for developer tools, data pipelines, or agent workflows that need to gate on JSON correctness before further processing. Prefer it over client-side parsing when you need a neutral third-party validation with rich diagnostic output including exact error line and column.

## Known failure modes

- Input JSON text exceeds 100,000 character limit — request rejected
- Missing required 'json' query parameter — validation cannot proceed
- Network or server error returns non-200 response
- Payment of $0.01 USDC not fulfilled via x402 protocol — 402 response returned
- Malformed query string encoding causes incorrect JSON to be received

## How this service works

JSON validator - checks whether text is valid JSON, with type, size, depth, key count and error line and column

## Output

Returns a JSON object with: a boolean 'valid' field indicating whether the input is valid JSON; 'type' describing the JSON value type (object, array, string, etc.); 'bytes' for size; 'max_depth' for nesting depth; 'total_keys' for key count; 'top_level_items' for array/object size at root; and on failure, 'error' message plus 'line' and 'column' pinpointing where parsing failed. Also includes 'checked_at' UTC timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "json"
     ],
     "properties": {
      "json": {
       "type": "string",
       "description": "JSON text to validate (max 100,000 chars)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "valid"
     ],
     "properties": {
      "line": {
       "type": [
        "number",
        "null"
       ],
       "description": "Line number or text of the line"
      },
      "type": {
       "type": "string",
       "description": "Type or kind"
      },
      "bytes": {
       "type": "number",
       "description": "Size in bytes"
      },
      "error": {
       "type": "string",
       "description": "Error message, if any"
      },
      "valid": {
       "type": "boolean",
       "description": "True when the input passed validation"
      },
      "column": {
       "type": [
        "number",
        "null"
       ]
      },
      "max_depth": {
       "type": "number",
       "description": "Max depth"
      },
      "checked_at": {
       "type": [
        "string",
        "null"
       ],
       "description": "Time the check was run (UTC)"
      },
      "total_keys": {
       "type": "number",
       "description": "Total keys"
      },
      "top_level_items": {
       "type": [
        "number",
        "null"
       ],
       "description": "Top level items"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-json-validator-cd2e0fcc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
