As I know we have a Youtube API to get trending youtube videos based on a region by using below API detail:
https://developers.google.com/youtube/v3/docs/videos/list
and giving chart=mostPopular
.
I have a similar requirement:
1). To get trending channels and playlist of youtube based on region.
2). Get users video history details.
I tried searching but couldn't get much details over it. Please let me know if anyone worked over it.
You can use search.list
:
type
- 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.
regionCode
- 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.
order
- The order parameter specifies the method that will be used to order resources in the API response. The default value is relevance.
- rating – Resources are sorted from highest to lowest rating.
This may be the closest thing to what you want to achieve. You set type
to channel
or playlist
, regionCode
based on the region, and order
to rating
(closest to trending). Currently there are no regionCode, mostPopular parameters in Channels: list or Playlists: list
Hope this helps.