I'm trying to use the google-api-java-client (I suppose this is what is referred to as 2.0) for writing an android application for youtube. (gdata-java-client (1.x) does not support android, I understand). I have loooked through the youtube documentation as well as the sample provided in "youtube-jsonc-sample", which only queries based on the .
I want to query for youtube videos, as detailed at
http://code.google.com/apis/youtube/2.0/developers_guide_java.html#Searching_for_Videos
The sample snippets described there however seem to be for the older gdata API. I do not find anything related to youtube in google-api-java-client except for the youtube sample. The reference at code.google.com/apis/youtube/2.0/reference.html#Searching_for_videos too makes only a fleeting reference to "conditions that should be used to filter the result set."
Is it possible to query youtube videos using the 2.0 API (on android) ? Please point me to pointers or sample code.
Thanks;
The best sample for YouTube right now is the youtube-jsonc-sample, which shows how to search for YouTube videos using the JSON-C format. Though it is written to run on the command-line, it should work almost unmodified on Android. You mention this sample, but not why it doesn't meet your needs. Would you kindly expand on that?
Related
Can someone tell me how do you update a YouTube video title using the YouTube Data API in Python.
I found the API's documentation not clear and couldn't understand, so I hit Stack Overflow.
I'd recommend to absorb and then tailor to your needs the official sample code provided by Google: update_video.py.
Note that this script is quite simple. But that may well be misleading, because the Python libraries used there hide away many API programming details involved when invoking YouTube API endpoints.
For example you have to be familiar with the so-called OAuth 2.0 authentication/authorization flows for to be able to change metadata associated to your YouTube videos.
In youtube interface if we search for a term with spelling mistake, Interface provides an option to "search instead" for a similar term. for example
poovin maarile search gives you results for poovin marile
but while using youtube api version 3, poovin maarile gives zero results and poovin marile gives 230+ results. But there is no way in the api to get this very closely related term.
I am aware of spelling suggestions feature in version 2 but since version 2 is deprecated I am not interested in using it. Is there something similar for youtube data api version 3?
I don't think there's an official API for this at the moment.
You probably shouldn't rely on this being available in the future, but I think the only alternative at the moment is querying the same URL that YouTube and other pages use.
From another question: Youtube API search auto-complete
A page detailing the query parameters: Google Autocomplete API
I had a working script written in PHP YouTube API 2.0 that would retrieve a feed of videos based on a search query.
Over the couple months it has been getting choppy and it won't consistently retrieve the amount of video views that each video has which is messing up my website.
Does anyone have or know where I can find a working Zend PHP YouTube API 3.0 example that will retrieve videos based on a specific search query?
Anything helps!
Check https://developers.google.com/youtube/v3/code_samples/php
But be aware, that the V3 is still "experimental" and therefore some things might not work as expected ;)
you can find many code samples like https://developers.google.com/youtube/v3/live/code_samples/php
Getting started - https://developers.google.com/gdata/articles/php_client_lib
YouTube API Samples project has a great example. Make sure, you enabled Data API v3 in your dev console first. Also Data API v3 is highly supported and not experimental anymore.
I test with browser with the link I get from "http://www.youtube.com/get_video_info?&video_id=xx" to see if it is be able to download.
After remove some parameters from original link, some works but some still don't.
I read some post here but most of are pretty old. A lot of change since then.
I wonder if there are somebody working on this recently.
The purpose I need this is because my youtube view program need a better quality video to display.
This is link doesn't work:
http://r17---sn-tt17rn7e.c.youtube.com/videoplayback?fexp=902529%2C932000%2C906383%2C902000%2C919512%2C929903%2C931202%2C900821%2C900823%2C931203%2C931401%2C908529%2C919373%2C930803%2C906836%2C920201%2C929602%2C930101%2C930603%2C900824%2C910223&ipbits=8&expire=1364854787&sver=3&mt=1364829200&newshard=yes&id=26c94a41dba396f5&key=yt1&upn=GrcnDUPfreQ&cp=U0hVSVhQUl9NUUNONV9QSlZIOm9BbnVkMTJzOXE5&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&ip=173.248.214.165&itag=34&ms=au&source=youtube&mv=m&signature=9593596F58B377FAA4C8F5A4516C7F53CE473340.507CA2EA250CEED2E2B2377FD70EE1A0478EE322&type=video/mp4; codecs="avc1.42001E, mp4a.40.2"&itag=18&
What wrong with it? I removed fallback_path and replace sig with signature.
The working link is for webm. This is for h264. Both have the same kind of parameters.
And this is working now.
http://r17---sn-tt17rn7e.c.youtube.com/videoplayback?fexp=909708%2C912514%2C930802%2C932400%2C916624%2C931009%2C932000%2C906383%2C902000%2C919512%2C929903%2C931202%2C900821%2C900823%2C931203%2C931401%2C908529%2C930807%2C919373%2C906836%2C920201%2C929602%2C930101%2C930603%2C900824%2C910223&ms=au&itag=44&mt=1364825784&ipbits=8&cp=U0hVSVhQT19NUUNONV9QSlNCOlp5ZGoyMXJ3emlq&ip=173.248.214.165&upn=ohH0s8EjPyo&newshard=yes&source=youtube&ratebypass=yes&mv=m&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&id=26c94a41dba396f5&expire=1364851187&key=yt1&sver=3&signature=798EED35782B846D2B0EA190A17E837A0DBA18EA.AD56BCF6365AAD974C18F09F352F9422084C50AC&type=video/webm; codecs="vp8.0, vorbis"&quality=large,itag=35&
That's not a supported method of interacting with YouTube. You need to use one of the official YouTube Player mechanisms to display YouTube videos.
Please familiarize yourself with the YouTube API Terms of Service if you have any more questions.
Is it possible to get all comments for a video with the new (experimental) YouTube API v 3.0?
I only found how to get "activities" (in their terminology comment is a kind of activity) originating from a given account.
The api page says the api is not feature complete, so it is quite possible that functionality is not yet made available. Although I might've just missed it.
There's no support for retrieving comments using v3 of the API. We can't make any commitments to add in support for reading/writing comments at this time, so if your application depends on them, using v2 is required.