Get youtube trends v3 country wise in Json?

saravanabawa picture saravanabawa · May 27, 2015 · Viewed 17.7k times · Source

How to get youtube trends of most popular or most viewed by country wise in Json.

Previously using youtube feeds v2. It seems deprecated, https://gdata.youtube.com/feeds/api/standardfeeds/IN/most_popular?v=2

Can I get youtube api v3 or any other result like the trends dashboard, https://www.youtube.com/trendsdashboard

Answer

Ashish Chaturvedi picture Ashish Chaturvedi · May 28, 2015

As per YouTube guidelines, YouTube Feeds v2, is now deprecated. You should work with YouTube Data API v3.

For the most popular video:

https://www.googleapis.com/youtube/v3/videos?part=contentDetails&chart=mostPopular&regionCode=IN&maxResults=25&key=API_KEY

  1. part:

    • The part names that you can include in the parameter value are:
      • id, snippet, contentDetails, fileDetails, liveStreamingDetails, localizations, player, processingDetails, recordingDetails, statistics, status, suggestions, and topicDetails
  2. chart:

    • The chart parameter identifies the chart that you want to retrieve (string)
      • Example mostPopular
  3. regionCode:

    • The parameter value is an ISO 3166-1 alpha-2 country code (string)
  4. key:

  5. maxResults : Default value 5 ,

Read More