ArtistsAPI¶
- class minim.api.musixmatch.ArtistsAPI(client: APIClient, /)[source]¶
Bases:
MusixmatchResourceAPIArtists 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
Artist > artist.get: Get Musixmatch catalog information for an artist.
Artist > artist.albums.get: Get Musixmatch catalog information for albums by an artist.
Charts > chart.artists.get: Get Musixmatch catalog information for the top artists on Musixmatch.
Artist > artist.search: Search for artists in the Musixmatch catalog.
- get_artist(artist_id: int | str, /) dict[str, Any][source]¶
Artist > artist.get: Get Musixmatch catalog information for an artist.
Subscription
- Musixmatch Basic plan
Access music metadata and static lyrics. Learn more.
- Parameters:
- artist_idint or str; positional-only
Musixmatch ID of the artist.
Examples:
259675,"24403590".
- Returns:
- artistdict[str, Any]
Musixmatch metadata for the artist.
Sample response
{ "message": { "body": { "artist": { "artist_alias_list": [ { "artist_alias": <str>, } ], "artist_comment": <str>, "artist_country": <str>, "artist_credits": { "artist_list": [] }, "artist_crowd_favourites": <int>, "artist_edit_url": <str>, "artist_facebook_url": <str>, "artist_fq_id": <str>, "artist_id": <int>, "artist_instagram_url": <str>, "artist_mbid": <str>, "artist_merchandising_url": <str>, "artist_name": <str>, "artist_name_translation_list": [], "artist_rating": <int>, "artist_share_url": <str>, "artist_tiktok_url": <str>, "artist_tour_url": <str>, "artist_twitter_url": <str>, "artist_vanity_id": <str>, "artist_website_url": <str>, "artist_youtube_url": <str>, "begin_date": <str>, "begin_date_year": <str>, "end_date": <str>, "end_date_year": <str>, "external_ids": { "7digital": <list[str]>, "amazon_music": <list[str]>, "itunes": <list[str]>, "pro_pre_release": <list[str]>, "spotify": <list[str]> }, "managed": <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": [] }, "updated_time": <str> } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- get_artist_albums(artist_id: int | str, /, *, group_by_album_name: bool | None = None, release_date_sort_order: str | None = None, limit: int | None = None, page: int | None = None) dict[str, Any][source]¶
Artist > artist.albums.get: Get Musixmatch catalog information for albums by an artist.
Subscription
- Musixmatch Basic plan
Access music metadata and static lyrics. Learn more.
- Parameters:
- artist_idint or str; positional-only
Musixmatch ID of the artist.
Examples:
259675,"24403590".- group_by_album_namebool; keyword-only; optional
Whether to group the returned albums by their names.
- release_date_sort_orderstr; keyword-only; optional
Sort order for release date.
Valid values:
"asc","desc".- limitint; keyword-only; optional
Maximum number of albums to return.
Valid range:
1to100.- pageint; keyword-only; optional
Page number. Use with limit to get the next page of albums.
Minimum value:
1.API default:
1.
- Returns:
- albumsdict[str, Any]
Page of Musixmatch metadata for the artist’s albums.
Sample response
{ "message": { "body": { "album_list": [ { "album": { "album_id": <int>, "album_name": <str>, "album_release_date": <str>, "artist_id": <int>, "artist_name": <str>, "restricted": <int>, "updated_time": <str> } } ] }, "header": { "available": <int>, "execute_time": <float>, "status_code": <int> } } }
- get_top_artists(*, country_code: str | None = None, limit: int | None = None, page: int | None = None) dict[str, Any][source]¶
Charts > chart.artists.get: Get Musixmatch catalog information for the top artists on Musixmatch.
Subscription
- Musixmatch Basic plan
Access music metadata and static lyrics. Learn more.
- Parameters:
- country_codestr; keyword-only; optional
ISO 3166-1 alpha-2 country code. Use
"XW"for worldwide.Example:
"it".API default:
"US".- limitint; keyword-only; optional
Maximum number of artists to return.
Valid range:
1to100.- pageint; keyword-only; optional
Page number. Use with limit to get the next page of artists.
Minimum value:
1.API default:
1.
- Returns:
- artistsdict[str, Any]
Page of Musixmatch metadata for the top artists.
Sample response
{ "message": { "body": { "artist_list": [ { "artist": { "artist_alias_list": [ { "artist_alias": <str> } ], "artist_comment": <str>, "artist_country": <str>, "artist_credits": { "artist_list": [] }, "artist_id": <int>, "artist_name": <str>, "artist_name_translation_list": [ { "artist_name_translation": { "language": <str>, "translation": <str> } } ], "artist_twitter_url": <str>, "begin_date": <str>, "begin_date_year": <str>, "end_date": <str>, "end_date_year": <str>, "restricted": <int>, "updated_time": <str> } } ] }, "header": { "execute_time": <float>, "status_code": <int> } } }
- search_artists(artist_query: str | None = None, *, artist_id: int | str | None = None, limit: int | None = None, page: int | None = None) dict[str, Any][source]¶
Artist > artist.search: Search for artists in the Musixmatch catalog.
Subscription
- Musixmatch Basic plan
Access music metadata and static lyrics. Learn more.
- Parameters:
- artist_querystr; optional
Search query matching any word in the artist name.
- artist_idint or str; keyword-only; optional
Musixmatch ID of the artist to filter results by.
Examples:
259675,"24403590".- limitint; keyword-only; optional
Maximum number of artists to return.
Valid range:
1to100.API default:
10.- pageint; keyword-only; optional
Page number. Use with limit to get the next page of artists.
Minimum value:
1.API default:
1.
- Returns:
- artistsdict[str, Any]
Page of Musixmatch metadata for the matching artists.
Sample response
{ "message": { "body": { "artist_list": [ { "artist": { "artist_alias_list": [ { "artist_alias": <str>, } ], "artist_comment": <str>, "artist_country": <str>, "artist_credits": { "artist_list": [] }, "artist_crowd_favourites": <int>, "artist_edit_url": <str>, "artist_facebook_url": <str>, "artist_fq_id": <str>, "artist_id": <int>, "artist_instagram_url": <str>, "artist_mbid": <str>, "artist_merchandising_url": <str>, "artist_name": <str>, "artist_name_translation_list": [], "artist_rating": <int>, "artist_share_url": <str>, "artist_tiktok_url": <str>, "artist_tour_url": <str>, "artist_twitter_url": <str>, "artist_vanity_id": <str>, "artist_website_url": <str>, "artist_youtube_url": <str>, "begin_date": <str>, "begin_date_year": <str>, "end_date": <str>, "end_date_year": <str>, "external_ids": { "7digital": <list[str]>, "amazon_music": <list[str]>, "itunes": <list[str]>, "pro_pre_release": <list[str]>, "spotify": <list[str]> }, "managed": <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": [] }, "updated_time": <str> } } ] }, "header": { "available": <int>, "execute_time": <float>, "status_code": <int> } } }