Announcements

Help Wizard

Step 1

NEXT STEP

I'm unable to search for podcasts or "shows" using the web API

I'm unable to search for podcasts or "shows" using the web API

My Question or Issue

I am using the spotify web API, accessing it through the python library spotipy. I'm able to use the search function to search for albums, tracks, etc as described here:

https://developer.spotify.com/documentation/web-api/reference/search/search/

and here:

https://developer.spotify.com/community/news/2020/03/20/introducing-podcasts-api//

 

However when I set the 'type' parameter to 'show' as described, it doesn't return any results. Has anyone else had this issue or know why it is happening?

Code example:

'

cid = '*****'
secret = '*****'
client_credentials_manager = SpotifyClientCredentials(client_id=cid, client_secret=secret)
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
test = sp.search("test", limit=10, type='show')
results = sp._get('https://api.spotify.com/v1/search?q=test&type=show')

if __name__ == "__main__":
print(str(results))
print(str(test))

'

these both return empty datasets, while I get data when changing to 'track'.

 

Thanks!

Reply
1 Reply

You may need to provide the market as well as either the country you're interested in e.g. GB or from the logged in token as many of the Show and Episode APIs like Get a Show say the following:



If a country code is specified, only shows and episodes that are available in that market will be returned.
If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
Note: If neither market or user country are provided, the content is considered unavailable for the client.

Suggested posts