{"uid":"cap_KzIG8-Vn0sdHnaJpqDfjt","slug":"text-diff-before-after-comparison-3db3ea37","name":"Text Diff (Before/After Comparison)","description":"Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.","url":"https://x402-gateway-production-1f21.up.railway.app/text/diff?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["before","after"],"properties":{"after":{"type":"string","maxLength":125000},"before":{"type":"string","maxLength":125000}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"status":"ready"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_dPT006sUbithyS7AqrC6-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a deterministic diff between two text strings, returning structured change information for detecting what content was added, removed, or modified.","exampleAgentPrompt":"Compare these two versions of our privacy policy and tell me exactly what changed — here's the old version: 'We collect your email and usage data.' and the new version: 'We collect your email, location, and usage data, and share it with partners.'","exampleUseCases":[{"title":"Policy change monitoring for compliance","prompt":"I scraped our vendor's terms of service last week and again today — can you diff the two versions and tell me what sections changed? Old text: 'Payment terms are net-30.' New text: 'Payment terms are net-15 and subject to a 2% late fee.'"},{"title":"Detecting price list updates on supplier sites","prompt":"Here are two snapshots of our supplier's pricing page — before: 'Widget A: $4.50, Widget B: $7.00' and after: 'Widget A: $5.25, Widget B: $7.00' — show me exactly what prices changed."},{"title":"Tracking documentation edits between releases","prompt":"Our API docs were updated between v1 and v2 — can you diff the old endpoint description against the new one and highlight the differences? Before: 'Returns a list of users.' After: 'Returns a paginated list of active users with optional filter parameters.'"}],"resultDescription":"A JSON response with status and structured diff output indicating what text content was added, removed, or modified between the 'before' and 'after' inputs. The result is deterministic — identical inputs always produce identical output.","failureModes":["Input text exceeding 125,000 characters returns a validation error","Missing 'before' or 'after' fields causes a 400 bad request","Invalid bodyType (not json, form-data, or text) causes request rejection","Payment failure via x402 protocol results in 402 response before processing","Empty strings for both before and after may return an empty diff"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, machine-readable diff between two text snapshots — especially for automated change monitoring pipelines (e.g. tracking webpage content, policy documents, pricing pages). Prefer it over manual string comparison when you need structured output suitable for RAG ingestion or downstream processing. It is pay-per-call at $0.001 USDC via x402, making it cost-effective for high-frequency monitoring agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:38:39.125Z","isFirstParty":false,"canonicalSlug":"text-diff-before-after-comparison-3db3ea37"}