# FastX402 JSON Semantic Diff

> FastX402 JSON Semantic Diff is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Compares two JSON objects or arrays and returns a structured semantic diff showing added, removed, and modified fields with their paths and values.

## Facts

- Endpoint: GET https://fastx402.tools/json-diff-semantic?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-json-semantic-diff-5a635566
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CC5DYmMTCrEVdIR62AY5a

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 fastx402-json-semantic-diff-5a635566
```

Example prompt: Compare these two JSON objects and tell me what fields were added, removed, or changed — before: {"age":30,"tags":["admin","user"],"active":true} and after: {"age":31,"tags":["admin","moderator"],"status":"active"}.

## When to prefer this

Use this endpoint when you need a structured, path-level semantic diff of two JSON objects or arrays — especially when you want to programmatically consume the diff (added/removed/modified lists with field paths) rather than a raw text comparison. Prefer this over generic text diff tools when working with API payloads, config objects, or any structured data where field-level change tracking matters.

## Known failure modes

- Malformed JSON in 'before' or 'after' params causes parse error
- Missing required 'before' or 'after' query parameters returns validation error
- Very large or deeply nested JSON may hit size limits
- Non-JSON strings passed as parameters return error

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object listing added fields (path + new value), removed fields (path + old value), and modified fields (path + before value + after value), plus a human-readable summary string such as '2 modified, 1 added, 1 removed'.

## 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": [
      "before",
      "after"
     ],
     "properties": {
      "after": {
       "type": "string",
       "description": "Second JSON object or array"
      },
      "before": {
       "type": "string",
       "description": "First JSON object or array"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "added": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "path": {
          "type": "string"
         },
         "value": {
          "type": "string"
         }
        }
       }
      },
      "removed": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "path": {
          "type": "string"
         },
         "value": {
          "type": "boolean"
         }
        }
       }
      },
      "summary": {
       "type": "string"
      },
      "modified": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "path": {
          "type": "string"
         },
         "after": {
          "type": "integer"
         },
         "before": {
          "type": "integer"
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "added": [
   {
    "path": "status",
    "value": "active"
   }
  ],
  "removed": [
   {
    "path": "active",
    "value": true
   }
  ],
  "summary": "2 modified, 1 added, 1 removed",
  "modified": [
   {
    "path": "age",
    "after": 31,
    "before": 30
   },
   {
    "path": "tags[1]",
    "after": "moderator",
    "before": "user"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-json-semantic-diff-5a635566/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
