Parth Dobariya
Parth Dobariya

Reputation: 1

How can I get top artist youtube data API v3

I am using Youtube API V3 to fetch top artist from youtube API for my Android app. I want to show Top Artists for each country. Any idea how can I retrieve the list of top Artists from Youtube API. located hear https://www.youtube.com/yt/artists/charts.html

Upvotes: 0

Views: 2104

Answers (3)

You have to check the YouTube Music Global Charts channel on YouTube - i.e: https://www.youtube.com/channel/UCrKZcyOJVWnJ60zM1XWllNw - and check all of its playlists - there are playlist for each country, like:

  • Top 100 Music Videos El Salvador
  • Top 100 Songs Nicaragua
  • Top 100 Music Videos Israel
  • Top 100 Songs Hungary
  • and so on...

Then, once you identify which are the playlists you need, copy their playlist_id and use them for make calls using the playlistitems endpoint.

Upvotes: 0

joke4me
joke4me

Reputation: 842

No, it's not possible to get the artist list via youtube data api. Because the acceptable "type" values for search.list() does not have artist resource:

Doc say:

Acceptable values are: channel, playlist, video

The only way I can think of is to scrap the data of that web page https://artists.youtube.com/charts/artists

Upvotes: 2

Android Enthusiast
Android Enthusiast

Reputation: 4960

I'm not sure about this but give it a try, use Search:list which returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource. Include regionCode and type paramenter.

The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.

The type parameter restricts a search query to only retrieve a particular type of resource. The value is a comma-separated list of resource types. The default value is video,channel,playlist.

Note: A call to this method has a quota cost of 100 units.

Upvotes: 0

Related Questions