Skip to main content

Constructor

valaw.Client(token, cluster, raw_data=False)
ParameterTypeDescription
tokenstrYour Riot Games API token
clusterstrDefault cluster for requests. Valid values: americas, asia, esports, europe
raw_databoolIf True, returns raw JSON dicts instead of typed objects. Defaults to False
import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        account = await client.GET_getByRiotId("PlayerName", "NA1")
        print(f"{account.gameName}#{account.tagLine}")
    finally:
        await client.close()

asyncio.run(main())
Always call client.close() when done. Use a try/finally block to ensure it is always called even if an error occurs.

Account

GET_getByPuuid

await client.GET_getByPuuid(puuid, cluster=None)
Get an account by PUUID.
ParameterTypeDescription
puuidstrThe player’s PUUID
clusterstr, optionalOverrides the default cluster
Returns: AccountDto or dict

GET_getByRiotId

await client.GET_getByRiotId(gameName, tagLine, cluster=None)
Get an account by Riot ID (gameName#tagLine).
ParameterTypeDescription
gameNamestrThe game name (left of #)
tagLinestrThe tag line (right of #)
clusterstr, optionalOverrides the default cluster
Returns: AccountDto or dict

GET_getByAccessToken

await client.GET_getByAccessToken(authorization, cluster=None)
Get the account associated with an RSO access token.
ParameterTypeDescription
authorizationstrThe RSO access token
clusterstr, optionalOverrides the default cluster
Returns: AccountDto or dict

GET_getActiveShard

await client.GET_getActiveShard(puuid, cluster=None)
Get the active shard for a player.
ParameterTypeDescription
puuidstrThe player’s PUUID
clusterstr, optionalOverrides the default cluster
Returns: ActiveShardDto or dict

Content

GET_getContent

await client.GET_getContent(region, locale="")
Get game content (characters, maps, skins, etc.), optionally filtered by locale.
ParameterTypeDescription
regionstrRegion to query. Valid values: ap, br, esports, eu, kr, latam, na
localestr, optionalLocale for localized names. See Glossary for valid values. Input is case-insensitive
Returns: ContentDto or dict
Providing a locale results in faster response times from the API.

Match

GET_getMatch

await client.GET_getMatch(matchId, region)
Get full match details by match ID.
ParameterTypeDescription
matchIdstrThe match ID
regionstrRegion the match was played in
Returns: MatchDto or dict

GET_getMatchlist

await client.GET_getMatchlist(puuid, region)
Get a player’s match history.
ParameterTypeDescription
puuidstrThe player’s PUUID
regionstrThe player’s region
Returns: MatchlistDto or dict

GET_getRecent

await client.GET_getRecent(queue, region)
Get recent match IDs for a queue. Returns matches completed in the last 10 minutes (or 12 hours for esports). NA, LATAM, and BR share a match history deployment.
ParameterTypeDescription
queuestrValid values: competitive, unrated, spikerush, tournamentmode, deathmatch, onefa, ggteam, hurm
regionstrRegion to query
Returns: RecentMatchesDto or dict

Ranked

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
sizeintNumber of entries to return (1–200). Defaults to 200
startIndexintStarting index for pagination. Defaults to 0
Returns: LeaderboardDto or dict

Console Match

GET_getConsoleMatch

await client.GET_getConsoleMatch(matchId, region)
Get full console match details by match ID.
ParameterTypeDescription
matchIdstrThe match ID
regionstrRegion the match was played in
Returns: MatchDto or dict

GET_getConsoleMatchlist

await client.GET_getConsoleMatchlist(puuid, region, platformType)
Get a console player’s match history.
ParameterTypeDescription
puuidstrThe player’s PUUID
regionstrThe player’s region
platformTypestrValid values: playstation, xbox
Returns: MatchlistDto or dict

GET_getConsoleRecent

await client.GET_getConsoleRecent(queue, region)
Get recent console match IDs for a queue.
ParameterTypeDescription
queuestrValid values: console_unrated, console_swiftplay, console_hurm, console_competitive, console_deathmatch
regionstrRegion to query
Returns: RecentMatchesDto or dict

Console Ranked

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
platformTypestrValid values: playstation, xbox
sizeintNumber of entries to return (1–200). Defaults to 200
startIndexintStarting index for pagination. Defaults to 0
Returns: LeaderboardDto or dict

Status

GET_getPlatformData

await client.GET_getPlatformData(region)
Get VALORANT platform status (maintenances and incidents) for a region.
ParameterTypeDescription
regionstrRegion to query
Returns: PlatformDataDto or dict

RSO

client.create_RSO_link(redirect_uri, client_id, response_type, scopes, login_hint=None, ui_locales=None, state=None)
Constructs a Riot Sign-On (RSO) OAuth authorization URL. This is a regular synchronous method — no await needed.
ParameterTypeDescription
redirect_uristrOAuth2 callback URL
client_idstrYour RSO application’s client ID
response_typestrOAuth2 response type, typically code
scopeslist[str]Scopes to request. Must include openid. Additional: cpid, offline_access
login_hintstr, optionalPre-populate login page data
ui_localeslist[str], optionalPreferred UI locales in order
statestr, optionalOpaque value returned to your redirect URI
Returns: str — the constructed authorization URL