API Reference
tidalapi.session
tidalapi.artist
tidalapi.user
tidalapi.playlist
tidalapi.album
- class tidalapi.album.Album(session: Session, album_id: str | None)[source]
Contains information about a TIDAL album.
If the album is created from a media object, this object will only contain the id, name, cover and video cover. TIDAL does this to reduce the network load.
- cover = None
- video_cover = None
- type = None
- copyright = None
- version = None
- parse(json_obj: Dict[str, Any], artist: Artist | None = None, artists: List[Artist] | None = None) Album [source]
- property year: int | None
Get the year using
available_release_date
- Returns:
An
int
containing the year the track was released
- property available_release_date: datetime | None
Get the release date if it’s available, otherwise get the day it was released on TIDAL.
- Returns:
A
datetime.datetime
object with the release date, or the tidal release date, can be None
- tracks(limit: int | None = None, offset: int = 0, sparse_album: bool = False) List[Track] [source]
Returns the tracks in classes album.
- Parameters:
limit – The amount of items you want returned.
offset – The position of the first item you want to include.
sparse_album – Provide a sparse track.album, containing only essential attributes from track JSON False: Populate the track.album attributes from the parent Album object (self)
- Returns:
A list of the
Tracks
in the album.
- items(limit: int = 100, offset: int = 0, sparse_album: bool = False) List[Track | Video] [source]
Gets the first ‘limit’ tracks and videos in the album from TIDAL.
- Parameters:
limit – The number of items you want to retrieve
offset – The index you want to start retrieving items from
sparse_album – Provide a sparse track.album, containing only essential attributes from track JSON False: Populate the track.album attributes from the parent Album object (self)
- Returns:
A list of
Tracks
andVideos`
- image(dimensions: int = 320, default: str = '0dfd3368-3aa1-49a3-935f-10ffb39803c0') str [source]
A url to an album image cover.
- Parameters:
dimensions – The width and height that you want from the image
default – An optional default image to serve if one is not available
- Returns:
A url to the image.
Valid resolutions: 80x80, 160x160, 320x320, 640x640, 1280x1280
- video(dimensions: int) str [source]
Creates a url to an mp4 video cover for the album.
Valid resolutions: 80x80, 160x160, 320x320, 640x640, 1280x1280
- Parameters:
dimensions (int) – The width an height of the video
- Returns:
A url to an mp4 of the video cover.
- page() Page [source]
Retrieve the album page as seen on https://listen.tidal.com/album/$id
- Returns:
A
Page
containing the different categories, e.g. similar artists and albums
- similar() List[Album] [source]
Retrieve albums similar to the current one. MetadataNotAvailable is raised, when no similar albums exist.
- Returns:
A
list
of similar albums
- review() str [source]
Retrieve the album review.
- Returns:
A
str
containing the album review, with wimp links- Raises:
requests.HTTPError
if there isn’t a review yet
- get_audio_resolution(individual_tracks: bool = False) [[<class 'int'>, <class 'int'>]] [source]
Retrieve the audio resolution (bit rate + sample rate) for the album track(s)
This function assumes that all album tracks use the same audio resolution. Some albums may consist of tracks with multiple audio resolution(s). The audio resolution can therefore be fetched for individual tracks by setting the all_tracks argument accordingly.
WARNING: For individual tracks, many additional requests are needed. Handle with care!