I'm using youtube to retrive some data on a youtube channel (title, id, keywords, lenght, publication-date, ...)
I want to know how to get the share count of each video in this channel.
I want to build a "top 10 most shared video" of a specific channel.
Have a look at the YouTube Analytics API:
https://developers.google.com/youtube/analytics/
There is a metric for retrieving the share count (shares). Use dimensions (dimensions=video&metric=shares). Alternatively, use filters if you want to retrieve the share count for a specific video: video==Zhawgd0REhA. For more info, see:
https://developers.google.com/youtube/analytics/v1/available_reports
Related
I want to get list of channels of a specific genre in my App using YouTube API.
For Example -
I want to get list of all comedy channels on YouTube in my App.
Is this possible , if yes than How ?
YouTube's V3 API doesn't have a category for each channel.
Take a look at this similar question: How to get the Channel Type or Category of each YouTube channel using YouTube API?
YouTube documentation for this: https://developers.google.com/youtube/v3/docs/channels
The YouTube API does however show if videos and by extension channels make videos for kids.
I want to get metrics (such as likes, views and subscribers gained) for every video in my youtube channel (or about 10 latest video) , how can I do it correctly?
I'm using such API call from Youtube Analytics API, but it turns out that it returns total views and total likes from all videos, not individually about every video.
`https://youtubeanalytics.googleapis.com/v2/reports?metrics=views,likes,subscribersGained&ids=channel==MINE&startDate=2014-07-03&endDate=2020-06-01&&key=${apiKey}&access_token=${token}`
I read documentation of YouTube Analytics API and I can't find this information there.
If you want the response to be grouped by video your have to specify the dimension parameter to video.
Here is a sample request from the documentation (Basic stats/Top 10 – Most watched videos for a channel):
https://developers.google.com/youtube/analytics/sample-requests#Channel_Reports
Although the note does not specify it, the sort parameter must be the first metric that you declared.
If want to get information on more that 10 videos or to pull information for the latest videos, you can specify the dimension as video and you must specify the video ids in the filter parameter as video==VIDEO1_id,VIDEO2_id....
The videos in a channel can be retrieved through the YouTube Data API from the search endpoint.
You will get a list of videos with their details as a response, among others the videoId and publishedAt values.
I have a large array of video id's. (Over 100) I need to determine which videos belong to the oauth'd user. Looking through the Youtube API docs it doesn't look like they have a way to get videos by ID for a channel. I see how to get all videos for a channel but that looks like it limits the results. Is there an efficient way to do this that I'm missing?
Ideally I'd like to say grab all videos with this id that belong to this channel. I'd accept a way to just get all videos for the users channel so I can compare the array of videos with my array of id's.
Using Laravel socialite and the PHP google api client.
You can either
Get videos by IDs using the videos:list API endpoint. The id parameter takes up to 50 comma-separated videoIDs.
or
Get all videos in a channel using the channels:list API endpoint. The id parameter takes up to 50 comma-separated channelIDs. Each page of results has up to 50 videos.
If you already have the videoIDs, option 1 would be best.
I have figured it out if you want to get the video with particular video id
https://www.youtube.com/watch?v=hcMzwMrr1tE
if you want the thumbnails for the particular video
https://storage.googleapis.com/yt-trends-top-ten-lists-2022/thumbs/**hcMzwMrr1tE**.jpg
put the video id you will get the details you can use google api like this
I am using youtube data apis 3.0. I want to get the NDTV channel videos to publish in our site.
I can get the list of videos description and some other basic info, but I want information like file details, ratings, liveStreamingDetails, player, processingDetails, recordingDetails, statistics, status, suggestions, topicDetails etc...
can any one please help me?
This is the way to grab the last 50 (maximum allowed) videos of a user with Youtube with Api 3.0
//search channels of user
https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername={USERNAME}&key={KEY}
//search playlist items of upload channel
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId={PLAYLIST}&key={KEY}
//search videos of the playlist items of the upload channel
https://www.googleapis.com/youtube/v3/videos?part=id,snippet,contentDetails,status&id=BBfPP0rTjxo,o04cSB5afGc&maxResults=50&key={KEY}
I'm trying to feed videos from a YouTube channel to a website. I've been able to add the videos one by one but I would like to add the whole YouTube channel very interactively on the website. Any idea?
Using Data API v3, you can get a list of all playlists associated with your channel.
'https://developers.google.com/youtube/v3/docs/channels#properties' ->
'contentDetails.relatedPlaylists'
Iterating through these playlists, you can get video ids and feed them.
'https://developers.google.com/youtube/v3/docs/playlistItems#resource' ->
'contentDetails.videoId'
Or you can put the whole playlist as a player by,
going to playlists ->
'player.embedHtml'