Player Matches
Fetch match history for a player - opponents, scores, results, event context, and match datetimes.
player.matches(player_id, limit) returns the match history for a player on vlr.gg.
Signature
player.matches(
player_id: int,
limit: int = 20,
) -> PlayerMatchesParameters
Prop
Type
Returns - PlayerMatches
Prop
Type
PlayerMatches supports __len__, __iter__, and __getitem__, so you can iterate or index it directly.
MatchEntry Fields
Prop
Type
TeamInMatch Fields
Prop
Type
Examples
Recent match history
Fetch the player's most recent matches with scores and results.
import vlrdevapi
history = vlrdevapi.player.matches(player_id=438, limit=10)
print(f"Recent matches for player {history.player_id}:")
for m in history:
result = "WON" if m.result == "win" else "lost"
print(f" {m.team1.name} {m.score1} - {m.score2} {m.team2.name} ({result}) - {m.event}")Analyse win/loss record
Calculate the player's win/loss record from recent matches.
import vlrdevapi
history = vlrdevapi.player.matches(player_id=438, limit=50)
wins = sum(1 for m in history if m.result == "win")
losses = sum(1 for m in history if m.result == "loss")
total = wins + losses
pct = wins / total * 100 if total else 0
print(f"Record: {wins}W - {losses}L ({pct:.0f}% win rate)")Matches at a specific event
Filter match history to show only matches from a specific event.
import vlrdevapi
history = vlrdevapi.player.matches(player_id=438, limit=100)
vct_matches = [m for m in history if "masters" in m.event.lower()]
for m in vct_matches[:5]:
print(f"{m.stage} {m.bracket}: {m.team1.name} vs {m.team2.name} ({m.score1}-{m.score2})")Curried access
Use the curried player object to access matches without passing the player ID each time.
import vlrdevapi
player = vlrdevapi.player(438)
history = player.matches(limit=5)
for m in history:
print(f"{m.date}: {'W' if m.result == 'win' else 'L'} {m.team1.tag} {m.score1}-{m.score2} {m.team2.tag}")Last updated on