Levenshtein Distance
The /levenshtein endpoint allows you to calculate the Levenshtein distance between two strings. This distance represents the minimum number of operations required to transform one string into another.
How it works?
The Levenshtein distance counts the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one string into another. Useful for spell checking, fuzzy matching, DNA analysis, and plagiarism detection.
curl -X GET \ "https://api.moxon.dev/v5/levenshtein"Send the request to see the response here.
str1stringrequiredThe first string (max 1000 characters)
str2stringrequiredThe second string (max 1000 characters)
str1stringThe first input string
str2stringThe second input string
distancenumberThe Levenshtein distance between the two strings
If parameters are missing or invalid, the API will return an error:
- 400
Please provide a first string (?str1={string})Thestr1parameter is missing - 400
Please provide a second string (&str2={string})Thestr2parameter is missing
Last updated on September 13, 2026