TracksAPI

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

Bases: MusixmatchResourceAPI

Tracks 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_top_tracks

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

get_track

Track > track.get: Get Musixmatch catalog information for a track.

get_track_lyrics

Track > track.lyrics.get: Get Musixmatch catalog information for lyrics for a track.

get_track_lyrics_analysis

Enterprise > track.lyricslens.get: Get the Lyric Lens analysis of a track's lyrics.

get_track_lyrics_moods

Track > track.lyrics.mood.get: Get the five most prevalent moods associated with a track's lyrics.

get_track_lyrics_snippet

Track > track.snippet.get: Get Musixmatch catalog information for a snippet of a track's lyrics.

get_track_lyrics_translation

Track > track.lyrics.translation.get: Get Musixmatch catalog information for a translation of a track's lyrics.

get_track_subtitles

Track > track.subtitle.get: Get Musixmatch catalog information for subtitles for a track.

get_track_subtitles_translation

Track > track.subtitle.translation.get: Get Musixmatch catalog information for a translation of a track's subtitles.

get_track_word_synced_lyrics

Track > track.richsync.get: Get Musixmatch catalog information for Rich Sync (word-synchronized) lyrics for a track.

match_track

Matcher > matcher.track.get: Match a track by artist and track name (fuzzy search) or by ISRC to get Musixmatch catalog information for it.

match_track_lyrics

Matcher > matcher.lyrics.get: Match a track by artist and track name (fuzzy search) or by ISRC to get Musixmatch catalog information for its lyrics.

match_track_subtitles

Matcher > matcher.subtitle.get: Match a track by artist and track name (fuzzy search) or by ISRC to get Musixmatch catalog information for its subtitles.

search_tracks

Track > track.search: Search for tracks in the Musixmatch catalog.

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.

get_track(*, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None) dict[str, Any][source]

Track > track.get: Get Musixmatch catalog information for a track.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

Returns:
trackdict[str, Any]

Musixmatch metadata for the track.

get_track_lyrics(*, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None) dict[str, Any][source]

Track > track.lyrics.get: Get Musixmatch catalog information for lyrics for a track.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

Returns:
lyricsdict[str, Any]

Musixmatch metadata for the track’s lyrics.

get_track_lyrics_analysis(*, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None) dict[str, Any][source]

Enterprise > track.lyricslens.get: Get the Lyric Lens analysis of a track’s lyrics.

Subscription

Musixmatch Enterprise plan

Access extended music metadata, advanced search, translations, song structure, and lyric analysis. Learn more.

See also

Musixmatch Lyrics API documentation – Lyric Lens introduction and metadata overview.

Parameters:
track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

Returns:
analysisdict[str, Any]

Lyric Lens analysis of the track’s lyrics.

get_track_lyrics_moods(*, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None) dict[str, Any][source]

Track > track.lyrics.mood.get: Get the five most prevalent moods associated with a track’s lyrics.

Subscription

Musixmatch Enterprise plan

Access extended music metadata, advanced search, translations, song structure, and lyric analysis. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

Returns:
moodsdict[str, Any]

Moods associated with the track’s lyrics.

get_track_lyrics_snippet(*, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None) dict[str, Any][source]

Track > track.snippet.get: Get Musixmatch catalog information for a snippet of a track’s lyrics.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

Returns:
snippetdict[str, Any]

Musixmatch metadata for the snippet of the track’s lyrics.

get_track_lyrics_translation(language: str, *, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None, min_translation_ratio: float | str | None = None) dict[str, Any][source]

Track > track.lyrics.translation.get: Get Musixmatch catalog information for a translation of a track’s lyrics.

Subscription

Musixmatch Enterprise plan

Access extended music metadata, advanced search, translations, song structure, and lyric analysis. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
languagestr

ISO 639-1 language code for the desired translation language.

Example: "it".

track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

min_translation_ratiofloat; keyword-only; optional

Minimum translation completion ratio.

Valid range: 0.0 to 1.0.

Returns:
translationdict[str, Any]

Musixmatch metadata for the translation of the track’s lyrics.

get_track_subtitles(*, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None, format: str | None = None, duration: int | str | None = None, max_duration_deviation: int | str | None = None) dict[str, Any][source]

Track > track.subtitle.get: Get Musixmatch catalog information for subtitles for a track.

Subscription

Musixmatch Scale plan

Access time-synced lyrics. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

formatstr; keyword-only; optional

Subtitle format.

Valid values: "lrc", "dfxp", "mxm".

API default: "lrc".

durationint or str; keyword-only; optional

Target subtitle duration, in seconds.

max_duration_deviationint or str; keyword-only; optional

Maximum deviation allowed from the requested duration. Only applicable when duration is specified.

Returns:
subtitlesdict[str, Any]

Musixmatch metadata for the track’s subtitles.

get_track_subtitles_translation(language: str, *, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None, min_translation_ratio: float | None = None, duration: int | None = None, max_duration_deviation: int | None = None) dict[str, Any][source]

Track > track.subtitle.translation.get: Get Musixmatch catalog information for a translation of a track’s subtitles.

Subscription

Musixmatch Enterprise plan

Access extended music metadata, advanced search, translations, song structure, and lyric analysis. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
languagestr

ISO 639-1 language code for the desired translation language.

Example: "it".

track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

min_translation_ratiofloat; keyword-only; optional

Minimum translation completion ratio.

Valid range: 0.0 to 1.0.

durationint or str; keyword-only; optional

