Players API
The players module provides access to player profiles, match history, and agent statistics.
Overview
Get comprehensive player data including profiles, team history, match records, and agent performance statistics.
Player-related API endpoints and models.
- class vlrdevapi.players.SocialLink(label: str, url: str)[source]
Bases:
objectPlayer social media link.
- class vlrdevapi.players.Team(role: str, id: int | None = None, name: str | None = None, joined_date: date | None = None, left_date: date | None = None)[source]
Bases:
objectPlayer team information.
- class vlrdevapi.players.Profile(player_id: int, handle: str | None = None, real_name: str | None = None, country: str | None = None, avatar_url: str | None = None, aliases: list[str] | None = None, socials: list[SocialLink] = <factory>, current_teams: list[Team] = <factory>, past_teams: list[Team] = <factory>)[source]
Bases:
objectPlayer profile information.
- socials: list[SocialLink]
- class vlrdevapi.players.MatchTeam(name: str | None = None, tag: str | None = None, core: str | None = None)[source]
Bases:
objectTeam in a player match.
- class vlrdevapi.players.Match(match_id: int, url: str, player_team: MatchTeam, opponent_team: MatchTeam, event: str | None = None, stage: str | None = None, phase: str | None = None, player_score: int | None = None, opponent_score: int | None = None, result: str | None = None, date: date | None = None, time: time | None = None, time_text: str | None = None)[source]
Bases:
objectPlayer match entry.
- __init__(match_id: int, url: str, player_team: MatchTeam, opponent_team: MatchTeam, event: str | None = None, stage: str | None = None, phase: str | None = None, player_score: int | None = None, opponent_score: int | None = None, result: str | None = None, date: date | None = None, time: time | None = None, time_text: str | None = None) None
- class vlrdevapi.players.AgentStats(agent: str | None = None, agent_image_url: str | None = None, usage_count: int | None = None, usage_percent: float | None = None, rounds_played: int | None = None, rating: float | None = None, acs: float | None = None, kd: float | None = None, adr: float | None = None, kast: float | None = None, kpr: float | None = None, apr: float | None = None, fkpr: float | None = None, fdpr: float | None = None, kills: int | None = None, deaths: int | None = None, assists: int | None = None, first_kills: int | None = None, first_deaths: int | None = None)[source]
Bases:
objectPlayer agent statistics.
- __init__(agent: str | None = None, agent_image_url: str | None = None, usage_count: int | None = None, usage_percent: float | None = None, rounds_played: int | None = None, rating: float | None = None, acs: float | None = None, kd: float | None = None, adr: float | None = None, kast: float | None = None, kpr: float | None = None, apr: float | None = None, fkpr: float | None = None, fdpr: float | None = None, kills: int | None = None, deaths: int | None = None, assists: int | None = None, first_kills: int | None = None, first_deaths: int | None = None) None
- vlrdevapi.players.profile(player_id: int, timeout: float | None = None) Profile | None[source]
Get player profile information.
- Parameters:
player_id – Player ID
timeout – Request timeout in seconds
- Returns:
Player profile or None if not found
Example
>>> import vlrdevapi as vlr >>> profile = vlr.players.profile(player_id=123) >>> print(f"{profile.handle} from {profile.country}")
- vlrdevapi.players.matches(player_id: int, limit: int | None = None, page: int | None = None, timeout: float | None = None) list[Match][source]
Get player match history with batch fetching for pagination.
- Parameters:
player_id – Player ID
limit – Maximum number of matches to return
page – Page number (1-indexed)
timeout – Request timeout in seconds
- Returns:
stage: The tournament stage (e.g., “Group Stage”, “Playoffs”)
phase: The specific phase within the stage (e.g., “W1”, “GF”)
- Return type:
List of player matches. Each match includes
Example
>>> import vlrdevapi as vlr >>> matches = vlr.players.matches(player_id=123, limit=10) >>> for match in matches: ... print(f"{match.event} - {match.stage} {match.phase}: {match.result}")
- vlrdevapi.players.agent_stats(player_id: int, timespan: str = 'all', timeout: float | None = None) list[AgentStats][source]
Get player agent statistics.
- Parameters:
player_id – Player ID
timespan – Timespan filter (e.g., “all”, “60d”, “90d”)
timeout – Request timeout in seconds
- Returns:
List of agent statistics
Example
>>> import vlrdevapi as vlr >>> stats = vlr.players.agent_stats(player_id=123) >>> for stat in stats: ... print(f"{stat.agent}: {stat.rating} rating, {stat.acs} ACS")
Functions
profile
Get player profile information.
- vlrdevapi.players.profile(player_id: int, timeout: float | None = None) Profile | None[source]
Get player profile information.
- Parameters:
player_id – Player ID
timeout – Request timeout in seconds
- Returns:
Player profile or None if not found
Example
>>> import vlrdevapi as vlr >>> profile = vlr.players.profile(player_id=123) >>> print(f"{profile.handle} from {profile.country}")
matches
Get player match history.
- vlrdevapi.players.matches(player_id: int, limit: int | None = None, page: int | None = None, timeout: float | None = None) list[Match][source]
Get player match history with batch fetching for pagination.
- Parameters:
player_id – Player ID
limit – Maximum number of matches to return
page – Page number (1-indexed)
timeout – Request timeout in seconds
- Returns:
stage: The tournament stage (e.g., “Group Stage”, “Playoffs”)
phase: The specific phase within the stage (e.g., “W1”, “GF”)
- Return type:
List of player matches. Each match includes
Example
>>> import vlrdevapi as vlr >>> matches = vlr.players.matches(player_id=123, limit=10) >>> for match in matches: ... print(f"{match.event} - {match.stage} {match.phase}: {match.result}")
agent_stats
Get player agent statistics.
- vlrdevapi.players.agent_stats(player_id: int, timespan: str = 'all', timeout: float | None = None) list[AgentStats][source]
Get player agent statistics.
- Parameters:
player_id – Player ID
timespan – Timespan filter (e.g., “all”, “60d”, “90d”)
timeout – Request timeout in seconds
- Returns:
List of agent statistics
Example
>>> import vlrdevapi as vlr >>> stats = vlr.players.agent_stats(player_id=123) >>> for stat in stats: ... print(f"{stat.agent}: {stat.rating} rating, {stat.acs} ACS")
Data Models
Team
Profile
- class vlrdevapi.players.Profile(player_id: int, handle: str | None = None, real_name: str | None = None, country: str | None = None, avatar_url: str | None = None, aliases: list[str] | None = None, socials: list[SocialLink] = <factory>, current_teams: list[Team] = <factory>, past_teams: list[Team] = <factory>)[source]
Player profile information.
- socials: list[SocialLink]
MatchTeam
Match
- class vlrdevapi.players.Match(match_id: int, url: str, player_team: MatchTeam, opponent_team: MatchTeam, event: str | None = None, stage: str | None = None, phase: str | None = None, player_score: int | None = None, opponent_score: int | None = None, result: str | None = None, date: date | None = None, time: time | None = None, time_text: str | None = None)[source]
Player match entry.
- __init__(match_id: int, url: str, player_team: MatchTeam, opponent_team: MatchTeam, event: str | None = None, stage: str | None = None, phase: str | None = None, player_score: int | None = None, opponent_score: int | None = None, result: str | None = None, date: date | None = None, time: time | None = None, time_text: str | None = None) None
AgentStats
- class vlrdevapi.players.AgentStats(agent: str | None = None, agent_image_url: str | None = None, usage_count: int | None = None, usage_percent: float | None = None, rounds_played: int | None = None, rating: float | None = None, acs: float | None = None, kd: float | None = None, adr: float | None = None, kast: float | None = None, kpr: float | None = None, apr: float | None = None, fkpr: float | None = None, fdpr: float | None = None, kills: int | None = None, deaths: int | None = None, assists: int | None = None, first_kills: int | None = None, first_deaths: int | None = None)[source]
Player agent statistics.
- __init__(agent: str | None = None, agent_image_url: str | None = None, usage_count: int | None = None, usage_percent: float | None = None, rounds_played: int | None = None, rating: float | None = None, acs: float | None = None, kd: float | None = None, adr: float | None = None, kast: float | None = None, kpr: float | None = None, apr: float | None = None, fkpr: float | None = None, fdpr: float | None = None, kills: int | None = None, deaths: int | None = None, assists: int | None = None, first_kills: int | None = None, first_deaths: int | None = None) None
Examples
Player Profile
import vlrdevapi as vlr
# Get player profile
profile = vlr.players.profile(player_id=4164)
print(f"{profile.handle} ({profile.real_name})")
print(f"Country: {profile.country}")
# Display aliases if available
if profile.aliases:
print(f"Aliases: {', '.join(profile.aliases)}")
# Current teams
for team in profile.current_teams:
print(f"Team: {team.name} - {team.role}")
Match History
import vlrdevapi as vlr
# Get recent matches
matches = vlr.players.matches(player_id=4164, limit=20)
for match in matches:
print(f"{match.player_team.name} vs {match.opponent_team.name}")
print(f"Event: {match.event}")
# Stage and phase information
if match.stage:
stage_info = f"{match.stage}"
if match.phase:
stage_info += f" - {match.phase}"
print(f"Stage: {stage_info}")
print(f"Result: {match.result}")
if match.player_score is not None:
print(f"Score: {match.player_score}-{match.opponent_score}")
Agent Statistics
import vlrdevapi as vlr
# Get agent stats
stats = vlr.players.agent_stats(player_id=4164, timespan="60d")
for stat in stats[:5]:
if stat.agent and stat.agent != "All":
print(f"{stat.agent}: {stat.rating:.2f} rating, {stat.acs:.0f} ACS")
See more examples: Usage Examples
SocialLink
Player social media link.