Skip to main content

GET_getActiveShard

await client.GET_getActiveShard(puuid, cluster=None)
Get the active shard (region) where a player is currently playing VALORANT. Use this to determine which region to query for match history and other player data.
ParameterTypeDescription
puuidstrThe player’s PUUID
clusterstr, optionalOverrides the default cluster. Valid values: americas, asia, esports, europe
Returns: ActiveShardDto or dict Raises: InvalidCluster, RiotAPIResponseError

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        account = await client.GET_getByRiotId("PlayerName", "NA1")
        shard = await client.GET_getActiveShard(account.puuid)

        # Use the active shard as the region for match queries
        matches = await client.GET_getMatchlist(account.puuid, shard.activeShard)
        print(f"Found {len(matches.history)} matches in {shard.activeShard}")
    finally:
        await client.close()

asyncio.run(main())
Always query the active shard before fetching match history — using the wrong region returns a 404 error.