Skip to main content

Artist Models

The artist models represent artist data from the Spotify API. Artists can be embedded in other objects or returned with full profile details.

SimplifiedArtist

Basic artist information embedded in other objects like albums and tracks.

Fields

external_urls
ExternalUrls
required
External URLs for this artist. See Common Models.
href
str
required
A link to the Web API endpoint providing full details of the artist
id
str
required
The Spotify ID for the artist
name
str
required
The name of the artist
type
Literal['artist']
required
The object type, always “artist”
uri
str
required
The Spotify URI for the artist

Example JSON

{
  "external_urls": {
    "spotify": "https://open.spotify.com/artist/xyz789"
  },
  "href": "https://api.spotify.com/v1/artists/xyz789",
  "id": "xyz789",
  "name": "Example Artist",
  "type": "artist",
  "uri": "spotify:artist:xyz789"
}

Artist

Complete artist profile with followers, genres, images, and popularity. Extends SimplifiedArtist.

Additional Fields

followers
Followers
required
Follower count and information. See Common Models.
genres
list[str]
required
A list of genres the artist is associated with (e.g., “rock”, “pop”, “indie”)
images
list[Image]
required
Profile images for the artist in various sizes. See Common Models.
popularity
int
required
The popularity of the artist, between 0 and 100, with 100 being the most popular. Calculated based on the popularity of the artist’s tracks.

Example JSON

{
  "external_urls": {
    "spotify": "https://open.spotify.com/artist/xyz789"
  },
  "href": "https://api.spotify.com/v1/artists/xyz789",
  "id": "xyz789",
  "name": "Example Artist",
  "type": "artist",
  "uri": "spotify:artist:xyz789",
  "followers": {
    "href": null,
    "total": 1250000
  },
  "genres": [
    "indie rock",
    "alternative",
    "indie pop"
  ],
  "images": [
    {
      "url": "https://i.scdn.co/image/xyz789",
      "height": 640,
      "width": 640
    },
    {
      "url": "https://i.scdn.co/image/xyz456",
      "height": 320,
      "width": 320
    },
    {
      "url": "https://i.scdn.co/image/xyz123",
      "height": 160,
      "width": 160
    }
  ],
  "popularity": 78
}

Model Relationships

Artist Model Hierarchy
  • SimplifiedArtist provides just the core identification fields (id, name, URI, etc.)
  • Artist extends SimplifiedArtist and adds profile information like followers, genres, images, and popularity
The simplified version is used when artists are embedded in other responses (like in Album or Track objects), while the full Artist model is returned from artist-specific endpoints.

Usage Example

from spotify_sdk.models.artist import Artist, SimplifiedArtist

# Parse an artist from the API response
artist = Artist(**api_response)

# Access artist properties
print(f"Artist: {artist.name}")
print(f"Followers: {artist.followers.total:,}")
print(f"Popularity: {artist.popularity}")
print(f"Genres: {', '.join(artist.genres)}")

# Get the largest image
if artist.images:
    largest_image = artist.images[0]
    print(f"Image URL: {largest_image.url}")
    print(f"Dimensions: {largest_image.width}x{largest_image.height}")

# Simplified artist from an album
album_artist = SimplifiedArtist(**simplified_data)
print(f"Album by: {album_artist.name}")

Common Use Cases

Build docs developers (and LLMs) love