Get most viewed youtube videos for the last 7 days - youtube-api

Is there any way to search in youtube api for the most viewed videos in last 7 days?
It's good if i can filter the videos over 1000 views.
Thanks in advance.

Related

Getting monthly view counts of any YouTube video's

I'm using the Youtube Data API to access the total viewCount of a video.
However, I would like to see the monthly views of a video based on a specific date and/or time. For example, video A currently has a viewCount of 500,000 at the current date and time but perhaps a month ago it had a viewCount of 400,000. Is it possible to access that previous value?
Is there any Youtube API method or alternative resource that would allow me to access the previous view count of a video/list of videos for any public channel?
Thank you!

YouTube API "playlistItems" does not return all items of the "Uploaded" playlist

I am wondering if anyone knows what could be the cause of this.
On a channel's upload playlist, it states there are 143 videos in the playlist:
When I use the "Playlistitems" API (with paging):
https://developers.google.com/youtube/v3/docs/playlistItems/list
I get 138 items.
I have singled out a specific video that is in the Playlist on YouTube as an example. Video ID Q3UDhRDLbPg:
But when I use the "Playlistitems" API explorer, on the playlist and specify the specific video, I get zero results.
The video is public and was uploaded a few days ago. Some videos that were uploaded on the same day does exist in the results too.
Has anyone seen this problem before and might know the cause of it?
This issue is solved.
As #stvar pointed out, there is some kind of a delay in YouTube's backend, some videos might take longer to be included than others.
All videos are accounted for now, 4 days after the upload time.

Youtube API - Difference between number of videos from channel statistics and number of videos uploaded

I am trying youtube API to get the number of videos using the call
https://www.googleapis.com/youtube/v3/channels?part=statistics&id=[id]&key=[key]
However, there is a mismatch in the number of uploaded videos. There are 178 videos uploaded in the channel and the channel statistics API is showing 177.
Why is the difference of 1 count?
UPDATE
After 3 days, I got the correct count from channel statistics API.
Still, the question is "Is there a chance to get the difference?"
If that is the case, I would prefer to use the number of videos uploaded instead of the channel statistics.
Watch time report shows the following data collected from youtube.com, the video watch page, mobile Youtube apps (some data is only available from youtube.com).
Note: Analytics views data is based in Pacific Standard Time, updated once a day, and has a delay of up to 72 hours. The numbers you
see in Analytics reports might be different from the numbers you see
on the video page, channel page, Video Manager, or other sources.
Then I suggest that you use the number of videos uploaded.

Search by view count of youtube api

I want to filter the videos which have more than 1000 only. I've the API call i've used to fetch the data.
https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&videoCategoryId=10&order=viewCount&publishedAfter=2016-03-31T00:00:00Z&publishedBefore=2016-04-06T02:00:00Z&key={API KEY}
This returns all the videos which has been added 7 days ago.
Thanks in advance.

YouTube API analytics - video dimension report for all channel videos

We are looking to get a report:
https://developers.google.com/youtube/analytics/v1/available_reports
dimensions:country
filter:videoId
for ALL our videos.
In order to do that we getting all our videos
(https://developers.google.com/youtube/v3/docs/search/list)
and looping through each video (we need the breakdown per country for each video)
the question
1. is that the best way to go?
2. we are not getting the private videos since the search does not return them but the analytics page in youtube does take them into consideration so we have a data mismatch.
any help would be appreciated.
Thank you!
To get your videos, you can use channels->list 'with mine=true' and get relatedPlaylists
or
playLists->list with your channelId and 'mine=true'
then
you can go through these videos with playlistItems->list
As of Aug 28, 2014 it is now possible to fetch metrics for up to 200 videos per API call. See information here:
https://developers.google.com/youtube/analytics/revision_history

Resources