How can I get the Views Per Hour stat for a YouTube video? - api

I checked the Youtube API and it's mainly to do with adding functionalities related to the YouTube app rather than getting analytics data about videos.
There is a chrome extension called VidIQ that shows the views per hours of a particular video when going to the video's page on YouTube, so I tried reading the source code for it, but it is all compressed and I can't easily find what I'm looking for.
Could someone explain to me how VidIQ chrome extension is getting the views per hour stat for YouTube? Maybe it's not an official stat from Youtube but a rough estimate calculated by VidIQ. How do they get this information?
I tried debugging the VidIQ chrome extension to search through the source code but adding a simple html tag made the file corrupted and disabled the extension until I repaired it again. I'm having difficulties deciphering the source code.

Most of what VidIQ gets is from the YouTube analytics api and not directly from the YouTube data api although i would be they use some combination of both.
If you create a report that extracts views and run it every hour you should get the results you are looking for.
However i would be willing to be that they cache a lot of the data and do some internal analytics on it. They would need to cache it as the YouTube analytics api only returns data for the last 90 days last i checked.
If your intent is to Reverse Engineer VidIQ you may need to accept that a lot of the data you are seeing is internally stored in their system and generated by them based upon the data that is avaliable in the YouTube Analytics API and the YouTube data apis.

Related

Get search terms keywords from traffic source of video using Youtube Data Api v3

I want to get search keywords from traffic source of video using Youtube Data Api.
I can already view 8-10 on the Dashboard, but most of the time, the video is in 1000 views and although I see 7-8, the api returns empty or only takes one. how can i solve this problem? I will be glad if you help.

How do I get traffic source for each video?

TL;DR: Want to get % of views from external traffic source for each video (not for each day)
Long story short, I'm working on a project where I'm trying to understand what factors influence video views on a niche channel I have.
One factor I want to look at is the percent of views from external sources. To track this, I want to measure the traffic source types by each video for ~500 videos.
See example screenshot from the YouTube analytics built in page:
enter image description here
I have been able to get views/title/tag/thumbnail url easily using python, but I have not been able to get the percent of views from external sources from each video.
Is this possible? A link to a working page in the API explorer would be great. I would like to not have to go through every single one of my 500 videos get this number by hand, although I suppose I could write a macro that does that...

How to get youtube video title - vb

I am currently creating a youtube downloader and I have the code to retrieve video thumbnails, however I want to find out a way to retrieve the video title and possibly the video size etc. If anyone can help please answer :D
I would concider you use version 3 of the Youtube API. I don't suggest parsing the html of a youtube page, you never know when they will change the format and you'll be downloading too much information. The API is much more stable.
If you look at the video section .
https://www.googleapis.com/youtube/v3/videos?id=BaW_jenozKc&part=snippet
(I can't test it on this computer)
By changing the part (or adding multiple part) you can get all the information you need about a video. Since the result is returned in json, you can use it with pretty much any programming language.
Also, read the Gettting Started. Youtube limits the number of query unless you register your application and get a developper key.
You need to read the .NET YouTube API documentation, specifically the YouTube API v2.0 – Retrieving Data for a Single Video section.
You will need to query for a single video by the video's ID and then the pieces of data in the ATOM feed that comes back to you are:
feed/entry/Title for the title of the video
feed/entry/media:group/yt:duration for the length of the video
There does not appear to be a value returned for the size of the video, however.
Try the youtube API:-
https://www.youtube.com/get_video_info?video_id=BaW_jenozKc
It should return something along the lines of:-
"&title=youtube-dl+test+video+%22%27%2F%5C%C3%A4%E2%86%AD%F0%9D%95%90".
Credits to youtube-dl:-
https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py

Youtube API - worse results than by searching on youtube.com

I am building last.fm+youtube mashup and I am having trouble retrieving righ results from youtube search.
E.g.
http://gdata.youtube.com/feeds/api/videos?q=Gedz+Gucci%20Gucci%20(feat.%20Joda)&orderBy=relevance
http://www.youtube.com/results?search_query=Gedz+Gucci%20Gucci%20(feat.%20Joda)&oq=Gedz+Gucci%20Gucci%20(feat.%20Joda)
The track I am interested in is on the second place in youtube.com search. How I can make api results look as much similar to youtube.com search?
The method YouTube uses for it's provided search results on the home page includes Related Videos which is based on a proprietary algorithm.
Unfortunately, this proprietary method is not yet available in their API (v1 or current v2) which is why you don't have the same results provided.
The YouTube API Page shows how to use the Related Videos API feature, but only for a single video since it's limited to that use.
I've seen various questions/replies that come and go on the forum about this issue, like this ignored one.
Consider using the Related Videos based on a single video, which the API does support.
Example of that usage for YouTube Video Gedz - Gucci Gucci gość. Joda is:
https://gdata.youtube.com/feeds/api/videos/oepPdNKzxk0/related?v=2
You will see 25 results (default quantity when not specified in query) that are similar but not exact as the single video's YouTube page. Different algorithm's are at play here too, but this method is the best that's currently available.
My untested solution for your project goal is as follows:
1. Use current method to acquire video ID feeds.
2. If the results are less than the amount required, use the returned results first Video ID as a reference.
3. The Video ID reference (just a single video) is then used to perform another query for Related Videos.
4. You can then combine both query's to create a final list of Video ID's which to use.

How can I use Appstore API to get top100 list? What is the common architecture to build a appstore application website?

I've found a PDF file of Appstore search API, that I can use some parameters to fetch an application's detail information.(sorry I forgot the download url, but I found it in stackoverflow)
But there are so many sites that show you a Top100 list(like appshopper.com), and such as Mobclix.com also provide you the rank information.How can they do that? I didn't find the related API in the PDF file.
I also found an Appstore API by ABTO(http://www.abtollc.com/AppStoreAPI.aspx), but I really wanna do it by myself.
If I clear the 1st question, then I'd like to know the common architecture of building a website based on the appstore data. Do I need a database to cache the appstore's data, and create a batch to fetch the data frequently, execute like once per hour? I think it might not be clever to access the appstore for every user request, and may be there is a access limit of appstore?
Thanks for your help!
You can use the following link to generate a url for querying iTunes Data for things like the top 100 apps in a particular category.
http://itunes.apple.com/rss/generator/
For the top 100 free productivity apps the generated url is
http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topfreeapplications/sf=143441/limit=100/genre=6007/xml
The PDF that you link to is very old and hasn't been updated in quite some time, but even if you did get that working, it doesn't have "Top 100" selections (to my knowledge).
1.The way people do to get information from the AppStore is to parse the Xml returned from ITunes web call, and get the information they want. There's no official api release from apple.
You may be right, its more clever to save a copy of app information on your server.