SearchAPI

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

Bases: MusixmatchResourceAPI

Search-related endpoints for the Musixmatch Lyrics API.

Note

This class groups search-related endpoints for convenience. Musixmatch does not provide a dedicated Search 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

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_artists

Artist > artist.search: Search for artists in the Musixmatch catalog.

search_tracks

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

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

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.

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 | None = None, released_before: str | 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.