teams.upcoming_matches()
Get a team's upcoming matches
Signature
import vlrdevapi as vlr
result = vlr.teams.upcoming_matches(
team_id: int,
limit: int | None = None,
timeout: float = 5.0
) -> list[TeamMatch]
Parameters
Prop
Type
Return Value
Type: list[TeamMatch]
Returns a list of upcoming matches.
Prop
Type
Examples
Get Upcoming Matches
import vlrdevapi as vlr
# Get upcoming matches
matches = vlr.teams.upcoming_matches(team_id=799, limit=3)
print(f"Upcoming matches: {len(matches)}")
for match in matches:
print(f"{match.tournament_name} - {match.phase}")
print(f" {match.team1.name} vs {match.team2.name}")
if match.match_datetime:
print(f" Time: {match.match_datetime}")
Filter by Tournament
import vlrdevapi as vlr
matches = vlr.teams.upcoming_matches(team_id=799)
# Filter for VCT matches
vct_matches = [m for m in matches if m.tournament_name and "VCT" in m.tournament_name]
print(f"VCT matches: {len(vct_matches)}")
for match in vct_matches:
print(f" {match.tournament_name}: {match.team1.name} vs {match.team2.name}")
Get Match Details
import vlrdevapi as vlr
matches = vlr.teams.upcoming_matches(team_id=799, limit=2)
for match in matches:
if match.match_id:
# Get detailed series info
series = vlr.series.info(match.match_id)
if series:
print(f"Match: {series.teams[0].name} vs {series.teams[1].name}")
print(f" Best of: {series.best_of}")
Error Handling
- Network failures: Returns an empty list
[]
- Invalid team ID: Returns an empty list
[]
- No upcoming matches: Returns an empty list
[]
The function never raises exceptions, making it safe to use without try-catch blocks.
Tips
- Check list length before accessing:
if matches:
- All optional fields can be
None
- check before using - Use
match_id
to get detailed match information withseries.info()
- The
limit
parameter fetches across multiple pages if needed
Related
Source
Data scraped from: https://www.vlr.gg/team/matches/{team_id}