SearchAPI

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

Bases: DeezerResourceAPI

Search API endpoints for the Deezer API.

Important

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

Parameters:
clientminim.api._shared.APIClient

API client instance used to make HTTP requests.

Methods

get_my_search_history

Search > History: Get the current user's search history on Deezer.

search_albums

Search > Album: Search for albums in the Deezer catalog.

search_artists

Search > Artist: Search for artists in the Deezer catalog.

search_playlists

Search > Playlist: Search for playlists in the Deezer catalog.

search_podcasts

Search > Podcast: Search for podcasts in the Deezer catalog.

search_radios

Search > Radio: Search for radios in the Deezer catalog.

search_tracks

Search > Track: Search for tracks in the Deezer catalog.

search_users

Search > User: Search for users on Deezer.

get_my_search_history(query: str | None = None, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > History: Get the current user’s search history on Deezer.

User authentication

User authentication

Access the GET /search/history endpoint.

Parameters:
querystr; positional-only; optional

Search query.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of searches to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first search to return. Use with limit to get the next batch of searches.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned searches by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
searchesdict[str, Any]

Page of Deezer metadata for the current user’s search history.

search_albums(query: str, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > Album: Search for albums in the Deezer catalog.

Parameters:
querystr; positional-only

Search query.

Tip

Use the Advanced Search feature to narrow down results by specific fields. Provide key–value pairs separated by a colon (:), and wrap strings in quotes:

  • artist - Artist name, e.g., artist:"aloe blacc".

  • album - Album name, e.g., album:"good things".

  • track - Track name, e.g., track:"i need a dollar".

  • label - Label name, e.g., label:"because music".

  • dur_min / dur_max - Track duration in seconds, e.g., dur_min:300 dur_max:500.

  • bpm_min / bpm_max - Track tempo (BPM), e.g., bpm_min:120 bpm_max:200.

Example: artist:"aloe blacc" track:"i need a dollar" bpm_min:120 dur_min:300.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of albums to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first album to return. Use with limit to get the next batch of albums.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned albums by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
albumsdict[str, Any]

Page of Deezer metadata for the matching albums.

search_artists(query: str, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > Artist: Search for artists in the Deezer catalog.

Parameters:
querystr; positional-only

Search query.

Tip

Use the Advanced Search feature to narrow down results by specific fields. Provide key–value pairs separated by a colon (:), and wrap strings in quotes:

  • artist - Artist name, e.g., artist:"aloe blacc".

  • album - Album name, e.g., album:"good things".

  • track - Track name, e.g., track:"i need a dollar".

  • label - Label name, e.g., label:"because music".

  • dur_min / dur_max - Track duration in seconds, e.g., dur_min:300 dur_max:500.

  • bpm_min / bpm_max - Track tempo (BPM), e.g., bpm_min:120 bpm_max:200.

Example: artist:"aloe blacc" track:"i need a dollar" bpm_min:120 dur_min:300.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of artists to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first artist to return. Use with limit to get the next batch of artists.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned artists by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
artistsdict[str, Any]

Page of Deezer metadata for the matching artists.

search_playlists(query: str, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > Playlist: Search for playlists in the Deezer catalog.

Parameters:
querystr; positional-only

Search query.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of playlists to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first playlist to return. Use with limit to get the next batch of playlists.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned playlists by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
playlistsdict[str, Any]

Page of Deezer metadata for the matching playlists.

search_podcasts(query: str, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > Podcast: Search for podcasts in the Deezer catalog.

Parameters:
querystr; positional-only

Search query.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of podcasts to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first podcast to return. Use with limit to get the next batch of podcasts.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned podcasts by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
podcastsdict[str, Any]

Page of Deezer metadata for the matching podcasts.

search_radios(query: str, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > Radio: Search for radios in the Deezer catalog.

Parameters:
querystr; positional-only

Search query.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of radios to return.

Minimum value: 1.

offsetint; keyword-only; optional

Index of the first radio to return. Use with limit to get the next batch of radios.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned radios by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
radiosdict[str, Any]

Page of Deezer metadata for the matching radios.

search_tracks(query: str, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > Track: Search for tracks in the Deezer catalog.

Parameters:
querystr; positional-only

Search query.

Tip

Use the Advanced Search feature to narrow down results by specific fields. Provide key–value pairs separated by a colon (:), and wrap strings in quotes:

  • artist - Artist name, e.g., artist:"aloe blacc".

  • album - Album name, e.g., album:"good things".

  • track - Track name, e.g., track:"i need a dollar".

  • label - Label name, e.g., label:"because music".

  • dur_min / dur_max - Track duration in seconds, e.g., dur_min:300 dur_max:500.

  • bpm_min / bpm_max - Track tempo (BPM), e.g., bpm_min:120 bpm_max:200.

Example: artist:"aloe blacc" track:"i need a dollar" bpm_min:120 dur_min:300.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of tracks to return.

Minimum value: 1.

API default: 25.

offsetint; keyword-only; optional

Index of the first track to return. Use with limit to get the next batch of tracks.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned tracks by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
tracksdict[str, Any]

Page of Deezer metadata for the matching tracks.

search_users(query: str, /, *, strict: bool | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool = False) dict[str, Any][source]

Search > User: Search for users on Deezer.

Parameters:
querystr; positional-only

Search query.

strictbool; keyword-only; optional

Whether to use strict matching instead of fuzzy search.

API default: False.

limitint; keyword-only; optional

Maximum number of users to return.

Minimum value: 1.

API default: 25.

offsetint; keyword-only; optional

Index of the first user to return. Use with limit to get the next batch of users.

Minimum value: 0.

API default: 0.

sort_bystr; keyword-only; optional

Field to sort the returned users by.

Valid values: "RANKING", "TRACK", "ARTIST", "ALBUM", "RATING", "DURATION".

descendingbool; keyword-only; default: False

Whether to sort in descending order. Only applicable when sort_by is not "RANKING".

Returns:
usersdict[str, Any]

Page of Deezer metadata for the matching users.