Skip to main content

GET_getConsoleLeaderboard

await client.GET_getConsoleLeaderboard(actId, region, platformType, size=200, startIndex=0)
Get the console competitive leaderboard for an act.
ParameterTypeDescription
actIdstrThe act ID
regionstrRegion to query. Valid values: ap, br, esports, eu, kr, latam, na
platformTypestrThe console platform. Valid values: playstation, xbox
sizeintNumber of entries to return (1–200). Defaults to 200
startIndexintStarting index for pagination. Defaults to 0
Returns: LeaderboardDto or dict Raises: InvalidRegion, InvalidPlatformType, RiotAPIResponseError

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        leaderboard = await client.GET_getConsoleLeaderboard(
            actId="act-id-here",
            region="na",
            platformType="playstation",
            size=50
        )
        print(f"Total players: {leaderboard.totalPlayers}")
        for player in leaderboard.players:
            name = player.gameName if player.gameName != "Private" else "[Private]"
            print(f"  #{player.leaderboardRank} {name}{player.rankedRating} RR")
    finally:
        await client.close()

asyncio.run(main())
PlayStation and Xbox leaderboards are separate. For PC leaderboards, use GET_getLeaderboard.