I can get a list of videos from a channel I'm querying. I have most of the information I need in an existing api call, but I'd really like to also get the number of times each video has been viewed.
My current query gives me 50 results:
https://www.googleapis.com/youtube/v3/search?part=id,snippet&key=' . $key . '&channelId=' . $channelId . '&order=date&maxResults=50&publishedBefore=' . $publishedBefore
I read I can get viewCounts through the API by providing a video id. But that's one at a time. I'm hoping I can ammend my query above to also output the viewCounts to make 1 query instead of 51 queries.
I have a part attribute that I can set to "a comma-separated list of one or more search resource properties that the API response will include." The examples I've seen have "id,snippet", but can I specify a value that will provide how many times the video has been viewed? I can't find a list of search resource properties.
Also, is there a way to view a channel's "hottest" or "trendiest" videos that they currently have?