# pastable-x402 JSON Diff

> pastable-x402 JSON Diff is a paid API for AI agents from pastable-x402.pages.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Compares two JSON objects and returns a structured list of differences (added, removed, changed fields) with path information.

## Facts

- Endpoint: GET https://pastable-x402.pages.dev/data/json-diff
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pastable-x402-json-diff-66ad5eef
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IgYNuHxTSxkOl-pJomT64

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 pastable-x402-json-diff-66ad5eef
```

Example prompt: Compare these two JSON objects and show me what changed: A is {"n":1,"name":"Alice"} and B is {"n":2,"name":"Alice"} — list every field that differs with the old and new values.

## When to prefer this

Use this endpoint when you need a structured, machine-readable field-level diff between two JSON documents — especially when you need path notation and old/new values programmatically rather than a human-readable text diff. Ideal for agents monitoring API response drift, auditing config changes, or validating data pipeline outputs. Prefer over text-based diff tools when the input is guaranteed JSON and you need to parse the results downstream.

## Known failure modes

- Malformed JSON in 'a' or 'b' query params returns an error response
- Missing required 'a' or 'b' query parameters results in a 400-style error
- Very large JSON objects may produce a truncated diff (truncated: true in response)
- Payment failure or insufficient USDC balance blocks the call via x402 protocol

## How this service works

Pay-per-call utility APIs for agents: EVM helpers (checksum, unit conversion, keccak), data transforms (CSV to JSON, JSON diff, URL canonicalisation), text tools (hashing, JWT decode), and Bazaar market intelligence. x402 on Base mainnet.

## Output

Returns a JSON object containing a 'diffs' array where each element describes one change with 'path' (dot-notation field path), 'from' (old value), and 'to' (new value). Also returns a 'differences' integer count and a 'truncated' boolean indicating if the diff was too large to return in full.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "a",
      "b"
     ],
     "properties": {
      "a": {
       "type": "string",
       "description": "json"
      },
      "b": {
       "type": "string",
       "description": "json"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "diffs": [
   {
    "to": 2,
    "from": 1,
    "path": ".n"
   }
  ],
  "truncated": false,
  "differences": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pastable-x402-json-diff-66ad5eef/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pastable-x402.pages.dev](https://www.zero.xyz/host/pastable-x402.pages.dev/llms.txt)
