Text
Fuzzy best match API
Ranks a list of candidate strings against a query using a blended Levenshtein-ratio + Jaro-Winkler score, returning the best match and a full ranked list with per-candidate scores. Answers 'which option in this list does my query most likely mean?', 'how confident is the match?'.
Price$0.03per request
MethodPOST
Route/v1/text/fuzzy-best-match
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textfuzzybest-matchsearchautocompleterankingmatchingdid-you-mean
API URL
Integration docshttps://x402.hexl.dev/v1/text/fuzzy-best-matchExample request
{
"query": "aple",
"candidates": [
"apple",
"maple",
"grape",
"applet"
],
"limit": 3
}Example response
{
"bestMatch": "apple",
"bestScore": 0.873333,
"bestIndex": 0,
"ranked": [
{
"candidate": "apple",
"index": 0,
"score": 0.873333,
"levenshtein": 1,
"levRatio": 0.8,
"jaroWinkler": 0.946667
},
{
"candidate": "maple",
"index": 1,
"score": 0.866667,
"levenshtein": 1,
"levRatio": 0.8,
"jaroWinkler": 0.933333
},
{
"candidate": "applet",
"index": 3,
"score": 0.788889,
"levenshtein": 2,
"levRatio": 0.666667,
"jaroWinkler": 0.911111
}
],
"interpretation": "probable match"
}Input schema
{
"type": "object",
"required": [
"query",
"candidates"
],
"properties": {
"query": {
"type": "string",
"examples": [
"aple"
]
},
"candidates": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"apple",
"maple",
"grape",
"applet"
]
]
},
"limit": {
"type": "number",
"examples": [
3
]
},
"caseSensitive": {
"type": "boolean"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}