Question

My friend works as a CMS admin for a Youtube Network and asked me if there is a way to automatically extract the number of views and the revenue for specific videos. Let me explain. If some people upload copyrighted material, as a CMS admin you have 2 options, either remove the video or claim it/add an asset so that ads appear on the video when being watched but the problem is that those videos are not connected to an partnered account so you can't see the revenue for that channel but have to check each video individually. So if I have a video (making it up) with the link: http://www.youtube.com/watch?v=123abcEFG56, you can take the code of the video, "123abcEFG56", paste it into the search-box of the Youtube CMS analytics and you get all the information for that video if you claimed it/added an asset to it (he tried to search by using words which are part of the video title (he tried even the exact title) in the YT CMS analytics but this works only for videos that are uploaded on a partnered channel/account so for videos uploaded on non-partnered channels, you can only view the statistics for that video if you put in the code of the video into the search box).

I came up with an idea, I visited some of the channels with the claimed videos, clicked on the video's tab and copied the html code. Then, by using a regular expression and PowerShell (Win7), I extracted all the video codes into a .txt file. Each line of the .txt file contains one video code, for example, it would look something like this:

123abcEFG56
123abcEFG57
123abcEFG58
...

So, this is not about a regular Youtube account but a CMS account and since analytics offers it, I would like to extract the data from the "Last Month" (default on Youtube is: "Last 30 days").

I am not familiar with the Youtube-API, so my question is, is it possible (and if yes, how) to make a batch script which would take one code per line and request the views and revenue made last month for the video with the corresponding code, and then "write" that info into another .txt or .csv file (ideally: "Video name", "Number of views", "Revenue")?

Thanks in advance for your answers!

Was it helpful?

Solution

You can use the Content ID API for this. Please reach to your partner manager for details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top