VLRdevAPI

Player API Overview

The Player namespace provides access to individual player data from vlr.gg - info, teams, agent stats, match history, and consolidated profile.

The Player API provides detailed data for individual players on vlr.gg. It is accessed via vlrdevapi.player(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 player_id each time)
info = vlrdevapi.player.info(player_id=438)
print(f"{info.name} ({info.real_name})")

# Curried access - pass player_id once, chain methods
player = vlrdevapi.player(438)
info = player.info()
print(f"Country: {info.country}")
agents = player.agents(timespan="60d")
print(f"Agents played: {len(agents.agents)}")

Explicit client

from vlrdevapi import VLRClient

with VLRClient(timeout=30, requests_per_second=8) as client:
    p = client.player(438)
    info = p.info()
    print(f"{info.name} ({info.real_name}) from {info.country}")

Sub-namespace Reference

MethodReturnsDescription
player.info(player_id)PlayerInfoBasic player info - name, real name, country, social links
player.teams(player_id)PlayerTeamsCurrent and past teams
player.agents(player_id, timespan)AgentStatsPagePer-agent statistics over a time range
player.matches(player_id, limit)PlayerMatchesMatch history for the player
player.profile(player_id)PlayerProfileConsolidated profile - info + teams + top agents

Common Error Handling

All player methods raise typed exceptions from vlrdevapi.exceptions:

ExceptionRaised When
ValidationErrorInvalid arguments (bad player_id, invalid timespan, etc.)
NotFoundErrorPlayer page doesn't exist (HTTP 404)
RequestErrorNetwork failure or HTTP error
RateLimitErrorToo many requests (HTTP 429)
ParsingErrorPage structure is unrecognised
import vlrdevapi
from vlrdevapi.exceptions import NotFoundError, ValidationError

try:
    info = vlrdevapi.player.info(player_id=438)
    print(f"Player: {info.name}")
except NotFoundError:
    print("Player not found")
except ValidationError as e:
    print(f"Invalid input: {e}")

Last updated on

On this page