AlbumsAPI¶
- class minim.api.musixmatch.AlbumsAPI(client: APIClient, /)[source]¶
Bases:
MusixmatchResourceAPIAlbums API endpoints for the Musixmatch Lyrics API.
Important
This class is managed by
MusixmatchLyricsAPIClientand should not be instantiated directly.- Parameters:
- clientminim.api._shared.APIClient
API client instance used to make HTTP requests.
Methods
Album > album.get: Get Musixmatch catalog information for an album.
Album > album.tracks.get: Get Musixmatch catalog information for the tracks on an album.
- get_album(album_id: int | str, /) dict[str, Any][source]¶
Album > album.get: Get Musixmatch catalog information for an album.
Subscription
- Musixmatch Basic plan
Access music metadata and static lyrics. Learn more.
- Parameters:
- album_idint or str; positional-only
Musixmatch ID of the album.
Examples:
20828982,"56126508".
- Returns:
- albumdict[str, Any]
Musixmatch metadata for the album.
Sample response
{ "message": { "body": { "album": { "album_copyright": <str>, "album_coverart_100x100": <str>, "album_coverart_350x350": <str>, "album_coverart_500x500": <str>, "album_coverart_800x800": <str>, "album_edit_url": <str>, "album_id": <int>, "album_label": <str>, "album_mbid": <str>, "album_name": <str>, "album_pline": <str>, "album_rating": <int>, "album_release_date": <str>, "album_release_type": <str>, "album_track_count": <int>, "album_vanity_id": <str>, "artist_id": <int>, "artist_name": <str>, "external_ids": { "7digital": <list[str]>, "amazon_music": <list[str]>, "itunes": <list[str]>, "pro_pre_release": <list[str]>, "spotify": <list[str]> }, "primary_genres": { "music_genre_list": [ { "music_genre": { "music_genre_id": <int>, "music_genre_name": <str>, "music_genre_name_extended": <str>, "music_genre_parent_id": <int>, "music_genre_vanity": <str> } } ] }, "restricted": <int>, "secondary_genres": { "music_genre_list": [] }, "updated_time": <str> } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- get_album_tracks(album_id: int | str, /, *, has_lyrics: bool | None = None, limit: int | None = None, page: int | None = None) dict[str, Any][source]¶
Album > album.tracks.get: Get Musixmatch catalog information for the tracks on an album.
Subscription
- Musixmatch Basic plan
Access music metadata and static lyrics. Learn more.
- Parameters:
- album_idint or str; positional-only
Musixmatch ID of the album.
Examples:
20828982,"56126508".- has_lyricsbool; keyword-only; optional
Whether to only include tracks that have lyrics.
API default:
False.- limitint; keyword-only; optional
Maximum number of tracks to return.
Valid range:
1to100.- pageint; keyword-only; optional
Page number. Use with limit to get the next page of tracks.
Minimum value:
1.API default:
1.
- Returns:
- tracksdict[str, Any]
Page of Musixmatch metadata for the album’s tracks.
Sample response
{ "message": { "body": { "track_list": [ { "track": { "album_coverart_100x100": <str>, "album_coverart_350x350": <str>, "album_coverart_500x500": <str>, "album_coverart_800x800": <str>, "album_id": <int>, "album_name": <str>, "album_vanity_id": <str>, "artist_id": <int>, "artist_mbid": <str>, "artist_name": <str>, "commontrack_7digital_ids": <list[int]>, "commontrack_id": <int>, "commontrack_isrcs": <list[list[str]]>, "commontrack_itunes_ids": <list[int]>, "commontrack_spotify_ids": <list[str]>, "commontrack_vanity_id": <str>, "explicit": <int>, "first_release_date": <str>, "has_lyrics": <int>, "has_lyrics_crowd": <int>, "has_richsync": <int>, "has_subtitles": <int>, "has_track_structure": <int>, "instrumental": <int>, "lyrics_id": <int>, "num_favourite": <int>, "primary_genres": { "music_genre_list": [ { "music_genre": { "music_genre_id": <int>, "music_genre_name": <str>, "music_genre_name_extended": <str>, "music_genre_parent_id": <int>, "music_genre_vanity": <str> } } ] }, "restricted": <int>, "secondary_genres": { "music_genre_list": [ { "music_genre": { "music_genre_id": <int>, "music_genre_name": <str>, "music_genre_name_extended": <str>, "music_genre_parent_id": <int>, "music_genre_vanity": <str> } } ] }, "subtitle_id": <int>, "track_edit_url": <str>, "track_id": <int>, "track_isrc": <str>, "track_length": <int>, "track_mbid": <str>, "track_name": <str>, "track_name_translation_list": [ { "track_name_translation": { "language": <str>, "translation": <str> } } ], "track_rating": <int>, "track_share_url": <str>, "track_soundcloud_id": <int>, "track_spotify_id": <str>, "track_xboxmusic_id": <str>, "updated_time": <str> } } ] }, "header": { "available": <int>, "execute_time": <float>, "status_code": <int> } } }