{"uid":"cap_5P1wAZiskHIQnigelfBgz","slug":"levenshtein-edit-distance-string-similarity-api-a471b24a","name":"Levenshtein Edit Distance & String Similarity API","description":"Computes the Levenshtein edit distance and a similarity percentage between two strings.","url":"https://dt0ur.online/api/utility/diff?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}}},"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_VCRubgM4iT2R2r62SZiH7","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 the Levenshtein edit distance and a similarity percentage between two input strings.","exampleAgentPrompt":"How similar are the strings 'algorithm' and 'altruistic'? Give me the Levenshtein edit distance and a similarity percentage.","exampleUseCases":[{"title":"Deduplicating customer name records","prompt":"I have two customer name entries — 'Jonathan Smith' and 'Jonathon Smyth' — can you tell me how many edits apart they are and what their similarity score is so I can decide if they're duplicates?"},{"title":"Spell-check candidate word scoring","prompt":"A user typed 'recieve' and I want to suggest 'receive' as a correction — can you compute the Levenshtein distance and similarity percentage between those two words to confirm it's a close enough match?"},{"title":"Comparing product title variants","prompt":"I have two product titles: 'Wireless Bluetooth Headphones Pro' and 'Wireless Bluetoth Headphone Pro' — what's the edit distance and similarity score between them?"}],"resultDescription":"Returns the integer Levenshtein edit distance (minimum number of single-character edits required to transform string a into string b) and a similarity percentage (0–100) indicating how alike the two strings are.","failureModes":["Missing one or both string inputs returns a validation error","Extremely long strings may hit payload size limits","Non-string types for fields a or b may return a type error","Network timeout on high-latency connections"],"whenToPreferThis":"Choose this endpoint when you need a precise, character-level edit distance metric and a normalized similarity score between two strings. It is ideal for fuzzy matching, deduplication, spell-check scoring, or record linkage tasks where semantic meaning is less important than surface-level character similarity.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:45:55.091Z","isFirstParty":false,"canonicalSlug":"levenshtein-edit-distance-string-similarity-api-a471b24a"}