matches.upcoming()
Get upcoming matches
Signature
import vlrdevapi as vlr
result = vlr.matches.upcoming(
limit: int | None = None,
page: int | None = None,
timeout: float = 5.0
) -> list[Match]Parameters
Prop
Type
Return Value
Type: list[Match]
Returns a list of upcoming matches. Each Match object contains:
Prop
Type
Team fields:
Prop
Type
Examples
Get Upcoming Matches
import vlrdevapi as vlr
# Get next 5 upcoming matches
matches = vlr.matches.upcoming(limit=5)
for m in matches:
print(f"{m.event} - {m.event_phase}")
print(f" {m.team1.name} vs {m.team2.name}")
print(f" Time: {m.time}")
# Team IDs can be None for TBD teams
if m.team1.id and m.team2.id:
print(f" IDs: {m.team1.id} vs {m.team2.id}")Browse with Pagination
import vlrdevapi as vlr
# Get page 2 of upcoming matches
matches = vlr.matches.upcoming(page=2)
print(f"Found {len(matches)} matches on page 2")
for m in matches:
print(f"{m.team1.name} vs {m.team2.name} - {m.time}")
if m.date:
print(f" Date: {m.date}")Filter by Event
import vlrdevapi as vlr
# Get all upcoming matches and filter
matches = vlr.matches.upcoming(limit=50)
# Filter for specific event
vct_matches = [m for m in matches if "VCT" in m.event]
print(f"VCT matches: {len(vct_matches)}")
for m in vct_matches:
print(f"{m.event}: {m.team1.name} vs {m.team2.name}")Error Handling
- Network failures: Returns an empty list
[] - No matches found: Returns an empty list
[] - Team IDs: Can be
Nonefor TBD/unknown teams
The function never raises exceptions, making it safe to use without try-catch blocks.
Tips
- Team IDs are enriched by quickly opening the match header (cached)
- For large pulls, paginate with
pagewhenlimitis None - Use
limitto control the number of results across multiple pages - Check
team.idforNonebefore using team IDs - The
statusfield will always be"upcoming"for this endpoint
Related
Source
Data scraped from: https://www.vlr.gg/matches