0

Currently, I'm working on getting the latest trend on Youtube. Is there a way to get the JSON Object so that I can use it in my java code.

Abhishek Ekaanth
  • 2,511
  • 2
  • 19
  • 40

1 Answers1

2

From V3 you can use the following (from API Reference)

HTTP request

GET https://www.googleapis.com/youtube/v3/videos

API Reference for Videos List

For what you intend the chart parameter of the query string is what you need, and it accepts mostPopular

The response is JSON as the following taken from their API example.

{ "kind": "youtube#videoListResponse", "etag": etag, "nextPageToken": string, "prevPageToken": string, "pageInfo": { "totalResults": integer, "resultsPerPage": integer }, "items": [ video Resource ] }

Edu G
  • 1,030
  • 9
  • 23