{"uid":"cap_WvzspcbEkcNe7G20wqYyl","slug":"json-structural-drift-25ac4362","name":"JSON Structural Drift","description":"Compare a batch of documents against one reference document and report where the shape drifted: locations the reference has that the batch lacks, locations that changed type, and locations the batch added. Array indices are generalised, so a two-item list and a three-item list are the same shape. Useful when you have an example payload and no schema.","url":"https://api.zfinia.com/x402/v1/json-structural-drift?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"documents":{"type":"array","items":{},"maxItems":500,"minItems":1},"reference":{},"allow_additional":{"type":"boolean"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BXftQKq-KFIOucxM7j7fW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares a batch of JSON documents against a reference document to detect shape drift: missing paths, changed types, and added paths, with arrays normalized by shape rather than index.","exampleAgentPrompt":"I have a reference JSON payload from our API and a batch of 50 recent responses — can you compare them all against the reference and tell me which paths are missing, which changed type, and which are new additions?","exampleUseCases":[{"title":"API response drift detection","prompt":"We have an example payload from our payment provider and 200 live responses collected this week — compare the batch against the example and tell me which fields disappeared, which changed type, and which new fields appeared."},{"title":"ETL pipeline shape validation","prompt":"Before I load these 300 JSON documents into our data warehouse, check them against our canonical reference document and flag any structural drift — missing keys, type changes, or unexpected additions."},{"title":"Third-party webhook consistency check","prompt":"We've been receiving webhooks from a vendor for a month and I think the shape has changed — compare this month's batch of payloads against the very first one we received and report any structural differences."}],"resultDescription":"Returns a drift report listing: paths present in the reference but missing from batch documents, paths that exist in both but whose JSON type changed, and paths that appear in the batch but not in the reference. Array indices are generalized so shape differences are not confused with size differences.","failureModes":["Empty or malformed documents array returns a validation error","Reference document missing causes a 400 bad request","Batch exceeds 500 items returns a 422 or limit error","Deeply nested or circular-like structures may produce verbose output","Non-JSON input types cause parse errors"],"whenToPreferThis":"Choose this endpoint when you have a real example payload but no formal JSON Schema or OpenAPI spec, and you need to quickly understand how a batch of documents has drifted from that reference shape. It is especially useful for monitoring third-party API responses, ETL data quality checks, or any scenario where the source of truth is a sample document rather than a written schema.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:36:58.774Z","isFirstParty":false,"canonicalSlug":"json-structural-drift-25ac4362"}