How can I get top artist youtube data API v3

2019-06-12 17:09发布

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

2条回答
你好瞎i
2楼-- · 2019-06-12 17:20

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.

查看更多
We Are One
3楼-- · 2019-06-12 17:32

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

查看更多
登录 后发表回答