Skip to main content

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. Valid values: ap, br, esports, eu, kr, latam, na
Returns: MatchDto or dict Raises: InvalidRegion, RiotAPIResponseError

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        match = await client.GET_getMatch("match-id-here", "na")

        print(f"Map: {match.matchInfo.mapId}")
        print(f"Duration: {match.matchInfo.gameLengthMillis / 1000 / 60:.1f} minutes")

        for player in match.players:
            if player.stats:
                kda = f"{player.stats.kills}/{player.stats.deaths}/{player.stats.assists}"
                print(f"  {player.gameName}#{player.tagLine}: {kda}")
    finally:
        await client.close()

asyncio.run(main())
Match IDs are typically obtained from GET_getMatchlist or GET_getRecent.