Localization in PlaylistItems YouTube API - youtube-api

I have an application that uses the YouTube API to display a list of playlists and videos from a particular YouTube Channel. The application supports multiple languages so I also used the localizations feature YouTube API offers and it works great with v3/videos and v3/playlists using the hl param, but the only problem I faced was with v3/playlistItems as it doesn't have support for localizations.
Please help me in adding localizations using v3/playlistItems so that all videos under a particular playlist displays localized title and description.

An ugly work around is to send two requests. First fetch the video-ids by using v3/playlistItems, then use v3/videos with the video-ids separated by comma, to get the translation with the available hl param.

There is currently no indicated way of doing this from the PlaylistItems docs. Try filing for a feature request here.

Related

PHP Youtube API: Search videos where a URL is within the description

I'm working on a site where they have recently changed their domain. I'm trying to get a list of all the videos that contain that domain and change to the new domain using the Youtube API.
I am using the developers PHP example on search list, changing the 'q' value to be equal the old website domain and also adding a channelId parameter so that it'll only search inside their channel.
The problem is that some of the results do not contain the old URL in the description. Am I doing something wrong?
Thanks!
AFAIK there isn't any official YouTube Data API v3 endpoint to directly do what you are trying to.
If I were you I would list the YouTube channel's videos and then use Videos: list with part=snippet to retrieve their descriptions and then I would locally filter the retrieved descriptions.

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.

PHP Youtube API v3 Missing Description in Playlist Items

I'm not getting the description form my uploaded videos when i query them via Youtube Data API v3 using OAuth 2.0 and the sample code provided here https://developers.google.com/youtube/v3/docs/playlistItems/list.
Could this be a bug? None of my videos are private and the only thing that is missing from the response is the video's description!
I'm using the PHP library and the "part" parameter is snippet (don't know if this helps).
Thanks in advance.
I believe this is intended, since video descriptions are not displayed when viewing playlists on YouTube.
If you wish to include the description of your uploaded videos, consider using YouTube API v3 Search: list instead. An ellipsis-truncated description will be provided for your videos under snippet/description. Again, this behaviour is similar to searching on YouTube, where descriptions are cut off.
If a full description is required, you'll need to use Videos: list.
Alternatively, use version 2 of the API: https://gdata.youtube.com/feeds/api/users/youtube_username/uploads?max-results=50&start-index=1.

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 Search Results as Playlist, Need Advise

Hi guys, this is my first time to post on this awesome community so
please bear with me.
I am working with a Wordpress Plugin that can display a Youtube Search Results into Video Playlist.
My settings are:
Keywords
Author
Content- channel/keyword
My first Approach was this:
with this api as reference,
search for the keyword > display the relevant results according to the author as playlist
*I'm in doubt if I this is possible, coding 30%
*I'm not sure where could I use my settings for Content
but then when my coding is in progress I recently bumped an article that says Youtube Search is differrent on Searching a Youtube Playlist
Now I can't continue my coding because I'm not sure If I'm doing it
right. Can you give me some advise with this situation or show me some
similar project/examples?
You don't have to write any YouTube Data API code for this; it's a built-in feature of the YouTube Player.
This blog post has an example of loading a list player that takes its content from the recent uploads of a channel. You can do something similar by setting listType=search&list=SEARCH_TERM, where SEARCH_TERM is whatever string you want to search for (be sure to URL escape it). You can read more in the documentation.

Resources