YouTube safe search and rating via API - youtube

YouTube API v2 allows you to a) search for safeSearch only and b) get the media rating (eg PG-13) https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_media:rating .
Is there a way to do this in the v3 API?
If not: Why was this omitted? Are there plans to remove it from v2?
In general, what's the best way using the API to tell if a video is safe?

You should be able to use the safeSearch parameter as described at the following link:
https://developers.google.com/youtube/v3/docs/search/list
I hope that answers the first half of your question.

Furthermore, you can find the getRating method at
https://developers.google.com/youtube/v3/docs/videos/getRating
under the list of video methods (this section also lists the various ratings such as pg13 etc):
https://developers.google.com/youtube/v3/docs/videos

Related

Is there a way to access the comments I make on YouTube through the API?

I'm trying to retrieve the comments I've made on YouTube to turn them into Markdown files, but I can't find a way to do it filtering by user in the API documentation.
I thought it would be possible since the Google account has a link for it but when using the parameter "channelID" in the API to list comments as it says in the documentation, it gives back a 400 error.
You are looking for the comments your channel posted, however when using CommentThreads: list with channelId=YOUR_CHANNEL_ID you are listing comments people wrote on your channel, as described the documentation:
channelId
string
The channelId parameter instructs the API to return comment threads containing comments about the specified channel. (The response will not include comments left on videos that the channel uploaded.)
One more time YouTube Data API v3 AFAIK doesn't provide this basic feature.
You have two possibilities:
Use Google TakeOut (make sure to export Comments in YouTube and YouTube Music)
Web-scrap the webpage you provided

Find Youtube Channel by Custom URL

Recently I am trying to collect Youtube channel infos by urls. With Youtube API V3 youtube.channels.list, I can get channels by below two types of urls with no problem.
https://www.youtube.com/user/LadyGagaVEVO/ (query by forUserName)
https://www.youtube.com/channel/UC07Kxew-cMIaykMOkzqHtBQ (query by id)
However for the custom url such as
https://www.youtube.com/phunky
I found no official way to get the channel. I know it is possible to get the channel by parsing OpenGraph meta-data. Still want to know if there is more ideal way with the V3 API.
Thanks
The only solution I've seen is from this answer which is to use the search api. It's not perfect but it is the only solution I've seen.

Youtube kids api

Do youtube-kids provides search api that will only return you-tube kids video?
Can I use existing you-tube api to list/search the you-tube kids video? Youtube-kids app only provides content that is child-friendliness. Can I use existing api to list/search these content?
Googled around for quite a while and found nothing specific as to a filter or Search API that is for Youtube Kids only. In regards to the Youtube Search: list API, there is the safeSearch optional parameter that I think you can use instead. As per the docs:
The safeSearch parameter indicates whether the search results should include restricted content as well as standard content.
There are 3 possible values: moderate, none, and strict. I'd suggest the Education Feed but it's already been deprecated, and I think safeSearch is the one they use to replace it.
Try using the safeSearch parameter as 'strict'. This is most likely what YouTube Kids uses.

How to fetch featured videos using the YouTube API v3?

I use some standard feeds of YouTube API v2 like:
http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured
http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed_Music?time=today&v=2
Now, I want to switch to API v3, I have read the doc here: https://developers.google.com/youtube/v3/docs/
There are many resources types and methods, but it seems none is correspond to the old v2 standard feeds, is there any solution for the job ?
You can use videoCategories and guideCategories for that.
Here's the full blog.
GDL video.

YouTube API comments streaming

Is there any YouTube API which enables external applications to search for keyword/brand name across all video comments on YouTube and send it back to some URL? Also, pull method is fine if the proposed push idea does not exist.
So I would like to know if my brand was mentioned in any video comment on YouTube, similar as what Twitter allows with User/Site Streams.
The YouTube API (v2.0) defines comments as a property of the video object. Details on this relationship here:
https://developers.google.com/youtube/2.0/developers_guide_protocol_comments?hl=en#Retrieve_comments
Therefore, in order to search every YouTube comment you would need to traverse the entire collection of videos. If you're going to attempt something like this, it makes sense to validate your concept by first focusing on the feeds or categories that are most relevant to your brand. Details on feed and categories here:
https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds
https://developers.google.com/youtube/2.0/developers_guide_protocol_category_keyword_browsing
No, there isn't anything like this available from the existing youtube api (neither V2 nor V3)

Resources