{"uid":"cap_G7j7jHDSaKBwUnOmKCAPw","slug":"json-structural-diff-5d882860","name":"JSON Structural Diff","description":"Structural diff of two JSON documents: every added, removed, changed or retyped path.","url":"https://json-data-tools.x402tookit.com/json-diff?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":"Original JSON (up to 2000 chars)"},"b":{"type":"string","description":"New JSON"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"total":{"type":["null","number"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"truncated":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"differences":{"type":["array","null"],"items":{"type":"object","properties":{"to":{"type":["boolean","null","number"]},"from":{"type":["null","number","string"]},"path":{"type":["null","string"]},"change":{"type":["null","string"]}}}}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jQ4eYDvoxtlVNRo0oDPsy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs a structural diff of two JSON documents, identifying every added, removed, changed, or retyped path.","exampleAgentPrompt":"Can you diff these two JSON objects and tell me every path that was added, removed, changed, or retyped? Here's the original: {\"name\":\"Alice\",\"age\":30,\"active\":true} and here's the new version: {\"name\":\"Alice\",\"age\":31,\"role\":\"admin\"}.","exampleUseCases":[{"title":"API response change detection","prompt":"I'm getting a different response from this API than I was last week — can you compare these two JSON payloads and list every field that was added, removed, or changed? Old: {\"status\":\"ok\",\"count\":5,\"items\":[1,2,3]} New: {\"status\":\"ok\",\"count\":6,\"items\":[1,2,3,4],\"page\":1}"},{"title":"Config file version comparison","prompt":"We deployed a new config yesterday and I want to know exactly what changed. Can you diff this old config JSON: {\"timeout\":30,\"retries\":3,\"debug\":false} against the new one: {\"timeout\":60,\"retries\":3,\"debug\":true,\"logLevel\":\"info\"} and show me each changed path?"},{"title":"Data migration validation","prompt":"After migrating our user record, I need to verify what fields were altered. Please compare the before JSON {\"id\":\"u1\",\"email\":\"a@b.com\",\"plan\":\"free\",\"credits\":0} with the after JSON {\"id\":\"u1\",\"email\":\"a@b.com\",\"plan\":\"pro\",\"credits\":100,\"trialEnd\":\"2025-12-01\"} and list every difference with the old and new values."}],"resultDescription":"An array of difference objects, each containing the JSON path, the type of change (added, removed, changed, retyped), the original value (from), and the new value (to). Also includes a summary, truncation flag, and metadata fields like source and asOf.","failureModes":["Input JSON exceeds 2000 character limit — response may indicate truncation","Malformed or invalid JSON in either parameter — endpoint may return an error or partial results","Missing required query parameters 'a' or 'b' — results in a bad request error","Non-JSON string passed as input — may fail to parse and return an error response"],"whenToPreferThis":"Use this endpoint when you need a precise, path-level structural diff between two JSON documents, especially when you need to know not just whether values changed but also whether types changed (retyped). Prefer this over manual comparison or generic text diff tools when working with structured JSON data in agent workflows, CI pipelines, or data migration validation tasks. Best for JSON documents under 2000 characters each.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:25.528Z","isFirstParty":false,"canonicalSlug":"json-structural-diff-5d882860"}