Levenshtein Distance API

POST

Score the similarity between any two pieces of text.

Levenshtein Distance calculates the minimum number of single-character edits needed to transform one string into another.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/levenshteindistance
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "distance": 3,
    "similarity": 57.14,
    "matchLevel": "medium",
    "string1Length": 6,
    "string2Length": 7,
    "string1": "kitten",
    "string2": "sitting"
  }
}

About the Levenshtein Distance API

Ideal for spell checking, fuzzy matching, plagiarism detection, and any application requiring string similarity measurement.

What people use it for

Spell Checking
Calculate similarity between misspelled words and dictionary entries
Fuzzy Search
Implement approximate string matching for search engines
Plagiarism Detection
Measure text similarity for detecting copied content
Data Deduplication
Identify near-duplicate records in databases

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Levenshtein Distance

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Levenshtein Distance API.

Read the docs
How far does the Starter plan go for string comparisons?
Starter covers 100,000 comparisons every month at 2 credits per call. That works out to about $0.30 per 1,000 comparisons. If you only need to run quick tests, the Free plan includes 100 comparisons each month.
How long can the text inputs be?
Both strings can be up to 10,000 characters each. You can compare short search terms, sentences, or multi-paragraph texts without issue, provided neither input exceeds that 10,000-character ceiling.
Are the input strings and character lengths included on the Free plan?
No. The Free plan returns the edit distance, similarity percentage, and match level, but omits the echoed input strings and their character counts. Any paid plan unlocks the echoed strings and length values in every response.
What similarity metrics does each comparison return?
Each request returns the raw Levenshtein edit distance representing the minimum single-character edits needed to match the strings. It also calculates a similarity percentage from 0 to 100 and assigns a match level of exact, high, medium, low, or none.
Can I use this for spell checking and fuzzy search?
Yes. The calculation measures character insertions, deletions, and substitutions between two inputs. That makes it well suited for spell checking, fuzzy search ranking, typo correction, and deduplicating customer records.

Ready to build with Levenshtein Distance? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs