{"uid":"cap_OP9vCrmmaNR0itqh-zwoG","slug":"sindri-text-diff-myers-algorithm-f87e1421","name":"Sindri Text Diff (Myers Algorithm)","description":"Line-based diff between two strings using the Myers diff algorithm (via the diff/jsdiff library), returning a list of equal/add/remove operations.","url":"https://x402.outpimp.com/diffText","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"textA":{"type":"string","description":"Original text. Max 50,000 characters and 2,000 lines."},"textB":{"type":"string","description":"Modified text. Max 50,000 characters and 2,000 lines."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mJqJ1zRFCiAajVpyFg6NB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a line-based diff between two text strings using the Myers diff algorithm, returning a structured list of equal, add, and remove operations.","exampleAgentPrompt":"Can you diff these two versions of my config file and tell me exactly which lines were added, removed, or stayed the same? Here's the original: 'server: localhost\nport: 8080\ndebug: false' and here's the updated version: 'server: localhost\nport: 9090\ndebug: true\nlog: verbose'","exampleUseCases":[{"title":"Code review change detection","prompt":"I have two versions of a Python script — the original and the edited one. Can you run a line-by-line diff and show me exactly which lines were added or removed?"},{"title":"Document revision tracking","prompt":"Compare these two drafts of my cover letter and tell me what lines changed, what was added, and what was deleted between version 1 and version 2."},{"title":"Config file audit","prompt":"I need to audit what changed between our old nginx.conf and the new one deployed yesterday — can you diff them line by line and list every addition and removal?"}],"resultDescription":"A structured list of diff operations, each indicating whether a segment of text is unchanged ('equal'), newly added ('add'), or removed ('remove'), covering all lines between the two input strings.","failureModes":["Input text exceeds 50,000 characters or 2,000 lines — request rejected with size limit error","Missing textA or textB fields in request body — validation error returned","Empty strings provided — returns a single 'equal' operation with empty value","Network or payment failure — HTTP 402 or 5xx error with no diff result"],"whenToPreferThis":"Use this endpoint when you need a deterministic, line-level diff between two text strings using the well-established Myers algorithm, especially when you want structured add/equal/remove operations rather than a raw patch format. It is ideal for comparing config files, code snippets, document revisions, or any line-oriented text up to 50,000 characters. Prefer this over regex-based or word-level comparisons when line-granularity is important.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:45:27.798Z","isFirstParty":false}