Adrianeks
Adrianeks

Reputation: 1

Spotify API (spotipy) - get artist names from specific country

how can I get every artist name from specific country? Is this even possible? I tried and I didn't find it

Upvotes: 0

Views: 3763

Answers (2)

NeuronButter
NeuronButter

Reputation: 838

Artists on Spotify are not publicly tied to a specific country, and are simply "on the platform", therefore you can't get all the artists from a country. Spotify may collect details about their country based on publicly known information (such as their Artist bio), Spotify Premium subscription, Spotify for Artists account, or tax details, but none of this data is public (for obvious privacy concerns, primarily for smaller artists).

As mentioned by oda, you may be able to determine what (artist's) songs are available in a market, however this only tells you if you are able to listen to the song in your region. You can achieve this either by using the available_markets response on the Get Track endpoint, or searching by market as oda mentioned.

Upvotes: 1

OTheDev
OTheDev

Reputation: 2965

It is not possible to get all Spotify artists by country via the Spotify Web API.

I scanned the official Spotify Web API Reference as well as the spotipy (documentation) Python library for the Spotify Web API. There does not seem to be a direct nor indirect way of getting a list of all artists by country.

The closest thing I could get to satisfying your request is the search for item function which allows you to get a list of artists by market by specifying the market parameter. The market parameter can be a country code. However, you would not be getting only artists that are from that country. This is because an artist can be from another country but be apart of another country's Spotify market at the same time. Moreover, you are limited to getting 1000 entries / artists.

I would suggest contacting Spotify support to see if they can provide all the artist URIs associated with the countries that are of interest to you.

Sorry I couldn't be of more help!

Upvotes: 2

Related Questions