Target subtitle duration, in seconds.

max_duration_deviationint or str; keyword-only; optional

Maximum deviation allowed from the requested duration. Only applicable when duration is specified.

Returns:
translationdict[str, Any]

Musixmatch metadata for the translation of the track’s subtitles.

get_track_word_synced_lyrics(*, track_id: int | str | None = None, common_track_id: int | str | None = None, isrc: str | None = None, duration: int | None = None, max_duration_deviation: int | None = None) dict[str, Any][source]

Track > track.richsync.get: Get Musixmatch catalog information for Rich Sync (word-synchronized) lyrics for a track.

Subscription

Musixmatch Enterprise plan

Access extended music metadata, advanced search, translations, song structure, and lyric analysis. Learn more.

Important

At least one of track_id, common_track_id, or isrc must be specified.

Parameters:
track_idint or str; keyword-only; optional

Musixmatch ID of the track.

Examples: 84584600, "359206419".

common_track_idint or str; keyword-only; optional

Musixmatch common ID of the track.

Examples: 5920049, "40728258".

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

durationint or str; keyword-only; optional

Target Rich Sync lyrics duration, in seconds.

max_duration_deviationint or str; keyword-only; optional

Maximum deviation allowed from the requested duration. Only applicable when duration is specified.

Returns:
lyricsdict[str, Any]

Musixmatch metadata for the track’s Rich Sync lyrics.

match_track(*, artist: str | None = None, track: str | None = None, isrc: str | None = None) dict[str, Any][source]

Matcher > matcher.track.get: Match a track by artist and track name (fuzzy search) or by ISRC to get Musixmatch catalog information for it.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Parameters:
artiststr; keyword-only; optional

Artist name to match.

trackstr; keyword-only; optional

Track name to match.

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

Returns:
trackdict[str, Any]

Musixmatch metadata for the matched track.

match_track_lyrics(*, artist: str | None = None, track: str | None = None, isrc: str | None = None) dict[str, Any][source]

Matcher > matcher.lyrics.get: Match a track by artist and track name (fuzzy search) or by ISRC to get Musixmatch catalog information for its lyrics.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Parameters:
artiststr; keyword-only; optional

Artist name to match.

trackstr; keyword-only; optional

Track name to match.

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

Returns:
lyricsdict[str, Any]

Musixmatch metadata for the matched track’s lyrics.

match_track_subtitles(*, artist: str | None = None, track: str | None = None, isrc: str | None = None, duration: int | str | None = None, max_duration_deviation: int | str | None = None) dict[str, Any][source]

Matcher > matcher.subtitle.get: Match a track by artist and track name (fuzzy search) or by ISRC to get Musixmatch catalog information for its subtitles.

Subscription

Musixmatch Scale plan

Access time-synced lyrics. Learn more.

Parameters:
artiststr; keyword-only; optional

Artist name to match.

trackstr; keyword-only; optional

Track name to match.

isrcstr; keyword-only; optional

ISRC of the track.

Example: "USUM70905526".

durationint or str; keyword-only; optional

Target subtitle duration, in seconds.

max_duration_deviationint or str; keyword-only; optional

Maximum deviation allowed from the requested duration. Only applicable when duration is specified.

Returns:
subtitlesdict[str, Any]

Musixmatch metadata for the matched track’s subtitles.

search_tracks(query: str | None = None, *, artist_query: str | None = None, lyrics_query: str | None = None, track_query: str | None = None, track_artist_query: str | None = None, writer_query: str | None = None, artist_id: int | str | None = None, genre_id: int | str | None = None, language: str | None = None, has_lyrics: bool | None = None, released_after: str | datetime | None = None, released_before: str | datetime | None = None, artist_popularity_sort_order: str | None = None, track_popularity_sort_order: str | None = None, page: int | None = None, limit: int | None = None) dict[str, Any][source]

Track > track.search: Search for tracks in the Musixmatch catalog.

Subscription

Musixmatch Basic plan

Access music metadata and static lyrics. Learn more.

Parameters:
querystr; optional

Search query matching any word in the artist name, track name, or lyrics.

artist_querystr; keyword-only; optional

Search query matching any word in the artist name.

lyrics_querystr; keyword-only; optional

Search query matching any word in the track’s lyrics.

track_querystr; keyword-only; optional

Search query matching any word in the track name.

track_artist_querystr; keyword-only; optional

Search query matching any word in the track artist name.

writer_querystr; keyword-only; optional

Search query matching any word in the track writer name.

artist_idint or str; keyword-only; optional

Musixmatch ID of the artist to filter results by.

Examples: 259675, "24403590".

genre_idint or str; keyword-only; optional

Musixmatch genre ID to filter results by.

languagestr; keyword-only; optional

ISO 639-1 language code to filter results by lyrics availability.

Example: "it".

has_lyricsbool; keyword-only; optional

Whether to only include tracks that have lyrics.

API default: False.

released_afterstr or datetime.datetime; keyword-only; optional

Only return tracks released after this date, in YYYYMMDD format.

released_beforestr or datetime.datetime; keyword-only; optional

Only return tracks released before this date, in YYYYMMDD format.

artist_popularity_sort_orderstr; keyword-only; optional

Sort order for artist popularity.

Valid values: "asc", "desc".

track_popularity_sort_orderstr; keyword-only; optional

Sort order for track popularity.

Valid values: "asc", "desc".

limitint; keyword-only; optional

Maximum number of tracks to return.

Valid range: 1 to 100.

API default: 10.

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