YouTube Data API (v3) search filters are broken - youtube-api

Note: I am using a YouTube Iframe from a webview inside a Chrome App.
This is what YouTube's API states:
videoSyndicated
The videoSyndicated parameter lets you to restrict a search to only
videos that can be played outside youtube.com. If you specify a value
for this parameter, you must also set the type parameter's value to
video.
videoLicense
The videoLicense parameter filters search results to only include
videos with a particular license. YouTube lets video uploaders choose
to attach either the Creative Commons license or the standard YouTube
license to each of their videos. If you specify a value for this
parameter, you must also set the type parameter's value to video.
videoEmbeddable
The videoEmbeddable parameter lets you to restrict a search to only
videos that can be embedded into a webpage. If you specify a value for
this parameter, you must also set the type parameter's value to video.
Even if I turn them all on, I still get error messages like
This video contains content from X
Example video: https://www.youtube.com/watch?v=TMSIR210mRg
Q: Why is this the case, and how do I ensure that the search results only include the videos that are playable from my website?

I realized it's not that the filters are broken, it's that the videos have domain-specific blacklists. For example, certain videos cannot be played from mobile devices or in my case, from a chrome app that has chrome-extension:// domain.

There is a separate check for copyright claims. The legal copyright holder of some content on the video ( usually the music ) has the legal right to restrict or block the embed on certain sites. This info is currently not available through the YouTube API.

Related

Prevent live broadcast in search result using Youtube api v3

I am using YouTube API v3 to search for videos using Type = "video" with
snippet result.
Is there a way to tell YouTube API to ignore Live or Upcoming or Completed broadcasts videos in the result? Just need regular video search.
You may check the Search:list to know the parameters that this query supports.
eventType - The eventType parameter restricts a search to broadcast events. If you specify a value for this parameter, you must also set the type parameter's value to video.
Acceptable values are:
completed – Only include completed broadcasts.
live – Only include active broadcasts.
upcoming – Only include upcoming broadcasts.
Also from this post Exclude live events from YouTube data api search query:
on closer inspection, not all livestreams even seem to have the marker [liveBroadcastContent] set. I have found some that are set to none as with ordinary videos.

Google Cloud Video intelligence and embedded video content

Does Google Cloud Video intelligence work with embedded video content from Vimeo or YouTube. Will it be able to create tags, see faces etc... since the content is not directly uploaded?
No, it's not possible, as it says in the main page:
It quickly annotates videos stored in Google Cloud Storage, and helps
you identify...
Moreover, in the REST API docs it specifies, for the inputUri field:
Input video location. Currently, only Google Cloud Storage URIs are
supported, which must be specified in the following format:
gs://bucket-id/object-id (other URI formats return
google.rpc.Code.INVALID_ARGUMENT). For more information, see Request
URIs. A video URI may include wildcards in object-id, and thus
identify multiple videos. Supported wildcards: '*' to match 0 or more
characters; '?' to match 1 character. If unset, the input video should
be embedded in the request as inputContent. If set, inputContent
should be unset.
There is a group for discussing Cloud Video Intelligence API features and this question was asked here.

For YouTube video, how to automatically display interactive transcript?

YouTube supports interactive-transcripts, using both machine-generated and user-uploaded transcripts. This is very useful for hearings, lectures, speeches, and educational videos where a visitor might want to read along or jump around. For example in this video:
https://www.youtube.com/watch?v=IY3U2GXhz44
The visitor can click on "...More" and then "Transcript" to view the interactive-transcript.
How does a video owner make that hidden feature automatically open for visitors? I cannot find any documented method for doing that through the API for either embed or linked videos. Is there an undocumented method in the API, or a URL parameter like "&action-panel-transcript=true" that works the way I'd expect it to?
As for url parameter, you can try adding &cc_load_policy=1 behind the rel=0 if it's an embedded video or &yt:cc=on at the end of the url if it's a link to the video.
Source: https://www.makeuseof.com/tag/force-subtitles-embedded-youtube-video/

Is it possible to search YouTube subtitles?

Suppose I want to find list of videos which have the phrase "French presidential election" in its subtitle.
Can I do this using YouTube API?
It will be perfect if it can even search within both human-generated and auto-generated subtitles. But it will be good enough if it can search either of the two types of subtitles.
You may refer with this documentation. You can use Captions: list which returns a list of caption tracks that are associated with a specified video.
Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.
You need to provide the videoId parameter that specifies the YouTube video ID of the video for which the API should return caption tracks.
Here's a related thread: How to add Subtitles to Youtube video using Youtube API?
If you want to just search the subtitles from a particular video that is open on youtube.com you can view all the subtitles by selecting 'Open Transcript' from the ... button which is displayed below the main video window and to the right of the title (to the right of SAVE) - then you can just search them using the browser's page search functionality (i.e. Mac: ⌘+F, Win: Ctrl+F)

How can we figure out that the YouTube video is monetized using youtube/v3/videos?id=<> call?

Given a YouTube Video id, and using youtube/v3/videos?id=<> API call, how can we find that the video is monetized? Which param in response signifies that?
e.g. https://www.youtube.com/watch?v=E1iqGiX0lSg
Thanks,
Nimish
There is no way to determine whether or not a video is monetized with a call to the YouTube Data API (which appears to be what you mean by youtube/v3/videos?id).
Instead, you'll need the YouTube Content ID API. Keep in mind that you'll have to be a partner of the CMS, and have the authentication of the CMS, to get visibility to a video's policy this way. You'll probably want to determine a video's policyId, and then use the policies.list resource to determine the type of policy (I've never attempted this myself, though this is how I would start).
See this question for more info.

Resources