Reputation: 690
The title basically says it all.
Can I retrieve a list of videos with more than 1B views, using YouTube API?
I couldn't find anything like that in the official docs.
The same story for likes/dislikes. Sorta making a collection of most viewed/liked/disliked videos.
Upvotes: 2
Views: 1338
Reputation: 117261
You cant specifflicly state that you want videos with over 1 billion views. However search.list does offer you the option to sort by view count.
curl \
'https://youtube.googleapis.com/youtube/v3/search?part=snippet&order=viewCount&type=video&fields=*&key=[YOUR_API_KEY]' \
--header 'Accept: application/json' \
--compressed
This should return to you the videos with the highest count.
You can also sort by rating which should be the likes. YouTube removed public dislikes so i doubt this is something you would be able to sort on.
Unfortunately the YouTube Data api is very limited. This is going to be the best you can do.
Upvotes: 3