ChartsAPI

class minim.api.musixmatch.ChartsAPI(client: APIClient, /)[source]

Bases: MusixmatchResourceAPI

Charts API endpoints for the Musixmatch Lyrics API.

Important

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

Parameters:
clientminim.api._shared.APIClient

API client instance used to make HTTP requests.

Methods

get_genres

Charts > music.genres.get: Get Musixmatch catalog information for available genres.

get_top_artists

Charts > chart.artists.get: Get Musixmatch catalog information for the top artists on Musixmatch.

get_top_tracks

Charts > chart.tracks.get: Get Musixmatch catalog information for the top tracks on Musixmatch.

get_genres() dict[str, Any][source]

Charts > music.genres.get: Get Musixmatch catalog information for available genres.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Returns:
genresdict[str, Any]

Musixmatch metadata for the available genres.

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: 1 to 100.

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.

get_top_tracks(chart_name: str | None = None, *, country_code: str | None = None, has_lyrics: bool | None = None, limit: int | None = None, page: int | None = None) dict[str, Any][source]

Charts > chart.tracks.get: Get Musixmatch catalog information for the top tracks on Musixmatch.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Parameters:
chart_namestr; optional

Name of the chart to retrieve.

Valid values:

  • "top" – Editorial chart.

  • "hot" – Most viewed lyrics in the last two hours.

  • "mxmweekly" – Most viewed lyrics in the last seven days.

  • "mxmweekly_new" – Most viewed lyrics in the last seven days, limited to new releases only.

country_codestr; keyword-only; optional

ISO 3166-1 alpha-2 country code. Use "XW" for worldwide. Only applicable when chart_name is not "top".

Example: "it".

API default: "US".

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: 1 to 100.

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 top tracks.