youtube - gdata api - specific columns? - youtube-api

I am using gdata api to retrieve information about specific youtube videos using something like this below:
Uri videoEntryUrl = new Uri("http://gdata.youtube.com/feeds/api/videos/ADos_xW4_J0?format=5");
Video video = request.Retrieve<Video>(videoEntryUrl);
However, I wonder if there is a way to specify that I am only interested in certain fields of the video rather than getting the complete video feed. For example, say I am only interested in commentcount AND viewcount of the video. However, the code above will return the entire Video class which seems I may be consuming more bandwidth than needed.

Looking for something like this?
http://jsonformatter.curiousconcept.com/#http://gdata.youtube.com/feeds/api/videos/ADos_xW4_J0?format=5&fields=yt:statistics,gd:comments&alt=json

Related

YouTube API V3 - How to get normalized game title?

I am trying to get the normalized game name using youtube API for a video if it is in Gaming category.
For example: https://www.youtube.com/watch?v=qIvWgSpy31k, for this video I can see its normalized game name is the description:
But when I use the videos.list method, I can not see this returned. After checking all the properties for the video, I can not find it either.
Is there any way to fetch the game name?
That information isn't exposed by the YouTube API. You can see that by checking the documentation for Videos.list which returns a list of videos resources this is the information available about a video.
You can request it as a new feature here gdata-issues why they are using a gdata forum for issues I have no idea.
I've encountered the same problem, so far in 2020 they haven't implemented it yet. It looks more like business issue. The only way to get game title bound to video is webscraping. I've used headless browser library for Java called HtmlUnit. When you go to the direct url of the video you want to scrape just get html from it and use the regex listed below to acquire game title.
(?<=,"title":\{"simpleText":").*?(?="},"subtitle")

Output last and popular youtube videos on site ? any api?

I want to output last videos and popular videos of my youtube channel.
Is there any standart widget, api method for this?
Based on this answer, you can use the YouTube Data V3 API to get the uploads playlist ID, which you can then use to get the latest videos in that playlist. You can change the value of maxResults to return however many videos you want (from 0 to 50).
Use the search:list method to get your most viewed videos by specifying the channel ID and setting order=viewcount (not quite sure what you want when you say popular videos, you could also set order=rating to get the highest rated videos). This video might also help you out.

Google Youtube API V3 Just Get Data

There are changes made on the Youtube API, i see bunch of stuff.
But all i want is to get the Youtube title and img thumbnail. DO i really need to go all the stuff regestering for api, etc just to get the title and img of a single video.
So i figured it out.
Yes, you really need to register an to the API Developers Console.
if you are like me and just want to get the title or thumbnail use the
Public API access
but if you are looking more for the extreme controls on your video out of youtube. You can do that but you have to use the
OAuth Credentials
to get simple data i used >>THIS<< basically the snippet holds the information for the Video like title,uploaded by,uploaded on etc. .

Setting first three recommended videos in youtube

I would like to know if there is anyway I can set the first three videos to be shown as recommended videos for a particular video feed using youtube api.
That's not something that you can control using the YouTube API. There are no plans that I'm aware of to add in that functionality.

YouTube API: 'Official Content Only?'

When using the YouTube api to query and retrieve videos, is there a way to limit results only official content? I want to retrieve the new music videos for certain artists but I want to make sure I am only receiving real videos and not UGC stuff. Can this be accomplished? Thank you.
There is no search parameter that ensures that you only get back "real" music videos. (And the line between a "real" video and user-generated content isn't always clear.)

Resources