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.

name: str | None = None
cover = None
video_cover = None
type = None
duration: int | None = -1
available: bool | None = False
ad_supported_ready: bool | None = False
dj_ready: bool | None = False
allow_streaming: bool | None = False
premium_streaming_only: bool | None = False
num_tracks: int | None = -1
num_videos: int | None = -1
num_volumes: int | None = -1
tidal_release_date: datetime | None = None
release_date: datetime | None = None
copyright = None
version = None
explicit: bool | None = True
universal_product_number: int | None = -1
popularity: int | None = -1
user_date_added: datetime | None = None
audio_quality: str | None = ''
audio_modes: List[str] | None = ['']
media_metadata_tags: List[str] | None = ['']
artists: List[Artist] | None = None
listen_url: str = ''
share_url: str = ''
artist: Artist | None = None
id: int | None = -1
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 and Videos`

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!

Parameters:

individual_tracks (bool) – Fetch individual track resolutions

Returns:

A tuple containing the (bit_rate, sample_rate) for one or more tracks

tidalapi.media

tidalapi.genre

tidalapi.page

tidalapi.mix