Text
Jaccard similarity API
Computes Jaccard similarity (intersection over union) over word or character token sets, with overlap counts. Answers 'how much do these texts overlap as sets?', 'what fraction of tokens are shared?'.
Price$0.01per request
MethodPOST
Route/v1/text/jaccard
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textjaccardsimilarityoverlapsettokensfuzzydedupe
API URL
Integration docshttps://x402.hexl.dev/v1/text/jaccardExample request
{
"a": "the quick fox",
"b": "the lazy fox"
}Example response
{
"similarity": 0.5,
"intersection": 2,
"union": 4,
"aTokens": 3,
"bTokens": 3,
"mode": "word"
}Input schema
{
"type": "object",
"required": [
"a",
"b"
],
"properties": {
"a": {
"type": "string",
"examples": [
"the quick fox"
]
},
"b": {
"type": "string",
"examples": [
"the lazy fox"
]
},
"mode": {
"type": "string",
"enum": [
"word",
"char"
],
"examples": [
"word"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}