{"uid":"cap_rdEImYj3tXNX1HbaafGKj","slug":"agent402-uk-string-similarity-8a7e20d2","name":"Agent402 UK String Similarity","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/utils/similarity?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string","description":"First string"},"b":{"type":"string","description":"Second string"}}},"responseSchema":{"type":"json","example":{"ratio":0.571,"levenshtein":3}},"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__-XWTIV43fmod9ZO-uYBq","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 Levenshtein edit distance and similarity ratio between two input strings (up to 2,000 characters each) for fuzzy matching and deduplication.","exampleAgentPrompt":"Can you check how similar these two strings are: 'Jonathan Smith' and 'Jonathon Smyth'? I need the Levenshtein distance and the similarity ratio to decide if they're duplicates.","exampleUseCases":[{"title":"Deduplicating customer name records","prompt":"I've got two customer names from different databases: 'Acme Corp Ltd' and 'ACME Corporation' — can you give me the Levenshtein distance and similarity ratio so I can decide whether to merge them?"},{"title":"Fuzzy product title matching","prompt":"I need to check if 'Apple iPhone 14 Pro Max 256GB' and 'iPhone 14 Pro Max 256 GB Apple' are close enough to be considered the same product — what's the similarity ratio?"},{"title":"Validating address deduplication","prompt":"Are '123 Baker Street, London' and '123 Baker St London' the same address? Can you compute the edit distance and similarity score so I can set a dedup threshold?"}],"resultDescription":"A JSON object containing a floating-point similarity ratio (0.0–1.0, where 1.0 is identical) and an integer Levenshtein edit distance representing the minimum number of single-character edits needed to transform string a into string b.","failureModes":["Either string exceeds the 2,000-character cap — request is rejected or truncated","Missing required field 'a' or 'b' returns a validation error","Non-string input types may cause a 400 bad request","Empty string inputs may return ratio 1.0 or 0.0 depending on implementation edge cases"],"whenToPreferThis":"Choose this endpoint when you need a fast, exact Levenshtein-based string comparison mid-task — e.g. during deduplication pipelines, record linkage, fuzzy name matching, or address normalization — especially when you need both the raw edit distance and the normalized ratio in a single call. Prefer it over embedding-based similarity when you want a deterministic, character-level metric rather than semantic closeness.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:45:52.495Z","isFirstParty":false,"canonicalSlug":"agent402-uk-string-similarity-8a7e20d2"}