AlbumsAPI

class minim.api.deezer.AlbumsAPI(client: APIClient, /)[source]

Bases: DeezerResourceAPI

Albums API endpoints for the Deezer API.

Important

This class is managed by DeezerAPIClient and should not be instantiated directly.

Parameters:
clientminim.api._shared.APIClient

API client instance used to make HTTP requests.

Methods

get_album

Album: Get Deezer catalog information for an album.

get_album_fans

Album > Fans: Get Deezer profile information for fans of an album.

get_album_tracks

Album > Tracks: Get Deezer catalog information for tracks on an album.

get_top_albums

Chart > Albums: Get Deezer catalog information for the top albums on Deezer.

get_user_album_recommendations

User > Recommendations > Albums: Get Discogs catalog information for albums recommended for a user.

get_user_release_recommendations

User > Recommendations > Releases: Get Discogs catalog information for new releases recommended for a user.

get_user_saved_albums

User > Albums: Get Deezer catalog information for a user's favorite albums.

get_user_top_albums

User > Charts > Albums: Get Deezer catalog information for a user's top albums on Deezer.

remove_saved_album

User > Albums: Unfavorite an album.

save_albums

User > Albums: Favorite one or more albums.

get_album(album_id: int | str, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

Album: Get Deezer catalog information for an album.

Parameters:
album_idint or str; positional-only

Deezer ID of the album.

Examples: 10546890, "816455081".

limitint; keyword-only; optional

Maximum number of tracks to return.

Minimum value: 1.

API default: 25.

offsetint; keyword-only; optional

Index of the first track to return. Use with limit to get the next batch of tracks.

Minimum value: 0.

API default: 0.

Returns:
albumdict[str, Any]

Deezer metadata for the album.

get_album_fans(album_id: int | str, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

Album > Fans: Get Deezer profile information for fans of an album.

Parameters:
album_idint or str; positional-only

Deezer ID of the album.

Examples: 10546890, "816455081".

limitint; keyword-only; optional

Maximum number of users to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first user to return. Use with limit to get the next batch of users.

Minimum value: 0.

API default: 0.

Returns:
usersdict[str, Any]

Page of Deezer profile information for the album’s fans.

get_album_tracks(album_id: int | str, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

Album > Tracks: Get Deezer catalog information for tracks on an album.

Parameters:
album_idint or str; positional-only

Deezer ID of the album.

Examples: 10546890, "816455081".

limitint; keyword-only; optional

Maximum number of tracks to return.

Minimum value: 1.

API default: 25.

offsetint; keyword-only; optional

Index of the first track to return. Use with limit to get the next batch of tracks.

Minimum value: 0.

API default: 0.

Returns:
tracksdict[str, Any]

Page of Deezer metadata for the album’s tracks.

get_top_albums(*, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

Chart > Albums: Get Deezer catalog information for the top albums on Deezer.

Parameters:
limitint; keyword-only; optional

Maximum number of albums to return.

Minimum value: 1.

API default: 10.

offsetint; keyword-only; optional

Index of the first album to return. Use with limit to get the next batch of albums.

Minimum value: 0.

API default: 0.

Returns:
albumsdict[str, Any]

Page of Deezer metadata for the top albums.

get_user_album_recommendations(user_id: int | str = 'me', /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

User > Recommendations > Albums: Get Discogs catalog information for albums recommended for a user.

User authentication

User authentication

Access the user’s favorite items, playlists, and followed people.

Parameters:
user_idint or str; positional-only; default: "me"

Deezer ID of the user. If authenticated, "me" can be used in lieu of a Deezer ID for the current user.

Example: 5395005364, "5395005364", "me".

limitint; keyword-only; optional

Maximum number of albums to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first album to return. Use with limit to get the next batch of albums.

Minimum value: 0.

API default: 0.

Returns:
albumsdict[str, Any]

Page of Deezer metadata for the recommended albums.

get_user_release_recommendations(user_id: int | str = 'me', /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

User > Recommendations > Releases: Get Discogs catalog information for new releases recommended for a user.

User authentication

User authentication

Access the user’s favorite items, playlists, and followed people.

Parameters:
user_idint or str; positional-only; default: "me"

Deezer ID of the user. If authenticated, "me" can be used in lieu of a Deezer ID for the current user.

Example: 5395005364, "5395005364", "me".

limitint; keyword-only; optional

Maximum number of releases to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first release to return. Use with limit to get the next batch of releases.

Minimum value: 0.

API default: 0.

Returns:
releasesdict[str, Any]

Page of Deezer metadata for the recommended new releases.

get_user_saved_albums(user_id: int | str = 'me', /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

User > Albums: Get Deezer catalog information for a user’s favorite albums.

User authentication

User authentication

Access the user’s favorite items, playlists, and followed people.

Parameters:
user_idint or str; positional-only; default: "me"

Deezer ID of the user. If authenticated, "me" can be used in lieu of a Deezer ID for the current user.

Example: 5395005364, "5395005364", "me".

limitint; keyword-only; optional

Maximum number of albums to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first album to return. Use with limit to get the next batch of albums.

Minimum value: 0.

API default: 0.

Returns:
albumsdict[str, Any]

Page of Deezer metadata for the user’s favorite albums.

get_user_top_albums(user_id: int | str = 'me', /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

User > Charts > Albums: Get Deezer catalog information for a user’s top albums on Deezer.

User authentication

User authentication

Access the user’s favorite items, playlists, and followed people.

Parameters:
user_idint or str; positional-only; default: "me"

Deezer ID of the user. If authenticated, "me" can be used in lieu of a Deezer ID for the current user.

Example: 5395005364, "5395005364", "me".

limitint; keyword-only; optional

Maximum number of albums to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first album to return. Use with limit to get the next batch of albums.

Minimum value: 0.

API default: 0.

Returns:
albumsdict[str, Any]

Page of Deezer metadata for the user’s top albums.

remove_saved_album(album_id: int | str, /, *, user_id: int | str = 'me') dict[str, str][source]

User > Albums: Unfavorite an album.

Permissions

manage_library permission

Manage a user’s library. Learn more.

delete_library permission

Delete items from a user’s library. Learn more.

Parameters:
album_idint or str; positional-only

Deezer ID of the album.

Examples: 10546890, "816455081".

user_idint or str; keyword-only; default: "me"

Deezer ID of the user. If authenticated, "me" can be used in lieu of a Deezer ID for the current user.

Example: 5395005364, "5395005364", "me".

Returns:
successbool

Whether the album was unfavorited successfully.

save_albums(album_ids: int | str | Collection[int | str], /, *, user_id: int | str = 'me') dict[str, str][source]

User > Albums: Favorite one or more albums.

Permission

manage_library permission

Manage a user’s library. Learn more.

Parameters:
album_idsint, str, or Collection[int | str]; positional-only

Deezer IDs of the albums.

Examples: 10546890, "816455081", "10546890,816455081", [10546890, "816455081"].

user_idint or str; keyword-only; default: "me"

Deezer ID of the user. If authenticated, "me" can be used in lieu of a Deezer ID for the current user.

Example: 5395005364, "5395005364", "me".

Returns:
successbool

Whether the albums were favorited successfully.