MCPcopy
hub / github.com/spotipy-dev/spotipy / search

Method search

spotipy/client.py:598–615  ·  view source on GitHub ↗

searches for an item Parameters: - q - the search query (see how to write a query in the official documentation https://developer.spotify.com/documentation/web-api/reference/search/) # noqa - limit - the number of items to return (

(self, q, limit=10, offset=0, type="track", market=None)

Source from the content-addressed store, hash-verified

596 return self._get("episodes/?ids=" + ",".join(tlist), market=market)
597
598 def search(self, q, limit=10, offset=0, type="track", market=None):
599 """ searches for an item
600
601 Parameters:
602 - q - the search query (see how to write a query in the
603 official documentation https://developer.spotify.com/documentation/web-api/reference/search/) # noqa
604 - limit - the number of items to return (min = 1, default = 10, max = 50). The limit is applied
605 within each type, not on the total response.
606 - offset - the index of the first item to return
607 - type - the types of items to return. One or more of 'artist', 'album',
608 'track', 'playlist', 'show', and 'episode'. If multiple types are desired,
609 pass in a comma separated string; e.g., 'track,album,episode'.
610 - market - An ISO 3166-1 alpha-2 country code or the string
611 from_token.
612 """
613 return self._get(
614 "search", q=q, limit=limit, offset=offset, type=type, market=market
615 )
616
617 def search_markets(self, q, limit=10, offset=0, type="track", markets=None, total=None):
618 """ (experimental) Searches multiple markets for an item

Callers 8

test_search_timeoutMethod · 0.95
test_artist_searchMethod · 0.80
test_album_searchMethod · 0.80
test_track_searchMethod · 0.80
_get_idMethod · 0.80
_is_uriMethod · 0.80

Calls 1

_getMethod · 0.95

Tested by 6

test_search_timeoutMethod · 0.76
test_artist_searchMethod · 0.64
test_album_searchMethod · 0.64
test_track_searchMethod · 0.64