Can I get a YouTube user's session data from the YouTube API? - youtube-api

I am a teacher and I have a YouTube channel with videos for my students. Every time one of my students see a video, I would love to know how he interacted with it: where he has paused it , where he has rewinded it, etc. This would help me in knowing the parts of the video that are difficult to understand.
My question is: is it possible to get all this data from a user's session? Specifically, can I get these detailed raw data from YouTube APIs?
From what I have explored so far, it seems that it is not possible, as YouTube APIs only seem to send "aggregated" data (example: total number of views of a video) or "properties" (example: title of the video).
I would really just need a Yes/No answer to my question, just to know if I am not waisting my time in exploring the APIs as a solution to my problem.
Thank you.

Yes and no,
But here is a more detailed explanation.
The YouTube Analytics api will give you analytics data on your own YouTube channel, but it wont be user specific you cant track who exactly did something. You may however be able to get some basic information about each video and what was clicked and how much was viewed. video reports But its not going to be user specific you wont know what Mike did as opposed to what Jane did.
The YouTube Data api will allow you to manage your own YouTube Channel for example upload videos and see subscriptions. It will also let you search for public videos on YouTube.
If you do want user specific then What you are looking for is session data related to user activity. Something like this is not publicly available. Google couldn't share your students activity without the students permission due to GDPR not to mention the fact that tracking anyone under the age of 13 would also be against some GDPR laws if i remember correctly.
Even Google analytics doesn't offer websites a decent way of tracking individual users activity on their websites. You can do it but you have to add additional tracking data to your website, and notify users that you are doing it.
SO your answer is yes kind of

Related

Can I use Posts, Comments etc. from a Video in my App

I am currently developing an app where I want to combine some social networks. Youtube is one of those. I have some questions regarding the policies.
Is it allowed to show, posts, comments, pictures (comment photos, profile picture, post pictures, etc.), videos, like count, share count and everything the graph api provides me, commercially. Of course, only with the permission of the site owner. If not, what is allowed?
Am I allowed that the user can Like and Share posts/comments?
Can I place own adverts in my app? (not as video. The advert from youtube will be shown anyway)
I want you to answer my questions in a honest way.
You can find YouTube's and YouTube's API terms of service linked below:
YouTube's Terms of Service
YouTube's API Terms of Service

How do I use YouTube API to upload private videos for a product that will be sold?

So I have a video product that I am about to start selling. Once people pay, they will be able to download the videos, or ideally stream it via YouTube.
But...I don't want them to be able to share the link with every Tom, Dick and Harry.
I know that an unlisted video can still be made public, so that won't work for me. But apparently there can be 'private videos' too.
Where can I learn more about this in the API docs? Or what is the best way to approach this? Especially given that I don't want them to have to have a Google+ account.
Ideally, they should be able to login to my app, and watch the embedded videos there. But they should not be able to share the direct YouTube link.
I know they can always share their account info, that's fine...I will do other things to keep track of and monitor that. It's really the anonymous sharing of the YouTube link I am worried about.
Thanks.
Read the API terms of service and check with your legal folks. Specifically, you will want to make sure that your sale of private content uploaded to YouTube is in compliance with #2 in the Terms of Service:
You agree not to use the YouTube API for any of the following
commercial uses unless You obtain YouTube's prior written approval:
the sale of the YouTube API, API Data, YouTube audiovisual content or
related services, or access to any of the foregoing;

Tracking subs referral

Is it possible using the current APIs to track where one's subscribers are subscribing from?
For example perhaps I want to see how many subscribers an annotation on a certain video (that any user uploaded) generated for my channel.
The closest thing to what you're describing is running a YouTube Analytics API report with
ids=channel==UC...
dimensions=video
metrics=subscribersGained,subscribersLost
sort=-subscribersGained
This will return the top ten videos that led to subscriptions to your channel. But I don't think that videos uploaded in third-party channels that have annotations prompting people to subscribe to your channel will show up on that list. My understanding is that only videos in your own channel will show up on the list, and it might be that only subscriptions made via the Subscribe link on the web page (not via an annotation) would trigger inclusion on that report.
Sorry that I don't have more specific details.

How to get Youtube's Trending Music Feed using its API

Basically, what I want to get is Youtube's Trending Music in UK. I want to get the videos that are recently uploaded and is trending starting with few views.
Example:
http://www.youtube.com/channel/HCp-Rdqh3z4Uc/videos?query=NErAuLQauvw&view=22&feature=g-logo
I am confused which one of the feeds below is more applicable to me.
https://gdata.youtube.com/feeds/api/channelstandardfeeds/most_viewed?time=today&v=2
https://gdata.youtube.com/feeds/api/standardfeeds/UK/on_the_web_Music
Please help me with this. Your answer and ideas will be greatly appreciated. Thanks
Youtube channels usually start with the prefix UC. In this case the channel starts with HC what for as for I know means hidden channel. This means that you can only access them via the api if you have the right credentials.
This channels are maintained by youtube and they do not share that info for third party apps.
So if you want to rip it you will have to make a own webservice that searches the youtube site and stores the video id's or build an html parser or something like that in your application.

Does the Youtube API return list of users that have watched my video?

I'd like to create a Youtube app that rewards users after they have watched a certain number of my Youtube-channel's videos - or that rewards "experience points" based on the amount of time spent watching my channel.
Can I query the Youtube API to see if an authenticated user has watched a specific video associated with the app?
Seems like I can query against "likes" and "dislikes" - but curious if anyone has tracked "watch-time" or just "watched" in general.
My hesitation here is that I don't want access to a user's full history - I'd like a very unobtrusive approach to connecting authenticated users to specific video content.
I'm not seeing an API endpoint for querying or notifying if an associated Youtube video has been seen. Any help you can provide would be very helpful!
Considering user privacy I don't think you can acces this information. If you search through the API, you'll find that Youtube does come with insights, like viewcount and even demographic information.
It might be a solution to embed your videos in your app and then track which users watch that specific video within the app.
Inside your app catch the the onStateChange event to log that a user viewed a video. It will only work for video they view from inside your app.

Resources