which accesses does 'youtubepartner' scope grant in youtube API? - youtube

The documentation seems unclear.
It says "View and manage your assets and associated content on YouTube". What does "asset" refer to ?
This is a common enough question that I thought it should be answered, though.

An asset resource represents a piece of intellectual property, such as a sound recording or television episode.

Related

Is it possible to use the YouTube API to automatically create a comment when a new YouTube video is uploaded?

I am working on a personal program to use with my Google account. I don't have a custom website or domain to use. Basically, the idea of my request was to create a personal bot that would comment "First" on a video as a joke between my friends. I looked into the YouTube API a bit, but I got differing answers on the capabilities of the v3 data API. I found the commentThread page but am also confused about its usage. If anyone could give me a basic idea on if this project is possible, I would love to hear it.
welcome to Stack Overflow!
As you said, you want to create a comment when a video uploaded. YouTube has provide the webhooks for this.
You can see the docs push_notifications. I think that is what you want. :)

How to specify multiple topics in youtube search API?

Can I only give one topic id to search youtube videos ?
Is there a way I can give more than one parameters ?
We just rolled out support for additional video topics that are "relevant" to the video, but don't completely describe the video:
As of right now, you can just specify a single topic id to use as a search filter, but these additional topics (as well as the fact that a video can have more than a single "central" topic) do imply that providing combinations of topic ids as a filter would be useful.
Could you please file a feature request to keep track of this publicly off of Stack Overflow?

Age-restricted videos - Is "media:rating" sufficient?

I'm using Youtube's API to determine whether a video has been age-restricted. I've read that looking at the value of the media:rating tag will do just that.
However, when testing it out with Battlefield 3: End Game Launch Trailer, a video which is preceded by a Content Warning, I see that there is no "media:rating" tag in the metadata.
Is simply checking media:rating insufficient when determining the video's age restriction? Is there another tag to check? Or am I missing something else entirely?
That's the only exposed attribute in v2 of the API that holds information about restrictions. I've periodically seen videos like this, where they are age-restricted but the media:rating tag is missing (I'm guessing it's likely that the public front-end uses a different, unexposed attribute for determining how it restricts the videos). You might want to report the video so the developers can look into why it doesn't have that metadata.
Related link:
https://groups.google.com/forum/?fromgroups=#!topic/youtube-api-gdata/4Bzbr_uLkdA

Is it possible to get the YouTube author name for a video using the v3 api?

So I'm working on switching to using the v3 version of the YouTube api (which is so much better it's like a completely different product), but I'm either missing something or it is ...
Being able to fetch an arbitrary list of videos, and their details, in one call is going to make life significantly better, but in the videos list method, the the video details "snippet" contains the "channelId", not the "author".
I've spent quite a bit of time looking through the documentation, but can't find any way of getting from a channelId to the human readable author name.
How am I expected to map a video to an author?
It's not possible to get back a display name (either legacy YouTube name or Google+ name) for a channel as part of the video.snippet response. You need to take the channelId and perform a channels.list(id=channelId1,channelId2,...,part=snippet) operation to get that information. The good part is that you can pass in up to 50 channel ids in a single call.
This sort of separation of information into different resources with ids effectively serving as keys linking the resources was a deliberate decision. The engineering team is aware that it will require developers to make an additional API call, but they're in favor of that design.
At the same time, the API is still in an experimental release, and if you have any feedback about using the API while doing real-world development, feel free to open a feature request in the issue tracker. If enough people give feedback about a certain aspect of the API, that could factor in to the final revision's design.
The accepted answer may have been correct at the time of writing, but as of 2/2018 the snippet part now includes a channelTitle property.

YouTube API: videoEntry context in playlist

Is it possible to find the context of a video in respect to any playlist that it is included in? I would like to be able to check if the videoEntry is included in a playlist and, if so, figure out the next video in the playlist.
Flickr has a lot of great photo context methods, I hope YouTube does too, I just can't find anything on it.
Well, obviously you want to know the VideoId of the video in question first, right? So say it's "4eUibFQKJqI" and it's in a playlist whose Id is "6C0464B5CC81A607" (You can easily get those Ids from your 'My Account' section in YouTube).
If I get the feed for that playlist, then the resulting xml file gives you all the information you need to check if that Video is present, and the order that you have set in 'My Account' is preserved.
So, you have two ways of analysing the results that YouTube sends you. One is to make a request to that playlist address and parsing the results using Linq-to-Sql, if you use Asp.Net, for example. Whatever language you use, it will have Xml-parsing capabilities, so it's just a case of iterating through the entries in the feed.
If you use a library for your language, it may well have a specific method to determine whether a given video is in a given playlist, but if it doesn't, it's pretty easy to query the raw xml file and get that information, as described above.
Hope that helps - it's hard to tell from your question what level you're at with this stuff... Anyway, it's all at the Developers' Guide.
http://gdata.youtube.com/feeds/api/playlists/PLAYLIST_ID?v=2
from http://code.google.com/apis/youtube/2.0/reference.html

Resources