I am using YouTube's analytics explorer,
I am trying to query the service for data but I do not know how to fill out the first parameter.
The first parameter is IDS and the directions state that IDS is: Unique channel or content owner ID for retrieving YouTube Analytics data. Either channel==C or contentOwner==O where 'C' is the encrypted channel ID and 'O' is the content owner name. (string)
Where do I get either the contentOwner or channel?
Related
Is is possible to query the YouTube api for channels that a user is a Subtitle Editor for? I can't seem to get this work using the Channel list endpoint.
I'm looking at the channels endpoint described here.
It appears that there are at least 4 ways to use this endpoint:
List by channel id
List by YouTube username
List my channel
List channels managed by a content owner.
I was hoping that channels that a user is the Subtitle Editor for would be returned in the the ListByYouTubeUsername query but this doesn't seem to be the case. It it possible to get this data using the API?
For a given list of users (via their email address), I am interested in getting their most recent liked videos.
Also what is not clear is - is it possible to access any liked videos for users for which you don't have authorization?
I have seen solutions via getting the 'Liked' playlist, however it appears this can only be accessed for myself.
Note that a given user's list of liked videos -- of which playlist ID indeed can be retrieved via Channels.list API endpoint through the property contentDetails.relatedPlaylists.likes -- is private data pertaining that user.
Hence you're not going to be able to obtain from the API the kind of information you're looking for -- except if you issue an authorized API endpoint call, implying that the respective call is to be made relative to your own YouTube account (i.e. channel), in which case you'll get the ID of the playlist of videos that you liked yourself.
There's also the possibility of employing the parameter onBehalfOfContentOwner -- applied to each of the API endpoints Channels.list and PlaylistItems.list:
onBehalfOfContentOwner (string)
This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.
The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
For thorough info about these things see the document Acting on behalf of a content owner, specifically the section relative to YouTube Data API v3.
Is there a way to find the top X YouTube accounts by subscriber count for Y year---say, the top 100 accounts in 2015? I don't see anything in the API docs, and while there are services like SocialBlade and VidStatsX, they don't provide archived lists, and the data is not captured on archive.org.
The standard Analytics API doesn't provide this functionality. You can get data about views, likes, and dislikes, but you must provide one or more channel IDs.
Required Parameters: ids
Identifies the YouTube channel or content owner for which you are
retrieving YouTube Analytics data.
To request data for a YouTube
channel, set the ids parameter value to either channel==MINE or
channel==CHANNEL_ID, where CHANNEL_ID identifies the currently
authenticated user's YouTube channel.
To request data for a YouTube
CMS content owner, set the ids parameter value to
contentOwner==OWNER_NAME, where OWNER_NAME is the CMS user ID for the
user.
Use the Try this API section on the reference page to test the possibilities.
I want to fetch the youtube channel list and show it on tableView can anyone help to get the channel list of loggedin user via google.
You may want to check the Channels: list method which returns a collection of zero or more channel resources that match the request criteria. Then use the forUsername parameter.
The forUsername parameter specifies a YouTube username, thereby requesting the channel associated with that username.
Additional reference:
YouTube API v3 get all channels associated with a logged in user
I want to use list_batch_report_definitions method in Youtube Analytics API V2.
http://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/YoutubeAnalyticsV1/YouTubeAnalyticsService#list_batch_report_definitions-instance_method
But I don't know what is on_behalf_of_content_owner and how to get it.
onBehalfOfContentOwner string
The ID of the content owner for whom the API request is being made. If the request does not specify a value for this parameter, the
API server assumes that the request is being made for the user's own
channel.
ID Identifies the YouTube channel or content owner for which you are >retrieving YouTube Analytics data.
Note: Content owner reports are only accessible to YouTube content partners who participate in the YouTube Partner Program.
I suspect once you have been accepted into this partner program you will be given access to the content owner id.