I am working on Youtube Data API. And I am looking for a way where I cn fetch all videos from particular channelId along with its video details like height,width and duration.
Now after searching for api docs I found search api to which provides the data from channel id. But the problem is , it only gives the content part. e.g. It provides very few details.
I found other ways which is provided in gdata api and youtube api v2 which is deprecated and I do not want to use them as they are deprecated.
Anyone has any idea, or better way where I can get list of video from channel id along with video detail(height,width,duration) in a single api hit.
Right now I am using URL something like this
GET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=<SomeChannelId>&maxResults=50&order=date&key={YOUR_API_KEY}
Related
I'm trying to make a new application that will help people hear music together.
One problem I noticed is that the people need to get the YouTube code of each song or video they want to hear.
I kind of fixed this problem by using MySQL database with names and codes of songs, then all what the user need to do is to find the YouTube video and click on share with my application, it sends the link and the name of the video to the database and then users can search there for the song they want to play. However, I want to get rid of that, too.
Is there some way to search for a video on YouTube with the API?
I found this link to open source code on Google Developers https://developers.google.com/youtube/v3/docs/search/list#examples
But it just doesn't work.
You can use this:
https://www.googleapis.com/youtube/v3/search?part=snippet&q=eminem&type=video&key=<key>
Change the parameters to get what you actually need, but you need an API key from https://console.developers.google.com/ to make this work.
https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20
you can use above url for searching videos.
I'm working on a Xamarin project that uses YouTube API v3. I'm able to play videos but I want to display separately some metadata like view's counter, video name and publishing time. Is there any way to get this information?
Any help would be gratefully appreciated.
You can use YouTube API v3 itself, take a look at the Videos Docs. The resource returns a JSON blob, and you'll find the view count under statistics.viewCount.
This question already has answers here:
How do I fetch comments in version 3 of the YouTube API?
(2 answers)
Closed 7 years ago.
"Getting comments with Youtube Data API V3 is on Trusted Tester stage". Can anyone give me some update info for this?
I don't want to use API V2 for getting comments, maybe there is a better way?
Can anyone give me an advice how to use jsoup html parser in Android for retrieving comments if there is no way to use Youtube Data API V3 (With example, please)?
Update: Comments feature is now available in Data API v3. http://youtube-eng.blogspot.com/2015/04/manage-comments-with-youtube-data-api-v3.html
Comments feature for the v3 API will hopefully be released on early Q1.
You can track the issue and ask for the trusted tester, so you can already start developing against.
https://code.google.com/p/gdata-issues/issues/detail?id=5046
The YouTube Team added support for comments in v3 recently.
Have a look here:
http://youtube-eng.blogspot.co.at/2015/04/manage-comments-with-youtube-data-api-v3.html
https://developers.google.com/youtube/v3/docs/commentThreads
I don't know if this may help a bit, but there is a little code example page from Google to use their Youtube API: YouTube Data API (v3) Code Samples
The samples are available at github as you can see at the page.
I don't think it really think JSOUP is an option. If you have a video (let's take PewDiePie for example) it has litterly thousands of comments (maybe more), and not all the comments are displayed when you open the video, so you'll first need to find a way to load all comments before you can start reading them.
The reading part is the most difficult, because it has thousands of comments, the system takes a while to read the comments and do whatever you want to do with it.
But what I did find is this:
How to get comments of youtube Video from VideoId android in youtubeApi v3?
Take a look at the link in the comment on the first post and compare it to the video itself:
With this link you get the comments using JSON:
Getting comments of a video: http://gdata.youtube.com/feeds/api/videos/DBNYwxDZ_pA/comments?orderby=published&alt=json&max-results=30&start-index=1
The video itself: https://www.youtube.com/watch?v=DBNYwxDZ_pA
I hope this helps you a bit with your project!
As per title: how does flipboard fetch the google plus timeline/stream? I tried with the plus v1 api and PlusClient provided by Google play library but seems like I'm only allowed to fetch my posts, also, there isn't anything useful on github... I can only find samples on how to post content and fetch single users timeline
Anyone can point me? Thanks
Flipboard uses a private API they have licensed access to from Google. It sounded like it was going to be made available to all but it has not.
I was planning on using the Youtube Android Player API, when I noticed it needs a YouTube Data API (v3), API key: https://developers.google.com/youtube/android/player/register
The Youtube Data API handles most youtube's interaction, like getRating, upload video's, rate video's , get playlists etc, and sets a quota based on those actions: https://developers.google.com/youtube/v3/getting-started#quota & https://developers.google.com/youtube/v3/determine_quota_cost
None of these actions are video playback though, that's what the Android Player does. I also can't find anything about quotas on the Android Player API section.
So, my question is two-fold: Why does the player API need the Data API, and is there a quota on usage of the player API?
As far as I have researched on this.
The Google Developers Console allows creation of keys and then we restrict the key usage ourselves. This means that each key when created is a general key. It can be used for any Google API.
As far as YouTube player is concerned. As long as we don't make any calls to the YouTube API in our app, I don't think there is a quota limit. This is what I have concluded after reading this: https://developers.google.com/youtube/v3/getting-started#calculating-quota-usage
Also, since the player doesn't work until you have the YouTube app installed, it basically uses the app to play content. If you just show thumbnails, the thumbnails are already public and you can generate them this way: How do I get a YouTube video thumbnail from the YouTube API?
This API does not require an API key thus it does not affect the quota in any way.
This is an intuitive answer as per my research. I could not find any explanation anywhere so this is what I came up with.