{"uid":"cap_1rSV17OpVKCO8H61raaKg","slug":"agent-prep-json-structural-diff-ab365405","name":"Agent Prep – JSON Structural Diff","description":"Pre-LLM utilities for AI agents: structural JSON diff, JSON path listing, token estimation, text chunking, and truncation. Pay with USDC via x402 — no API keys.","url":"https://agent-prep.annushka1190.workers.dev/v1/json/diff","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"body":{"type":"object"},"type":{"const":"http"},"method":{"enum":["POST"]},"bodyType":{"const":"json"}}}}},"responseSchema":{"type":"json","example":{"added":[],"changed":[{"path":"a","after":2,"before":1}],"removed":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WBVPJVpi1WN_CiMd3q_c4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","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 between two JSON objects, returning added, removed, and changed fields with before/after values.","exampleAgentPrompt":"Can you diff these two JSON objects and tell me exactly which fields were added, removed, or changed — I want to see the before and after values for anything that shifted?","exampleUseCases":[{"title":"Detecting config drift between deployments","prompt":"I have two versions of a service config object — one from before yesterday's deploy and one from after. Can you diff them and show me which keys changed, which were added, and which were removed?"},{"title":"Auditing API response changes","prompt":"I'm getting slightly different responses from this API across two calls and I want to know exactly what changed structurally. Can you compare these two JSON payloads and list every field that's different with the old and new values?"},{"title":"Monitoring data record mutations","prompt":"I saved a customer record before and after an update operation. Can you diff the two JSON objects so I can see precisely what fields were modified, added, or deleted?"}],"resultDescription":"A JSON object with three arrays: 'added' (fields present only in the new object), 'removed' (fields present only in the old object), and 'changed' (fields present in both but with different values, each entry showing the path, before value, and after value).","failureModes":["Missing or malformed input body returns a validation error","Non-JSON body types are rejected (bodyType must be 'json')","Payment not included or insufficient USDC causes a 402 Payment Required response","Deeply nested or extremely large JSON objects may hit size/timeout limits","Method other than POST returns 405"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pre-LLM structural diff of two JSON objects without writing custom comparison logic — especially useful in agentic pipelines where you want to understand what changed between two API responses, config states, or data snapshots before passing the delta to an LLM. It's pay-per-call with no API key required, making it easy to integrate into ephemeral agent workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:30:11.392Z","isFirstParty":false}