Retrieval
Reciprocal rank fusion API
Fuses multiple ranked id-lists into one ranking using Reciprocal Rank Fusion (RRF), ideal for hybrid lexical+vector search. Answers 'How do I combine multiple search rankings?', 'What is the RRF fused order?'.
Price$0.02per request
MethodPOST
Route/v1/retrieval/reciprocal-rank-fusion
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
rrffusionrank-fusionhybrid-searchrerankretrievalensemblerag
API URL
Integration docshttps://x402.hexl.dev/v1/retrieval/reciprocal-rank-fusionExample request
{
"rankings": [
[
"a",
"b",
"c"
],
[
"b",
"a",
"d"
]
],
"k": 60
}Example response
{
"k": 60,
"listCount": 2,
"fused": [
{
"id": "a",
"rrfScore": 0.03252247
},
{
"id": "b",
"rrfScore": 0.03252247
},
{
"id": "c",
"rrfScore": 0.01587302
},
{
"id": "d",
"rrfScore": 0.01587302
}
],
"formula": "RRF(d) = Σ 1/(k + rank_i(d))"
}Input schema
{
"type": "object",
"required": [
"rankings"
],
"properties": {
"rankings": {
"type": "array",
"items": {
"type": "array"
}
},
"k": {
"type": "number"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}