VlrDevApi

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

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

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

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 None for 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 page when limit is None
  • Use limit to control the number of results across multiple pages
  • Check team.id for None before using team IDs
  • The status field will always be "upcoming" for this endpoint

Source

Data scraped from: https://www.vlr.gg/matches