{"uid":"cap_iycB4ofjW-H_hNs7i6d39","slug":"json-structural-diff-4bd3f755","name":"JSON Structural Diff","description":"Structural diff of two JSON documents; returns added / removed / changed paths (JSONPath-style) as a patch, plus an equal flag. Ideal for config drift.","url":"https://api.24klabs.ai/api/json-diff","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"object"},"b":{"type":"object"}}},"responseSchema":{"type":"json","example":{"equal":false,"changed":[{"to":3,"from":2,"path":"replicas"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dNF9Fb2GFYrlMMfwMKyJp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a structural diff of two JSON documents, returning added, removed, and changed paths in JSONPath-style patch format plus an equality flag.","exampleAgentPrompt":"Can you diff these two JSON configs and tell me exactly which paths were added, removed, or changed — I need to know if there's any config drift between my baseline and the current deployment settings.","exampleUseCases":[{"title":"Config drift detection in CI pipeline","prompt":"Compare these two JSON config files — the baseline from last deploy and the current one — and tell me every path that was added, removed, or changed so I can catch any unexpected drift before we ship."},{"title":"API response schema change audit","prompt":"I have two versions of an API response JSON, the one from last week and today's. Can you diff them structurally and show me which fields appeared, disappeared, or got different values?"},{"title":"Feature flag state comparison","prompt":"Here are two JSON snapshots of our feature flag configuration — one from this morning and one from an hour ago. Tell me if they're equal or what exactly changed, added, or was removed between them."}],"resultDescription":"Returns a patch object containing arrays of added, removed, and changed JSONPath-style paths with their old and new values, plus a boolean 'equal' flag indicating whether the two documents are structurally identical.","failureModes":["Invalid JSON in either document returns a parse error","Malformed request body (missing either document) returns a 400-level error","Very large or deeply nested JSON may hit size or recursion limits","Payment not included or insufficient USDC triggers x402 payment-required response"],"whenToPreferThis":"Choose this endpoint when you need a precise, path-level structural comparison of two JSON documents — especially for config drift detection, schema evolution auditing, or automated change detection in CI/CD pipelines. It is purpose-built for JSON and returns machine-readable JSONPath-style patches rather than a raw text diff, making it easier for agents to act on specific changed fields.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:56:14.696Z","isFirstParty":false}