events.matches()
Get all matches for an event with team IDs and scores
Signature
import vlrdevapi as vlr
result = vlr.events.matches(
event_id: int,
stage: str | None = None,
limit: int | None = None,
timeout: float = 5.0
) -> list[Match]Parameters
Prop
Type
Return Value
Type: list[Match]
Returns a list of matches for the event. Each Match object contains:
Prop
Type
MatchTeam fields:
Prop
Type
Examples
Get Event Matches
import vlrdevapi as vlr
# Get matches for an event
matches = vlr.events.matches(event_id=1189, limit=3)
for match in matches:
team1, team2 = match.teams
print(f"Match {match.match_id}: {team1.name} vs {team2.name}")
print(f" Status: {match.status}")
print(f" Stage: {match.stage or 'N/A'}")
if match.status == "completed" and team1.score is not None:
print(f" Score: {team1.score}-{team2.score}")Filter by Stage
import vlrdevapi as vlr
# Fetch only Playoffs matches using the stage filter
matches = vlr.events.matches(event_id=2498, stage="Playoffs", limit=5)
print(f"Found {len(matches)} playoff matches")
for match in matches:
team1, team2 = match.teams
print(f"{team1.name} vs {team2.name} - {match.status}")Find Ongoing Matches
import vlrdevapi as vlr
# Get matches and filter for ongoing ones
matches = vlr.events.matches(event_id=1189)
ongoing_matches = [m for m in matches if m.status == "ongoing"]
if ongoing_matches:
print(f" {len(ongoing_matches)} ongoing match(es) in progress:")
for match in ongoing_matches:
team1, team2 = match.teams
print(f" {team1.name} vs {team2.name}")
print(f" Stage: {match.stage or 'Unknown'}")
print(f" Current Score: {team1.score or 0}-{team2.score or 0}")
else:
print("No ongoing matches currently")Get Match Details with Team IDs
import vlrdevapi as vlr
# Get matches with enriched team information
matches = vlr.events.matches(event_id=1189, limit=2)
for match in matches:
team1, team2 = match.teams
print(f"Match ID: {match.match_id}")
print(f" {team1.name} (ID: {team1.id}) vs {team2.name} (ID: {team2.id})")
print(f" Status: {match.status}")
if match.date:
print(f" Date: {match.date}")
if match.time:
print(f" Time: {match.time}")Error Handling
- Network failures: Returns an empty list
[] - Invalid event ID: Returns an empty list
[] - No matches found: Returns an empty list
[]
The function never raises exceptions, making it safe to use without try-catch blocks.
Related
series.info()
Get detailed match information with picks/bans
events.info()
Get event header information
events.match_summary()
Get aggregated match statistics
Source
Data scraped from: https://www.vlr.gg/event/matches/{event_id}