Text
Longest common substring API
Finds the longest contiguous substring shared by two strings, with its length and start index in each input. Answers 'what is the longest matching run?', 'where does it occur in each string?'.
Price$0.02per request
MethodPOST
Route/v1/text/lcsubstring
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textlcsubstringsubstringlongest-commonfuzzymatchingstringoverlap
API URL
Integration docshttps://x402.hexl.dev/v1/text/lcsubstringExample request
{
"a": "abcdef",
"b": "zabcz"
}Example response
{
"length": 3,
"substring": "abc",
"indexInA": 0,
"indexInB": 1
}Input schema
{
"type": "object",
"required": [
"a",
"b"
],
"properties": {
"a": {
"type": "string",
"examples": [
"abcdef"
]
},
"b": {
"type": "string",
"examples": [
"zabcz"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}