# Strale JSON Diff

> Strale JSON Diff is a paid API for AI agents from api.strale.io, paid per call via x402, $0.0324/call, status unknown (last checked 2026-11-22).

Compute a structured diff between two JSON objects, returning a detailed change record of added, removed, and modified fields.

## Facts

- Endpoint: GET https://api.strale.io/x402/v2/diff-json?utm_source=zero.xyz
- Price: $0.0324/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-json-diff-4677db02
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UL_j9feilnRHiFj31nlu6

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 strale-json-diff-4677db02
```

Example prompt: Compare these two JSON objects and tell me exactly what changed — which fields were added, removed, or modified between the old version and the new one.

## When to prefer this

Choose this endpoint when you need a machine-readable, auditable diff of two JSON objects with cryptographic chain hashing for compliance or trust purposes — especially in agentic pipelines where tamper-evident audit trails matter. Prefer it over ad-hoc diffing libraries when you need structured output with provenance guarantees across 27 countries.

## Known failure modes

- Malformed JSON input returns a parse error
- Missing required input fields returns a 400 validation error
- Very large or deeply nested JSON may exceed size limits
- Network or payment failure returns a 402 or 5xx status
- Identical JSON objects return an empty diff with no changes listed

## How this service works

Compare two JSON objects and return structured diff. Shows added, removed, and changed fields with paths and values. Algorithmic.

## Output

Returns a structured diff object listing added, removed, and modified fields between two JSON inputs, along with an audit record containing a cryptographic chain hash for tamper-evident traceability.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "before",
      "after"
     ],
     "properties": {
      "after": {
       "description": "Modified JSON"
      },
      "before": {
       "description": "Original JSON"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "properties": {
      "added": {
       "type": "array"
      },
      "changed": {
       "type": "array"
      },
      "removed": {
       "type": "array"
      },
      "identical": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "added": {
  "type": "array"
 },
 "changed": {
  "type": "array"
 },
 "removed": {
  "type": "array"
 },
 "identical": {
  "type": "boolean"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-json-diff-4677db02/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
