Skip to content
DocumentationAPI Reference

Get User's Profile

users.retrieve_profile(struser_id) -> UserRetrieveProfileResponse
GET/users/{user_id}

Get public profile information about a Spotify user.

ParametersExpand Collapse
user_id: str

The user's Spotify user ID.

ReturnsExpand Collapse
class UserRetrieveProfileResponse:
id: Optional[str]

The Spotify user ID for this user.

display_name: Optional[str]

The name displayed on the user's profile. null if not available.

external_urls: Optional[ExternalURLObject]

Known public external URLs for this user.

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

spotify: Optional[str]

The Spotify URL for the object.

followers: Optional[FollowersObject]

Information about the followers of this user.

href: Optional[str]

This will always be set to null, as the Web API does not support it at the moment.

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

total: Optional[int]

The total number of followers.

href: Optional[str]

A link to the Web API endpoint for this user.

images: Optional[List[ImageObject]]

The user's profile image.

height: Optional[int]

The image height in pixels.

url: str

The source URL of the image.

width: Optional[int]

The image width in pixels.

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

published: Optional[bool]

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

type: Optional[Literal["user"]]

The object type.

uri: Optional[str]

The Spotify URI for this user.

Get User's Profile

import os
from spotted import Spotted

client = Spotted(
    access_token=os.environ.get("SPOTIFY_ACCESS_TOKEN"),  # This is the default and can be omitted
)
response = client.users.retrieve_profile(
    "smedjan",
)
print(response.id)
{
  "id": "id",
  "display_name": "display_name",
  "external_urls": {
    "published": true,
    "spotify": "spotify"
  },
  "followers": {
    "href": "href",
    "published": true,
    "total": 0
  },
  "href": "href",
  "images": [
    {
      "height": 300,
      "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
      "width": 300,
      "published": true
    }
  ],
  "published": true,
  "type": "user",
  "uri": "uri"
}
Returns Examples
{
  "id": "id",
  "display_name": "display_name",
  "external_urls": {
    "published": true,
    "spotify": "spotify"
  },
  "followers": {
    "href": "href",
    "published": true,
    "total": 0
  },
  "href": "href",
  "images": [
    {
      "height": 300,
      "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
      "width": 300,
      "published": true
    }
  ],
  "published": true,
  "type": "user",
  "uri": "uri"
}