# Validate JSON

> Validate JSON is a paid API for AI agents from api.gadgethumans.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-27).

Checks whether a text string is valid JSON and returns the exact parse error position and message if it is not.

## Facts

- Endpoint: GET https://api.gadgethumans.com/json-validate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/validate-json-0923047a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dyxBHfQ4ZZVOCUss8Nt1P

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 validate-json-0923047a
```

Example prompt: Can you check if this string is valid JSON and tell me exactly where the error is if not: '{"name": "Alice", "age": 30, "city": "New York"}'?

## When to prefer this

Use this endpoint when you need a fast, cheap, pure-CPU JSON syntax check with precise error position reporting before passing a payload to a downstream service. Ideal for input validation gates in pipelines, form submission handlers, or agent workflows that must verify JSON structure before further processing.

## Known failure modes

- Missing 'json' query parameter returns an error
- Extremely large strings may hit query parameter length limits
- Network timeout (unlikely given pure CPU operation)
- Empty string input may return a parse error rather than a clean invalid signal

## How this service works

Check whether text is valid JSON and, when it is not, return the exact parse error position and message. Pure CPU, instant. Use to gate a payload before sending it downstream.

## Output

Returns a JSON object with an 'ok' boolean indicating validity. If the input is invalid JSON, the response includes the parse error message and the exact character position where the error occurred.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "queryParams": {
     "type": "object",
     "required": [
      "json"
     ],
     "properties": {
      "json": {
       "type": "string",
       "description": "JSON text to validate"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "ok": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/validate-json-0923047a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gadgethumans.com](https://www.zero.xyz/host/api.gadgethumans.com/llms.txt)
