{"uid":"cap_3EJH4kKwpj6n69eNT2wAR","slug":"text-similarity-fuzzy-rank-09dc7e7d","name":"Text Similarity Fuzzy Rank","description":"Rank up to 50 candidates against a query by Jaro-Winkler, Levenshtein, Dice or cosine, best first, with scores.","url":"https://text-similarity.x402tookit.com/fuzzy-rank?utm_source=zero.xyz","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"],"type":"string"},"queryParams":{"type":"object","required":["query","candidates"],"properties":{"limit":{"type":"integer","description":"Return only the top N, 1 to 50 (default all)"},"query":{"type":"string","description":"The text to match, up to 200 characters"},"scorer":{"enum":["jaro-winkler","levenshtein","dice","cosine"],"type":"string","description":"jaro-winkler (default), levenshtein, dice (character bigram set) or cosine (word counts)"},"minScore":{"type":"number","description":"Drop candidates scoring below this, 0 to 1 (default 0)"},"candidates":{"type":"string","description":"Up to 50 candidates separated by | or newlines, or a JSON array of strings; 200 characters each"},"ignoreCase":{"type":"boolean","description":"true (default) lowercases query and candidates"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"query":{"type":["null","string"]},"ranked":{"type":["array","null"],"items":{"type":"object","properties":{"rank":{"type":["null","number"]},"index":{"type":["null","number"]},"score":{"type":["null","number"]},"candidate":{"type":["null","string"]}}}},"scorer":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"returned":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"ignoreCase":{"type":["boolean","null"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"candidateCount":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YL5Y5CyKp7XA9oUl3RSE-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Ranks up to 50 candidate strings against a query using Jaro-Winkler, Levenshtein, Dice, or cosine similarity, returning results sorted best-first with scores.","exampleAgentPrompt":"I have a query 'Jonathan Smith' and a list of 10 name candidates — can you rank them by similarity using Jaro-Winkler and only return the top 3 results with scores above 0.6?","exampleUseCases":[{"title":"Product name deduplication pipeline","prompt":"I have a master product name 'Wireless Noise-Cancelling Headphones' and a list of 30 user-submitted variants — rank them all by cosine similarity so I can see which ones are basically the same and flag the ones scoring below 0.5."},{"title":"Autocomplete candidate ranking","prompt":"A user typed 'Shakespear' as a search query — here are 20 book titles they might have meant, can you rank them by Jaro-Winkler similarity so I can surface the best autocomplete suggestions first?"},{"title":"Address matching for data enrichment","prompt":"I need to match the address '123 Elm Street' against a list of 15 stored address strings and get them ranked by Levenshtein similarity, returning only the top 5 closest matches."}],"resultDescription":"A JSON object containing the original query, the scorer used, and a ranked array of candidates each with their rank number, original index, similarity score, and the candidate text — sorted best-first. Also includes metadata like total candidate count, how many were returned, and whether the response was degraded.","failureModes":["Missing required 'query' or 'candidates' parameter returns a validation error","More than 50 candidates submitted causes rejection or truncation","Candidate or query strings exceeding 200 characters may be rejected","Invalid scorer enum value returns an error","minScore outside 0–1 range causes a validation error","Malformed candidates string (not pipe-separated, newline-separated, or JSON array) causes parse failure","Network timeout if candidates list is very large near the 50-item limit"],"whenToPreferThis":"Use this endpoint when you need to rank multiple candidate strings against a single query in one call, rather than comparing pairs one at a time. It is ideal for autocomplete ranking, fuzzy search result sorting, deduplication pipelines, and name matching tasks where you want to quickly identify the best matches from a list. Prefer Jaro-Winkler for short names and typos, Levenshtein for edit-distance-based matching, Dice for character n-gram overlap, and cosine for longer multi-word texts. Choose this over individual pairwise comparison endpoints when you have a batch of candidates to evaluate simultaneously.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:19:51.552Z","isFirstParty":false,"canonicalSlug":"text-similarity-fuzzy-rank-09dc7e7d"}