VlrDevApi

players.profile()

Get a player's profile information

Signature

import vlrdevapi as vlr

result = vlr.players.profile(
    player_id: int,
    timeout: float = 5.0
) -> Profile | None

Parameters

Prop

Type

Return Value

Type: Profile | None

Returns player profile information or None if not found.

Prop

Type

SocialLink fields:

Prop

Type

Team fields:

Prop

Type

Examples

Get Player Profile

Get player profile
import vlrdevapi as vlr

# Get player profile
player = vlr.players.profile(player_id=123)

if player:
    print(f"Player: {player.handle}")
    if player.real_name:
        print(f"Real Name: {player.real_name}")
    print(f"Country: {player.country or 'Unknown'}")
    
    # Show current teams
    if player.current_teams:
        print("\nCurrent Teams:")
        for team in player.current_teams:
            print(f"  {team.name} ({team.role})")
            if team.joined_date:
                print(f"    Joined: {team.joined_date}")
    
    # Show social links
    if player.socials:
        print("\nSocial Links:")
        for social in player.socials:
            print(f"  {social.label}: {social.url}")
else:
    print("Player not found")

Display Team History

Display team history
import vlrdevapi as vlr

player = vlr.players.profile(player_id=123)

if player:
    print(f"=== {player.handle} Team History ===")
    
    # Current teams
    print("\nCurrent:")
    for team in player.current_teams:
        print(f"  {team.name} - {team.role}")
    
    # Past teams
    if player.past_teams:
        print("\nPast:")
        for team in player.past_teams:
            dates = ""
            if team.joined_date and team.left_date:
                dates = f" ({team.joined_date} to {team.left_date})"
            elif team.joined_date:
                dates = f" (from {team.joined_date})"
            print(f"  {team.name} - {team.role}{dates}")

Error Handling

  • Network failures: Returns None
  • Invalid player ID: Returns None
  • Player not found: Returns None

The function never raises exceptions, making it safe to use without try-catch blocks.

Source

Data scraped from: https://www.vlr.gg/player/{player_id}