VLRdevAPI

Team Stats

Fetch map and agent statistics for a team over a configurable date range with optional event/series filters and agent composition detail.

team.stats(team_id, ...) returns map-level statistics for a team on vlr.gg with flexible date range filtering and optional agent composition data.

Signature

team.stats(
    team_id: int,
    date_start: date | None = None,
    date_end: date | None = None,
    event_id: int | None = None,
    series_id: int | None = None,
    subseries_id: int | None = None,
    last_days: int | None = None,
    agent_composition: AgentCompositionLevel = "none",
) -> TeamStats

Parameters

Prop

Type

Returns - TeamStats

Prop

Type

MapStats Fields

Prop

Type

AgentComposition Fields

Prop

Type

AgentComposition entries are sorted by games_played descending.

Examples

Default stats (last 30 days)

Print map statistics for the last 30 days.

import vlrdevapi

stats = vlrdevapi.team.stats(team_id=624)
print(f"Team {stats.team_id} map stats:")
for m in stats.maps:
    wr = f"{m.win_rate:.0f}%" if m.win_rate is not None else "N/A"
    atk_wr = f"{m.attack_round_win_rate:.0f}%" if m.attack_round_win_rate is not None else "N/A"
    def_wr = f"{m.defense_round_win_rate:.0f}%" if m.defense_round_win_rate is not None else "N/A"
    print(f"  {m.map_name}: {m.games_played}g | {wr} WR | ATK {atk_wr} | DEF {def_wr}")

Stats over the last 90 days

Print map statistics over the last 90 days.

import vlrdevapi

stats = vlrdevapi.team.stats(team_id=624, last_days=90)
for m in stats.maps:
    wins = m.wins or 0
    losses = m.losses or 0
    wr = f"{m.win_rate:.0f}%" if m.win_rate is not None else "N/A"
    print(f"{m.map_name}: {wins}W - {losses}L ({wr} WR)")

Agent composition analysis

Use agent_composition="basic" to see which agent comps the team plays on each map.

import vlrdevapi

stats = vlrdevapi.team.stats(team_id=624, last_days=90, agent_composition="basic")
for m in stats.maps:
    print(f"\n{m.map_name}:")
    if m.compositions:
        for comp in m.compositions[:3]:
            agents = ", ".join(comp.agents)
            print(f"  [{agents}] {comp.games_played}g - {comp.wins}W / {comp.losses}L ({comp.win_rate:.0f}%)")
    else:
        print("  (no composition data)")

Filter by event

Filter map statistics to a specific event.

import vlrdevapi

stats = vlrdevapi.team.stats(team_id=624, event_id=2765)
if stats.maps:
    for m in stats.maps:
        wins = m.wins or 0
        losses = m.losses or 0
        print(f"{m.map_name}: {wins}W - {losses}L")
else:
    print("(no map stats for this event)")

Curried access

Access stats using the curried team() shorthand.

import vlrdevapi

team = vlrdevapi.team(624)
stats = team.stats(last_days=90)
if stats.maps:
    best_map = max(stats.maps, key=lambda m: m.win_rate or 0)
    print(f"Best map: {best_map.map_name} ({best_map.win_rate:.0f}% WR)")
else:
    print("(no map stats available)")

Last updated on

On this page