Skip to main content

Method signature

async def GET_getMatch(
    self,
    matchId: str,
    region: str
) -> Union[MatchDto, Dict]
Get detailed match data by match ID.

Parameters

matchId
string
required
The unique match identifier. Match IDs are typically obtained from the matchlist endpoint.
region
string
required
The region to execute against. Must be one of: ap, br, esports, eu, kr, latam, na.

Returns

MatchDto
object
Complete match data including players, teams, rounds, and statistics.
When raw_data=True is set on the client, this method returns a Dict instead of a MatchDto object.

Exceptions

  • InvalidRegion: If the provided region is invalid.
  • RiotAPIResponseError: If the API response indicates an error (e.g., match not found).

Example

import asyncio
from valaw import Client

async def main():
    client = Client(
        token="RGAPI-your-token-here",
        cluster="americas"
    )
    
    # Get match details
    match_id = "d46cf32e-6419-4acc-a5e5-e5b3b7e3b0f5"
    match = await client.GET_getMatch(
        matchId=match_id,
        region="na"
    )
    
    print(f"Map: {match.matchInfo.mapId}")
    print(f"Duration: {match.matchInfo.gameLengthMillis / 1000 / 60:.1f} minutes")
    print(f"Players: {len(match.players)}")
    
    await client.close()

asyncio.run(main())

Build docs developers (and LLMs) love