Retrieval
Jaccard set similarity API
Returns Jaccard similarity & distance with intersection/union sizes for two sets (deduplicated). Answers 'How similar are these two sets/tag lists?', 'What is the Jaccard index?'.
Price$0.01per request
MethodPOST
Route/v1/retrieval/jaccard-similarity
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
jaccardsetsimilarityoverlapintersectionunionretrievalrag
API URL
Integration docshttps://x402.hexl.dev/v1/retrieval/jaccard-similarityExample request
{
"a": [
"a",
"b",
"c"
],
"b": [
"b",
"c",
"d"
]
}Example response
{
"jaccardSimilarity": 0.5,
"jaccardDistance": 0.5,
"intersection": 2,
"union": 4,
"sizeA": 3,
"sizeB": 3,
"formula": "|A∩B| / |A∪B|"
}Input schema
{
"type": "object",
"required": [
"a",
"b"
],
"properties": {
"a": {
"type": "array"
},
"b": {
"type": "array"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}