{"uid":"cap_U9_CkV_FfzS1aPuqkNfUd","slug":"saylor-innovations-data-desk-json-diff-da80112f","name":"Saylor Innovations Data Desk – JSON Diff","description":"Compare two JSON documents - every added, removed, changed or retyped path with old and new values, plus a summary count by operation","url":"https://saylorinnovations.com/api/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":"First JSON document, up to 6000 characters"},"b":{"type":"string","description":"Second JSON document, up to 6000 characters"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["identical","changes","diff"],"properties":{"diff":{"type":"array","items":{"type":"object","properties":{"op":{"description":"Operation performed"},"to":{"description":"End of the range"},"from":{"description":"Start of the range"},"path":{"type":["string","null"],"description":"JSONPath of the difference"}}},"description":"Differences with path, operation and old and new values"},"note":{"type":"string","description":"Caveat or context for reading the result"},"by_op":{"type":"object","properties":{"added":{"type":["number","null"],"description":"Added keys"},"changed":{"type":["number","null"],"description":"Changed values"},"removed":{"type":["number","null"],"description":"Removed keys"}},"description":"By op"},"source":{"type":"string","description":"Data source the values come from"},"changes":{"type":"number","description":"Number of differences found"},"identical":{"type":"boolean","description":"True when the documents are equal"},"truncated":{"type":"boolean","description":"True when the list was cut at the limit"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1S7M5UIfoX4G7t5GKHVkc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compare two JSON documents and return every added, removed, changed, or retyped path with old/new values and a summary count by operation","exampleAgentPrompt":"Can you diff these two JSON documents for me and tell me exactly which paths were added, removed, or changed — here's the before: {\"name\":\"Alice\",\"age\":30,\"city\":\"NY\"} and the after: {\"name\":\"Alice\",\"age\":31,\"email\":\"alice@example.com\"}?","exampleUseCases":[{"title":"API response regression check","prompt":"I have two versions of an API response — the one from yesterday and today's — can you compare them and tell me every field that changed, was added, or disappeared, with the old and new values?"},{"title":"Config file change audit","prompt":"Before I deploy, compare these two JSON config files and list every difference by JSONPath so I can audit what changed: here's the old config and here's the new one."},{"title":"Database record snapshot diff","prompt":"I saved a JSON snapshot of a user record before and after an update — can you diff them and give me a count of how many fields were added, changed, or removed?"}],"resultDescription":"Returns a JSON object with: an `identical` boolean, a `changes` count, a `diff` array where each entry has a JSONPath, operation type (added/removed/changed/retyped), and from/to values, a `by_op` summary with counts per operation type, and optional `note` and `truncated` flags if the result was cut off.","failureModes":["Missing required query parameters `a` or `b` returns an error","Input JSON string exceeds 6000 character limit and is rejected","Malformed JSON in either parameter causes a parse error","Very large or deeply nested documents may hit the truncation limit, indicated by `truncated: true` in the response","Network or service unavailability returns a non-200 status"],"whenToPreferThis":"Choose this endpoint when you need a structured, machine-readable JSON diff with explicit JSONPaths, operation types, and old/new values — especially when you want a summary count by operation type. Prefer it over generic text-based diff tools when downstream code needs to process the differences programmatically. Best suited for JSON documents under 6000 characters each.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:38:31.003Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-data-desk-json-diff-da80112f"}