# Cheap Utilities JSON Diff

> Cheap Utilities JSON Diff is a paid API for AI agents from cheap-utilities.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Computes a structural diff of two JSON documents, reporting added, removed, changed, and type-changed paths with array comparison by index.

## Facts

- Endpoint: GET https://cheap-utilities.x402tookit.com/json-diff?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cheap-utilities-json-diff-40304839
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZsA_lMB0bulnMWkWPIuDC

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 cheap-utilities-json-diff-40304839
```

Example prompt: Can you diff these two JSON documents for me and tell me exactly what was added, removed, or changed? Here's the first one: {"name":"Alice","age":30,"role":"admin"} and the second one: {"name":"Alice","age":31,"role":"user","email":"alice@example.com"}

## When to prefer this

Choose this endpoint when you need a fast, cheap, path-level structural diff of two JSON documents without setting up a local library or running code. It is ideal for agents comparing API responses, config files, or data snapshots where you want a clear enumeration of added, removed, changed, and type-changed paths. It is not suitable for semantic JSON comparison, merging, or diffing very large documents over 3000 characters.

## Known failure modes

- Invalid JSON in parameter 'a' or 'b' returns an error — inputs must be valid JSON strings
- Input exceeding 3000 characters for document 'a' may be rejected or truncated
- Missing required query parameters 'a' or 'b' returns a validation error
- Extremely deeply nested JSON may hit processing limits

## How this service works

Structural diff of two JSON documents: added, removed, changed and type-changed paths, arrays compared by index.

## Output

Returns a structured diff containing a list of changed paths, each annotated with the type of change (added, removed, changed, type-changed), the old and new values, a summary of total differences, and optional metadata like source and 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": [
      "a",
      "b"
     ],
     "properties": {
      "a": {
       "type": "string",
       "description": "First JSON document (up to 3000 characters)"
      },
      "b": {
       "type": "string",
       "description": "Second JSON document"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "changes": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "to": {
          "type": [
           "null",
           "number"
          ]
         },
         "from": {
          "type": [
           "null",
           "number"
          ]
         },
         "path": {
          "type": [
           "null",
           "string"
          ]
         },
         "change": {
          "type": [
           "null",
           "string"
          ]
         }
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "differences": {
       "type": [
        "null",
        "number"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cheap-utilities-json-diff-40304839/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cheap-utilities.x402tookit.com](https://www.zero.xyz/host/cheap-utilities.x402tookit.com/llms.txt)
