How to fetch featured videos using the YouTube API v3? - youtube-api

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.

Related

How to remove a video from feed using Youtube API?

Using the YouTube Data API v3, is there a way to remove a video from my feed?
Reading through the docs, I didn't see anything on the Video resource that could match what I'm looking for.
The reason you didn't find any is there's no support for this feature yet.

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.

Is there a way to add comments through YouTube API v3?

Couldn't find it anywhere in the docs.
Is there a way to add a comment to a video with YouTube API v3?
There is no support for comments in v3 of the Youtube API. If you wanna work with comments you need to use v2 of the API.
Here is a guide on how to use comments with the V2 API:
https://developers.google.com/youtube/2.0/developers_guide_protocol_comments
To create a top-level comment, use the commentThreads.insert method.
https://developers.google.com/youtube/v3/docs/commentThreads/insert
According to the Youtube API blog, comments are only available on v2 at the moment, until a "modern" alternative comes along for v3: http://apiblog.youtube.com/2014/03/committing-to-youtube-data-api-v3.html

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)

YouTube safe search and rating via API

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

Resources