YouTube Kids versus MadeForKids status - youtube-api

I'm trying to understand, if it is actually possible, how I can determine whether YouTube content is available on the YouTube Kids platform using the properties of each video. I can't even tell if channels or specific videos are made available for the Kids platform.
I would have thought that videos available on the YouTube Kids platform would all have a MadeForKids designation. However, using the videos.list endpoint, the status.madeForKids is often false despite the video being on the YouTube Kids platform (and the Safesearch is not strict.)
I have tried filtering on MFK videos and safesearch output. I've searched YouTube Kids for creators who are explicitly not MTK and found videos that are not designated MFK and are not strict for Safesearch.

Related

Identify a video as an ad with YouTube Data API

I'm using mostly the video and search list resource types. I want to filter the results for video ads. I had hoped that ads would be a video category or there would be another identifier for video ads, but I haven't been able to find a way so far. Any ideas?
With my open-source YouTube operational API you have access to whether or not a given video is a paid promotion by fetching the isPaidPromotion boolean in the JSON file at https://yt.lemnoslife.com/videos?part=isPaidPromotion&id=VIDEO_ID
Here are examples of videos ids:
having paid promotion: Q6gtj1ynstU
not having paid promotion: PEorJqo2Qaw
Then you have to discover all YouTube videos, to do so except if you look for specific keywords etc, there is this difficult method which consists in getting an initial set of YouTube channels, fetching their videos, fetching the comments on each video, fetching the YouTube channels from the comments and so on.
Unfortunately (AFAIK), some of those ads videos are unlisted videos - see these (1 and 2) ads videos examples I extracted while watching a random YouTube video - this ads video is public, though.
While querying the data of one of these videos (i.e. uuh2wkRmodI) - see the example using the try-it feature in the API documentation - , I don't see any relevant information that points me this is an advertisement video - other than being an unlisted video.
Probably, you can consider its statistics - I found odd that a video has no likes, no favorites no comments AND has views:
"statistics": {
"viewCount": "32",
"likeCount": "0",
"favoriteCount": "0",
"commentCount": "0"
}
Since those are unlisted ads videos, those cannot be searched via the API. Quote:
If a video is uploaded as an unlisted video, the property value also
specifies the date and time that the video was uploaded. In this case,
anyone who knows the video's unique video ID can retrieve the video
metadata.
Unless you somehow manages to get the VIDEO_IDs of those ads appearing before a normal video starts, you cannot really search those videos neither by YouTube or its API.
My additional guess is also those ads videos are set by YouTube itself based (aside other settings) in the region (country) of the viewer and the owner of those ads videos pays to YouTube for embed their advertisements.
If you want to try it out, then, try to search for videos that came from channels of recognized product brands and get only their public and kind of short videos (I'm not talking abuot #shorts, but, videos with a duration of a half on a minute or less).
Additionally, take into account that some ads videos might be longer, so, in resume: you have to work with what is publicly available.

Detect whether a Youtube video is licensed or not

So I got the new API cURL working for me for requesting video informations, I want to get the "licensed" info, tried with a music video, it worked, here.
My problem here is that I even tried it with a normal video, I got the same "licensedContent": true How can I detect if the music video is actually licensed?
For an example here is shakira's song and the description of the license here.
Disclaimer:
The following answer isn't complying with the YouTube operational API specification, you should instead follow my other StackOverflow answer on enumerating the musics in the given video. That way by checking whether or not the video contains musics you can deduce if the video is licensed or not.
Deprecated answer:
One more time YouTube Data API v3 doesn't provide a basic feature.
I recommend you to use my open-source YouTube operational API. Indeed by requesting https://yt.lemnoslife.com/videos?part=containsMusic&id=VIDEO_ID you'll get the boolean whether or not the video contains a music in item["containsMusic"].
Examples:
Hips don't lie:
https://yt.lemnoslife.com/videos?part=containsMusic&id=DUT5rEU6pqM
(returning "containsMusic": true)
A not music
video:
https://yt.lemnoslife.com/videos?part=containsMusic&id=6ZRgVX8SYX4
(returning "containsMusic": false)
licensedContent
means that the content was uploaded to a channel linked to a YouTube content partner and then claimed by that partner.
https://developers.google.com/youtube/v3/docs/videos#contentDetails.licensedContent

Does YouTube Data API V3 work with YouTube Music?

I would like to extract playlist data from Youtube Music, as well as metadata related to the songs in the said playlist. Is this possible with the Youtube Data V3 API, or YouTube Analytics API?
If so, where can I find documentation about calls and available metadata; I am not finding what I need on the YouTube Data API page. I am currently referencing PlaylistItems and Playlists in the reference Docs, but it seems that is geared to videos. Is that by design because you can toggle between video and audio in YT Music?
If possible is there an official Rust Crate?
Thank you in advance for the help.
Indeed, this feature is missing from YouTube Data API and quite a few other API users expressed the same need as yours.
The official Google staff account says the following:
This type of information is not available in the API. We have already raised a feature request for this but I can't guarantee that this feature will be implemented.
That is it: they may well implement this feature at some point, but, unfortunately, cannot tell when that'll happen.

How to only find videos that can be played on mobile?

Does YouTube data API still not support this feature?
I have been trying to find a way for more than a few months already, and there doesn't seem to be a reliable way to retrieve a list of video that can be absolutely played without restrictions on a certain device. An answer from a person who's involved in the team would be VERY appreciated.
Youtube API: Search videos playable on mobile devices might be relevant, but I am skeptical whether this approach can be used to solve "The content owner prohibited this video to be played on this platform" type of restrictions.
Update:
On Nov, 7, 2015, there is still no way to filter the videos that are playable on a mobile device. More specifically, I want to find the videos that are playable on an embedded iFrame (ex. iOS helper library) using the YouTube data api v3. The available params for a search query are listed here.
You can find various search parameter listed in YouTube API v2.0 – API Query Parameters like license, restriction, paid_content that can help filter videos that are restricted for such specific reason. Also, if you can use YouTube API v3.0 there is one more option videoSyndicated that will restrict a search to only videos that can be played outside youtube.com.

Youtube API - Video is not available

Is there any way to detect if a video was removed or unavailable?
We need to have ability to remove it from the video listing if it has been removed from youtube server.
Hung BUI if you are using youtube API there is a way to filter the video which has been removed or not availble in your locality.
Kindly watch this video and seek it to 2m:03s, The tutor will say how to filter the unavailable and restricted video,..
Youtube Video on YOUTUBE search API
Use a parameter format and restriction along with the youtube api endpoint
https://gdata.youtube.com/feeds/api/videos?q=GoogleDevelopers&max-results=1&v=2.1&alt=jsonc&format=5&restriction=DE
If you hit this endpoint of youtube you can get a set of youtube videos which can be embedded as well as we can check whether the video is restricted in our locality.

Resources