{"uid":"cap_-7B3LAURDqpm0-dhY4rdR","slug":"touchstone-structured-diff-api-203d56dd","name":"Touchstone Structured Diff API","description":"Exact structured diff. mode=text -> unified diff + line counts; mode=json -> an RFC 6902 JSON Patch (RFC 6901 pointers) that round-trips a->b; mode=words -> inline word-level opcodes. For large inputs use POST. Every answer signed. Free sample, no payment required: GET /play/diff","url":"https://touchstone.locomot.io/diff","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["a","b"],"properties":{"a":{"type":"string","description":"the 'before' input"},"b":{"type":"string","description":"the 'after' input"},"mode":{"type":"string","description":"text | json | words"}}}},"additionalProperties":false},"output":{"type":"object","properties":{"mode":{"type":"string"},"equal":{"type":"boolean"},"patch":{"type":"array"},"op_count":{"type":"integer"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_K_cni_86bqVGK_-onpLNx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes exact structured diffs between two inputs in text (unified diff), JSON (RFC 6902 JSON Patch), or word-level opcode modes, with every response cryptographically signed.","exampleAgentPrompt":"Compare these two JSON blobs and give me an RFC 6902 JSON Patch showing what changed — use mode=json: before is {\"name\":\"Alice\",\"age\":30} and after is {\"name\":\"Alice\",\"age\":31,\"city\":\"NYC\"}.","exampleUseCases":null,"resultDescription":"Returns a structured response containing the diff mode used, a boolean indicating whether the inputs are equal, the patch array (for JSON mode) or diff string (for text/words mode), and an operation count. All responses are cryptographically signed for verifiability.","failureModes":["Missing required 'a' or 'b' query parameters returns a 400 error","Invalid mode value (not text, json, or words) returns an error","For large inputs, GET may fail due to URL length limits — use POST instead","Malformed JSON in 'a' or 'b' when using mode=json may return a parse error","Network timeout on very large payloads"],"whenToPreferThis":"Use this endpoint when you need a deterministic, signed, machine-readable diff between two text or JSON documents — especially when you need RFC 6902 JSON Patch output that can be applied programmatically, or when auditability via cryptographic signature matters. Prefer over ad-hoc LLM diffing when exactness and round-trippability are required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:43:25.089Z","isFirstParty":false}