Overview
TheAlbumService (async) and AsyncAlbumService provide methods for interacting with Spotify albums. Use these services to retrieve album information, browse tracks, discover new releases, and manage the user’s saved album library.
Both sync and async versions are available. Import
AlbumService for sync operations or AsyncAlbumService for async operations.Methods
get
Retrieve detailed information about a single album by its Spotify ID.The Spotify ID for the album.
An ISO 3166-1 alpha-2 country code for track relinking. If provided, Spotify will attempt to return content available in the specified market.
Album - The complete album object with all metadata.
Raises: ValueError if id is empty.
get_several
Retrieve multiple albums in a single request.List of Spotify album IDs. Maximum of 20 IDs per request enforced by Spotify API.
An ISO 3166-1 alpha-2 country code for track relinking.
list[Album] - List of album objects.
Raises: ValueError if ids is empty.
get_tracks
Retrieve the tracks from a specific album with pagination support.The Spotify ID for the album.
An ISO 3166-1 alpha-2 country code for track relinking.
Maximum number of tracks to return. Valid range: 1-50.
Index of the first track to return (for pagination).
Page[SimplifiedTrack] - Paginated response containing simplified track objects.
Raises: ValueError if id is empty.
get_new_releases
Discover new album releases featured on Spotify.Maximum number of albums to return. Valid range: 1-50.
Index of the first album to return (for pagination).
Page[SimplifiedAlbum] - Paginated response containing simplified album objects.
get_saved
Retrieve albums saved in the current user’s library.Maximum number of albums to return. Valid range: 1-50.
Index of the first album to return (for pagination).
An ISO 3166-1 alpha-2 country code.
Page[SavedAlbum] - Paginated response containing saved album objects with metadata.
Requires the
user-library-read scope.check_saved
Check whether one or more albums are saved in the current user’s library.Spotify album IDs to check.
list[bool] - A list of boolean values aligned to the input IDs, where True indicates the album is saved.
Raises:
ValueErrorifidsis empty or the response shape is invalid.
Requires the
user-library-read scope.Related Models
Album- Full album object with complete metadataSimplifiedAlbum- Simplified album object with essential informationSavedAlbum- Album object with save timestampSimplifiedTrack- Track object without full album detailsPage[T]- Paginated response wrapper
See Also
- Artists Service - Work with artist data
- Library Service - Save and remove library items
- Authentication - Required scopes and auth flows