TracksAPI¶
- class minim.api.musixmatch.TracksAPI(client: APIClient, /)[source]¶
Bases:
MusixmatchResourceAPITracks 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
Charts > chart.tracks.get: Get Musixmatch catalog information for the top tracks on Musixmatch.
Track > track.get: Get Musixmatch catalog information for a track.
Track > track.lyrics.get: Get Musixmatch catalog information for lyrics for a track.
Enterprise > track.lyricslens.get: Get the Lyric Lens analysis of a track's lyrics.
Track > track.lyrics.mood.get: Get the five most prevalent moods associated with a track's lyrics.
Track > track.snippet.get: Get Musixmatch catalog information for a snippet of a track's lyrics.
Track > track.lyrics.translation.get: Get Musixmatch catalog information for a translation of a track's lyrics.
Track > track.subtitle.get: Get Musixmatch catalog information for subtitles for a track.
Track > track.subtitle.translation.get: Get Musixmatch catalog information for a translation of a track's subtitles.
Track > track.richsync.get: Get Musixmatch catalog information for Rich Sync (word-synchronized) lyrics for a 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.
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.
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.
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:
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 top 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": [] }, "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_rating": <int>, "track_share_url": <str>, "track_soundcloud_id": <int>, "track_spotify_id": <str>, "track_xboxmusic_id": <str>, "updated_time": <str> } } ] }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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, orisrcmust 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.
Sample response
{ "message": { "body": { "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": [] }, "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_rating": <int>, "track_share_url": <str>, "track_soundcloud_id": <int>, "track_spotify_id": <str>, "track_xboxmusic_id": <str>, "updated_time": <str> } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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, orisrcmust 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.
Sample response
{ "message": { "body": { "lyrics": { "action_requested": <str>, "backlink_url": <str>, "can_edit": <int>, "check_validation_overridable": <int>, "explicit": <int>, "html_tracking_url": <str>, "instrumental": <int>, "locked": <int>, "lyrics_body": <str>, "lyrics_copyright": <str>, "lyrics_id": <int>, "lyrics_language": <str>, "lyrics_language_description": <str>, "pixel_tracking_url": <str>, "published_status": <int>, "publisher_list": [], "restricted": <int>, "script_tracking_url": <str>, "updated_time": <str>, "verified": <int>, "writer_list": [] } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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.
Sample response
{ "message": { "body": { "lens": { "entities": { "entity_list": [ { "categories": <list[str]>, "entity_name": <str>, "matches": [ { "end_char": <int>, "matched_text": <str>, "start_char": <int> } ], "model_metadata": { "description": <str>, "type": <str> }, "occurrencies": <int>, "wikidata": { "description": <str>, "id": <str>, "rank": <int>, "thumbnail": <str>, "types": <list[str]> }, "wikipedia": [ { "language": <str>, "url": <str> } ] } ] }, "language_detection": { "languages": [ { "is_romanized": <bool>, "language_iso_code_1": <str>, "language_iso_code_3": <str>, "language_name": <str>, "percentage": <int> } ] }, "meaning": { "description": <str>, "explanation": <str> }, "moderation": { "categories": [ { "category": <str>, "is_present": <bool>, "score": <float> } ], "description": <str>, "needs_moderation": <bool> }, "moods": { "description": <str>, "main_moods": <list[str]> }, "rating": { "audience":<str>, "description": <str>, "descriptor": <str>, }, "religion": { "description": <str>, "has_references": <bool> }, "themes": { "description": <str>, "main_themes": [ { "quotes": <list[str]>, "theme": <str> } ] } } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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, orisrcmust 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.
Sample response
{ "message": { "body": { "mood_list": [ { "label": <str>, "value": <float> } ] }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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, orisrcmust 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.
Sample response
{ "message": { "body": { "snippet": { "html_tracking_url": <str>, "instrumental": <int>, "pixel_tracking_url": <str>, "region_restriction": { "allowed": <list[str]>, "blocked": [] }, "restricted": <int>, "script_tracking_url": <str>, "snippet_body": <str>, "snippet_id": <int>, "snippet_language": <str>, "updated_time": <str> } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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, orisrcmust 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.0to1.0.
- Returns:
- translationdict[str, Any]
Musixmatch metadata for the translation of the track’s lyrics.
Sample response
{ "message": { "body": { "lyrics": { "explicit": <int>, "lyrics_body": <str>, "lyrics_copyright": <str>, "lyrics_id": <int>, "lyrics_language": <str>, "lyrics_translated": { "html_tracking_url": <str>, "lyrics_body": <str>, "pixel_tracking_url": <str>, "restricted": <int>, "script_tracking_url": <str>, "selected_language": <str> }, "pixel_tracking_url": <str>, "region_restriction": { "allowed": <list[str]>, "blocked": [] }, "script_tracking_url": <str>, "updated_time": <str> } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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, orisrcmust 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.
Sample response
{ "message": { "body": { "subtitle": { "lyrics_copyright": <str>, "pixel_tracking_url": <str>, "script_tracking_url": <str>, "subtitle_body": <str>, "subtitle_id": <int>, "subtitle_language": <str>, "subtitle_language_description": <str>, "subtitle_length": <int>, "updated_time": <str> } }, "header": { "execute_time": <float>, "instrumental": <int>, "status_code": <int>, } } }
- 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, orisrcmust 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.0to1.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.
Sample response
{ "message": { "body": { "subtitle": { "lyrics_copyright": <str>, "pixel_tracking_url": <str>, "region_restriction": { "allowed": <list[str]>, "blocked": [] }, "script_tracking_url": <str>, "subtitle_body": <str>, "subtitle_id": <int>, "subtitle_language": <str>, "subtitle_language_description": <str>, "subtitle_length": <int>, "subtitle_translated": { "html_tracking_url": <str>, "pixel_tracking_url": <str>, "restricted": <int>, "script_tracking_url": <str>, "selected_language": <str>, "subtitle_body": <str>, }, "updated_time": <str> } }, "header": { "execute_time": <float>, "instrumental": <int>, "status_code": <int> } } }
- 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, orisrcmust 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.
Sample response
{ "message": { "body": { "richsync": { "html_tracking_url": <str>, "lyrics_copyright": <str>, "pixel_tracking_url": <str>, "publisher_list": [], "restricted": <int>, "richssync_language": <str>, "richsync_avg_count": <int>, "richsync_body": <str>, "richsync_id": <int>, "richsync_language_description": <str>, "richsync_length": <int>, "script_tracking_url": <str>, "updated_time": <str>, "writer_list": [] } }, "header": { "available": <int>, "execute_time": <float>, "status_code": <int> } } }
- 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.
Sample response
{ "message": { "body": { "track": { "album_id": <int>, "album_name": <str>, "artist_id": <int>, "artist_name": <str>, "commontrack_id": <int>, "commontrack_isrcs": <list[list[str]]>, "explicit": <int>, "has_lyrics": <int>, "has_richsync": <int>, "has_subtitles": <int>, "instrumental": <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>, "track_edit_url": <str>, "track_id": <int>, "track_isrc": <str>, "track_length": <int>, "track_lyrics_translation_status": [ { "from": <str>, "perc": <int>, "to": <str> } ], "track_name": <str>, "track_rating": <int>, "track_share_url": <str>, "track_spotify_id": <str>, "updated_time": <str> } }, "header": { "cached": <int>, "confidence": <int>, "execute_time": <float>, "mode": <str>, "status_code": <int> } } }
- 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.
Sample response
{ "message": { "body": { "lyrics": { "explicit": <int>, "lyrics_body": <str>, "lyrics_copyright": <str>, "lyrics_id": <int>, "lyrics_language": <str>, "pixel_tracking_url": <str>, "region_restriction": { "allowed": <list[str]>, "blocked": <list[str]> }, "script_tracking_url": <str>, "updated_time": <str> } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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.
Sample response
{ "message": { "body": { "subtitle": { "html_tracking_url": <str>, "lyrics_copyright": <str>, "pixel_tracking_url": <str>, "published_status": <int>, "publisher_list": [], "restricted": <int>, "script_tracking_url": <str>, "subtitle_avg_count": <int>, "subtitle_body": <str>, "subtitle_id": <int>, "subtitle_language": <str>, "subtitle_language_description": <str>, "subtitle_length": <int>, "updated_time": <str>, "writer_list": [] } }, "header": { "execute_time": <float>, "status_code": <int> } } }
- 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
YYYYMMDDformat.- released_beforestr or datetime.datetime; keyword-only; optional
Only return tracks released before this date, in
YYYYMMDDformat.- 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:
1to100.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.
Sample response
{ "message": { "body": { "track_list": [ { "track": { "album_id": <int>, "album_name": <str>, "artist_id": <int>, "artist_name": <str>, "commontrack_id": <int>, "commontrack_isrcs": <list[list[str]]>, "explicit": <int>, "has_lyrics": <int>, "has_richsync": <int>, "has_subtitles": <int>, "instrumental": <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>, "track_edit_url": <str>, "track_id": <int>, "track_isrc": <str>, "track_length": <int>, "track_lyrics_translation_status": [ { "from": <str>, "perc": <int>, "to": <str> } ], "track_name": <str>, "track_rating": <int>, "track_share_url": <str>, "track_spotify_id": <str>, "updated_time": <str> } } ] }, "header": { "available": <int>, "execute_time": <float>, "status_code": <int> } } }