Skip to main content

Leaderboards

Fetch the top players for a Zeqa stat or ranked ELO key.

GET /leaderboard/{key}

Example:

curl "https://app.zeqa.net/api/leaderboard/sumo"

Path Parameters​

ParameterTypeDescription
keystringLeaderboard key, such as sumo, bridge, or kills.

Response Shape​

The result field is an array ordered by leaderboard position. Each row contains username and one numeric field matching the requested key.

{
"err": null,
"result": [
{
"username": "Silvreste",
"sumo": 3006
},
{
"username": "LazyColt1537648",
"sumo": 2709
}
]
}

Result Item Fields​

FieldTypeDescription
usernamestringPlayer username.
{key}numberScore, ELO, or counter value for the requested leaderboard key.

For /leaderboard/sumo, each item has a sumo field. For /leaderboard/kills, each item has a kills field.

Observed Leaderboard Keys​

These keys were observed in the player stats response and can be used as leaderboard or ranking keys where supported by the API.

Ranked ELO Keys​

KeyMeaning
boxingBoxing ELO.
fireballfightFireballFight ELO.
bedfightBedFight ELO.
nodebuffNodebuff ELO.
bridgeBridge ELO.
battlerushBattleRush ELO.
sumoSumo ELO.
builduhcBuildUHC ELO.
finaluhcFinalUHC ELO.
fireballmaceFireballMace ELO.
parkourParkour ELO.
crystalpvpCrystalPvP ELO.

Lifetime Stat Keys​

KeyMeaning
killsLifetime kills.
deathsLifetime deaths.
coinsCoins value.
shardsShards value.
bpBattle-pass or progression points value.

JavaScript Example​

async function getLeaderboard(key) {
const response = await fetch(
`https://app.zeqa.net/api/leaderboard/${encodeURIComponent(key)}`,
);
const data = await response.json();

if (data.err) {
throw new Error(data.err);
}

return data.result;
}

Error Response​

{
"err": "Unknown leaderboard"
}