chessdotcom.endpoints.player_profile

Details about a player’s profile, including their avatar, name, username, and more.

API doc: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-player

chessdotcom.endpoints.player_profile.get_player_profile(username: str, tts=0, **request_options) GetPlayerProfileResponse
Parameters:
  • username – username of the player.

  • tts – the time the client will wait before making the first request.

Returns:

GetPlayerProfileResponse object containing information about the player’s profile.

class chessdotcom.endpoints.player_profile.GetPlayerProfileResponse(json: dict, text: str, player: PlayerProfile)
Variables:
  • player – Holds the PlayerProfile object.

  • json – The JSON response from the API.

  • text – The raw text response from the API.

class chessdotcom.endpoints.player_profile.PlayerProfile(avatar: str | None, player_id: int | None, id: str | None, url: str | None, name: str | None, username: str | None, title: str | None, followers: int | None, country: str | None, last_online: int | None, joined: int | None, status: str | None, is_streamer: bool | None, verified: bool | None, league: str | None, location: str | None, streaming_platforms: List[StreamingPlatform])
Variables:
  • avatar – The URL of the player’s avatar.

  • player_id – The unique ID of the player.

  • id – The unique identifier for the player.

  • url – The URL to the player’s profile.

  • name – The real name of the player.

  • username – The username of the player.

  • title – The title of the player (e.g., GM, IM).

  • followers – The number of followers the player has.

  • country – The country code of the player.

  • last_online – The timestamp of the player’s last online activity.

  • joined – The timestamp of when the player joined.

  • status – The current status of the player.

  • is_streamer – Whether the player is a streamer.

  • verified – Whether the player’s account is verified.

  • league – The league in which the player is participating.

  • location – The location of the player.

  • streaming_platforms – A list of StreamingPlatform the player uses.

  • last_online_datetime – The datetime representation of the player’s last online activity.

  • joined_datetime – The datetime representation of when the player joined.

class chessdotcom.endpoints.player_profile.StreamingPlatform(type: str | None, channel_url: str | None)
Variables:
  • type – The type of the streaming platform (e.g., Twitch, YouTube).

  • channel_url – The URL of the streaming platform’s channel.