How can I recover the 5 most watched videos from my Youtube channel to put on my site?
How can I recover the 5 most watched videos from my Youtube channel to put on my site?
The search.list
method allows you to search for videos, channels, or playlists that match specified criteria. You can search based on video properties, keywords, or topics (or a combination of these), and you can sort the results based on factors such as date created, views, etc.
My Most Viewed Videos: This request retrieves all video from the authenticated user and lists them in descending order by view ( viewCount ), p>
GET {base_URL}/search?part=snippet
&forMine=true
&order=viewCount
&maxResults=5
&type=video
Like other requests from the YouTube Data API, the search.list
method returns the default JSON representation.
If you need more details about the request APIs: YouTube API Requests