YouTube Data API has:
https://developers.google.com/youtube/v3/docs/videos#snippet.liveBroadcastContent
but this shows whether you are already live streaming or there is a scheduled live stream.
And the YouTube livestream API doesn't seem to deal with non-LIVE entries:
https://developers.google.com/youtube/v3/live/docs/
Use
https://developers.google.com/youtube/v3/docs/videos#liveStreamingDetails
works with api_key unlike the fileDetails in the old answer.
OLD:
I was lucky and spotted that the past live streams are saved with file name livestream.str.
So, using the YouTube Data API to get videos with filename livestream.str should work.
To get this filename, you need the OAuth2 authorization. If you use the API key you will get 403 error. Then use the part=fileDetails:
https://developers.google.com/youtube/v3/docs/videos/list#parameters
Related
Does anyone know whether I could perform HTTP requests from the YT Data API, asking for an actual mp4 file of a video that has been uploaded to a specicific channel that has granted me access to do so via OAuth2? I would need the mp4 file because I want to subtitle the videos I pull from those channels.
I read the docs, but I wasn't able to find any details on this matter, unfortunately.
Unfortunately there isn't any YouTube Data API v3 Videos: download endpoint as there is the Captions: download one. I would recommend you to use yt-dlp to download your videos in an automatic manner.
I used YouTube Data API a bit. My page does display users input from Google's servers eg video title. Would you be able to get an XSS by putting to code on Youtube and calling in back on my domain.
YouTube does not allow tags to be created so XSS over an API is no worry.
Sorry don't uses YouTube upload that much
I have a C# program I wrote using the Youtube API V3 that manages my channel's videos.
I already have all the OAuth 2.0 stuff sorted out and I'm looking for a way to tell Youtube that the authenticated account watched the video.
The reason being that I use the "watched" feature to determine which of the videos in my feed is the last one I actually watched.
Is there a way to do that?
Or is it purposefully not in the API because it messes with the view count?
Of course I checked Google and Google's API reference first, didn't find anything.
I am trying to upload the video using V3 YouTube API.
https://developers.google.com/youtube/v3/docs/videos/insert
I keep hitting HTTP 400 due to incorrect snippet.categoryID field. Is there any documentation on what available options on this field are?
I've got the answer on YouTube itself. When you upload a video, use web developer tools in browser to inspect categories dropdown. It will contain category ids.
I need the API URL for Youtube Related Videos using the Youtube V3 API.
But I couldn't find the direct API call, like it is in Version 2. Did I miss something?
https://developers.google.com/youtube/v3/docs/
Are you trying to find videos related to a video?
You can use search->list call for this with specifying the "relatedToVideoId"
And for anyone looking for a coded example:
GET https://www.googleapis.com/youtube/v3/search?part=snippet&relatedToVideoId=5rOiW_xY-kc&type=video&key={YOUR_API_KEY}