Team API Overview
The Team namespace provides access to team data from vlr.gg - info, roster, stats, match history, transactions, and placements.
The Team API provides detailed data for teams on vlr.gg. It is accessed via vlrdevapi.team(id) (curried access) or through an explicit VLRClient instance.
All sub-namespaces are lazily initialized and share the same HTTP client configuration, timeout, retry, and rate-limiting settings.
Access Patterns
Module-level (default client)
import vlrdevapi
# Direct access (pass team_id each time)
info = vlrdevapi.team.info(team_id=2593)
roster = vlrdevapi.team.roster(team_id=2593)
print(f"{info.name} ({info.tag}) - {len(roster.players)} players")
# Curried access - pass team_id once, chain methods
team = vlrdevapi.team(2593)
info = team.info()
print(f"Country: {info.country}")Explicit client
from vlrdevapi import VLRClient
with VLRClient(timeout=30, requests_per_second=8) as client:
t = client.team(2593)
info = t.info()
print(f"{info.name} ({info.tag}) - {info.country}")Sub-namespace Reference
| Method | Returns | Description |
|---|---|---|
team.info(team_id) | TeamInfo | Team info - name, tag, country, logos, social links |
team.roster(team_id) | TeamRoster | Current roster - players and staff |
team.completed_matches(team_id) | TeamCompletedMatches | Completed match history |
team.upcoming_matches(team_id) | TeamUpcomingMatches | Upcoming matches |
team.transactions(team_id) | TeamTransactions | Roster transactions (joins/leaves) |
team.stats(team_id, ...) | TeamStats | Map/agent statistics over a date range |
team.placements(team_id) | TeamPlacements | Event placement history |
Common Error Handling
All team methods raise typed exceptions from vlrdevapi.exceptions:
| Exception | Raised When |
|---|---|
ValidationError | Invalid arguments (bad team_id, invalid date, etc.) |
NotFoundError | Team page doesn't exist (HTTP 404) |
RequestError | Network failure or HTTP error |
RateLimitError | Too many requests (HTTP 429) |
ParsingError | Page structure is unrecognised |
import vlrdevapi
from vlrdevapi.exceptions import NotFoundError, ValidationError
try:
info = vlrdevapi.team.info(team_id=2593)
print(f"Team: {info.name}")
except NotFoundError:
print("Team not found")
except ValidationError as e:
print(f"Invalid input: {e}")Last updated on