Skip to main content

GET_getLeaderboard

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

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        # Get the top 50 players for a specific act
        leaderboard = await client.GET_getLeaderboard(
            actId="act-id-here",
            region="na",
            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())
Some players have private profiles. For these entries, gameName is "Private" and puuid/tagLine are empty strings.
Use startIndex to paginate through the full leaderboard. For example, to get entries 201–400, set startIndex=200.