Get Cards for Videos from Youtube APIs - youtube-api

I'm trying to get a list of all cards associated with a video id. I've looked at the different Youtube APIs, but no success.
example of cards in a video
Does anyone have an idea how to do this?
Thanks

This is currently not supported by Youtube API. You can find the supported methods by Youtube API in this reference list.

Disclaimer - this is only a partial answer.
It is possible to get card stats for a given channel through the Reporting API.
To do so, you need to create a reporting job https://developers.google.com/youtube/reporting/v1/reports/channel_reports#video-cards
This will give you basic stats (card_id included) for every card of every video for one channel during the specified time interval. At this stage, we know that there are cards for a given video, we know what type of cards these are, and we have some basic stats regarding their performance. We still don't know what is behind that card.
So the follow up question is: how to query youtube APIs with a card_id to retrieve more detail information about that card?
If someone knows this, then we have a way of getting card infos for any video.

Related

YouTube API: Check if Someone Else's Video is Monetized or Not

There is a website called: TubeSift
This tool determines whether a video is "monetized" or not.
My simple question is...
Is there a way to determine if a specific YouTube video is monetized (can show in-stream ads) via some YouTube API?
If yes, which YouTube API?
If no, how then might TubeSift be determining this? Scraping the response?
Important distinction: this would be a video that you DON'T have authentication or credentials to manage - ie: it's someone else's video.
Similar questions asking slightly different things
youtube api to get channel monetization status?
Disclaimer
I realize this question seems off-topic because it doesn't have a code example but YouTube's How to Get Help says to basically ask questions here on StackOverflow for help.
We support the YouTube Data API on Stack Overflow. Google engineers
monitor and answer questions with the youtube-api, youtube-data-api,
and youtube-v3-api tags.
There's really nowhere else to ask.
Youtube provides API to YouTube content partners. I also checked the tubetarget and used scraping also but scraping is very slow as compared to the tubetarget
See this page to get enrolled.
According to youtube: When using delegation in the YouTube Data API, the onBehalfOfContentOwner parameter is always required. The parameter's value is an ID that uniquely identifies the content owner. You can retrieve the ID programmatically by calling the YouTube Content ID API's contentOwners.list method.
Detailed description here
YouTube Partner Program overview, application checklist, & FAQs
Also, check this
YouTube Partner Program policies
Please let me know if you are able to get Content Id API
In my opinion, i think if the video is greater than 10 minutes, therefore that video is being monetized, i read somewhere before that a video needs to have at least 10 minutes in order to be monetized, and obviously we can get the video duration via the API.
The json key is:
+"contentDetails": {#213 ▼
+"duration": "PT4M21S"
The time is formatted as an ISO 8601 string. PT stands for Time Duration, 4M is 4 minutes, and 13S is 13 seconds.
But the way Tubesift does it is just an intelligent guess or maybe some randomizing the "monetized" tagged of a video.
Hope that helps.

YouTube API derived data

I'm working on a application which would gather YouTube user's video data and create some meaningful data and metrics to help the creators market their videos better and expand their audience.
The problem is that since December 18, if I'm not wrong, this kind of practice is forbidden.
Can someone from Google comment and explain this change? Why can't I create metrics based on YouTube data, even if I visibly communicate that this is not data from YouTube?
For example: I would like to fetch users video description and tell what's the keyword density, how well is it prepared for SEO (in % or something).
And I guess that this new term destroys many businesses which are doing exactly that thing, creating meaningful data based on YouTube API. (Tubular, TubeBuddy, VidIQ).
Please! Anyone?

Likes report on third-party YouTube videos

I'm creating a website for users to post their videos on a particular topic. The videos will be processed with an intermediate server and then uploaded to each user's YouTube channel. However, I would like to know if the YouTube API, lets you know the number of likes you get each of these videos on YouTube.
Thank you for helping me
https://developers.google.com/youtube/v3/docs/videos/list
This is where to look. Please invest some effort of your own before asking on SO. Your question is easily solvable by using a search engine.
If you don't yet know how the YouTube API works, inform yourself first. Once you do know and were able to try something out, but are stuck, I encourage you to ask another question with your particular problem (after researching, of course).

Youtube API 2.0 Checking if a video is age restricted

I would like to check and see if a youtube video is age restricted. There are not many videos that are, but some are. I have been digging around in the youtube api documents and on the internet, but can't seem to find a way to detect this.
I am using the Youtube API V2 and only looking for one video at a time.
To check whether a video is (age) restricted in a given region, you can take a look at the media:rating attribute of the video entry, which is documented at
https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_media:rating
If you want to do a search and filter out videos that are age restricted, you can use the safeSearch=strict parameter:
https://developers.google.com/youtube/2.0/reference#safeSearchsp
I agree to Greg Schechter. The actual question was like if we have a video id (eg: In the link http://www.youtube.com/watch?v=RyDY0hiMZy8 the video id is RyDY0hiMZy8), how can we get the age restriction details based on that?
There is an API provided by Youtube to get the details based on the video id. For the above example the API link is:
http://gdata.youtube.com/feeds/api/videos/RyDY0hiMZy8?v=2&alt=json
But there is no information about the age restriction in the response.
Update on the above post:
In the API response from http://gdata.youtube.com/feeds/api/videos/tA4wytG3uh0?v=2&alt=json
we have a media$rating content coming and the data coming there can be compared with the rules mentioned in the link https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_media:rating
For non restricted videos, the media$rating value is not coming in the response. eg: in the link http://gdata.youtube.com/feeds/api/videos/RyDY0hiMZy8?v=2&alt=json
Any updates are welcome.
Age gating is not supported for embedded playbacks; so it's not something that is returned in the YouTube data api.
You can un-restrict those videos by following this link:
https://www.quora.com/How-do-you-change-the-settings-of-the-the-age-restrictrincts-on-my-YouTube-videos/answer/Doyle-Lorraine
Then your iframes should be back to normal.

Retrieving artist and song information from youtube

A long time ago, I developed a chrome extension that is able to scrobble the songs you listen to on youtube (via your last.fm account). What I did was simply taking the title of the video and assuming it had the proper format: "Artist - Track name" (obviously, I would send a request to last.fm, confirming it was a proper artist/song pair, before scrobbling). Recently (well, probably a couple of months ago) youtube started to provide artist and song information directly under the video (see image), and I was wondering how best to extract this information.
I was hoping to retrieve the information via the youtube feed api call (http://gdata.youtube.com/feeds/api/videos/videoID?alt=json), but it doesn't apear to be featured in the returned json element. Alternatly, I could try extracting it via xpath, but I figure that might lead to complications when no artist/song information is present. If anybody could help me extract this information, and thereby greatly improving my extension, I would be very grateful.
I don't think YouTube API can provide you with the artist name
as the videos can be other things that songs
you need to stick with what you have , unless they updated there API

Resources