According to Latency with Youtube Analytics API, data from the YouTube Analytics API should update daily. I'm trying to pull over time data for videos using the https://www.googleapis.com/youtube/analytics/v1/reports endpoint. To do this I'm sending parameters like the ones below:
{
'dimensions': 'day',
'end-date': '2015-06-02',
'filters': 'video==MY_VIDEO_ID',
'ids': 'channel==MINE',
'metrics': 'views,uniques,averageViewDuration,averageViewPercentage,comments,likes,dislikes,shares,subscribersGained,subscribersLost',
'prettyPrint': 'false',
'start-date': u'2013-03-18'
}
I'm setting the start-date to the upload date of the video and the end-date to today, but I'm only getting data up to a couple days ago. For example that request above returns 2015-05-31 as the last date that data exists for. I have tried setting the end-date an additional day in the future in case the range was exclusive. According to Latency with Youtube Analytics API I should be getting data up to 2015-06-01.
Is there an additional delay of an extra day now on the Analytics API? Is something wrong with my query? Is there a canonical page somewhere that has numbers for these delays similar to this Adwords answer?
Related
I want to get metrics (such as likes, views and subscribers gained) for every video in my youtube channel (or about 10 latest video) , how can I do it correctly?
I'm using such API call from Youtube Analytics API, but it turns out that it returns total views and total likes from all videos, not individually about every video.
`https://youtubeanalytics.googleapis.com/v2/reports?metrics=views,likes,subscribersGained&ids=channel==MINE&startDate=2014-07-03&endDate=2020-06-01&&key=${apiKey}&access_token=${token}`
I read documentation of YouTube Analytics API and I can't find this information there.
If you want the response to be grouped by video your have to specify the dimension parameter to video.
Here is a sample request from the documentation (Basic stats/Top 10 – Most watched videos for a channel):
https://developers.google.com/youtube/analytics/sample-requests#Channel_Reports
Although the note does not specify it, the sort parameter must be the first metric that you declared.
If want to get information on more that 10 videos or to pull information for the latest videos, you can specify the dimension as video and you must specify the video ids in the filter parameter as video==VIDEO1_id,VIDEO2_id....
The videos in a channel can be retrieved through the YouTube Data API from the search endpoint.
You will get a list of videos with their details as a response, among others the videoId and publishedAt values.
From everything I have researched I have not been able to find a way to grab past subscriber count on a certain date. If I can't do it through Youtube API is there any other site that would have this kind of data I could grab for a bunch of different channels?
I'm not sure if this is possible with all of the updates to YouTube showing rounded subscriber counts. I would recommend checking out the YouTube Analytics & Reporting APIs at https://developers.google.com/youtube/analytics. Other than that, I would say not.
I'm testing out the new Youtube Analytics Reporting API. However, it looks like I can only get reports from dates on the date I created the job that generates the reports and later. How can I get bulk data from earlier dates than this? Am I forced to use the Analytics API then?
I think if you want to retrieve data in an older timeline Youtube Analytics API is recommended.
You can find the answer you are looking for in Retrieve YouTube Analytics Data.
These are the possible data you can get from Analytics and Reporting API by date.
Feature
Date Ranges
YouTube Analytics API
Some API reports specify the date that user activity occurred. Some of those reports support dimensions to aggregate user activity metrics by 7-day periods, 30-day periods, or months.
YouTube Reporting API
All API reports specify the day that user activity occurred. Applications using the API can implement features to aggregate data for periodic intervals.
Can we get the likes/views along with the time when it is liked/viewed of a particular youtube video using Youtube API
Data API won't give that information. You can only access number and person, not the time piece.
This page (http://apiblog.youtube.com/2012/03/keeping-things-fresh.html) does a great job of explaining the latency of results obtained using the Youtube API version 2.0. Is there an equivalent explanation for the Youtube Analytics API?
I viewed and liked a video today that previously had no action and then retrieved statistics using the Analytics API (with both start-date and end-date equal to today) and my actions were not reflected - all metrics were still zero. Do I need to wait until tomorrow for today's totals to be calculated? If yes, is there any way to get the current day's analytics?
The YouTube Analytics API uses the same backend as the YouTube Analytics website, and the public information about data freshness that applies to the website also applies to the API. There's some relevant info at
http://support.google.com/youtube/bin/static.py?hl=en&guide=1714169&page=guide.cs
Specifically, the bottom of the page reads (as of right now):
YouTube Analytics data is updated daily, which means that the numbers displayed in these reports may differ from the public values displayed on the Watch page, Channel page, Video Manager, or other sources.
I don't think we specifically guarantee what time of day the data updates, but it's safe to assume that the previous day's data is processed sometime after midnight Pacific Time (which is the time zone used for YouTube Analytics).