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.
Related
I wonder if there is any way to get a list of the searches done with the same key using YouTube API. I could not find it on the API documentation.
I have several computers running a searching code, using YouTube API.
The keyword used is picked randomly from a list of terms. All computers use the same key.
Any idea?
Thanks in advance,
Diego
API won't do that, but you can save the searches on your end.
I'm creating an app where i would like to display video result from the YouTube site.
However, i do not want the user to register for this.
After i registered my app, and allowed "YouTube Data Api", Still when i'm calling from my app:
https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=3&order=relevance&q=test®ionCode=AR&type=video&key={MyKey}
I'm getting back "forbidden (403)"
This issue suppose to be really simple, but i'm really straggling to get this to work, i'm thinking maybe it has something to do with the new API version 3.0, that you can not search without authentication?
Any help would be much appreciated thanks.
You can use below URL for searching of youtube videos using version3
https://www.googleapis.com/youtube/v3/search?part=snippet&q=nokialumia&key=#"API _KEY"&maxResults=20&pageToken=0
For suggestions of you tube videos you can use below link. It will gives you the data in XML format. You can parse and get results.
http://suggestqueries.google.com/complete/search?output=toolbar&ds=yt&q=nokialumia
If you want to use Version 2 use below link
Youtube Search using version 2.0
Hope it helps you...!
What kind of results do you want to see? Views, comments, share, likes? I think that you are not able to see any results by Youtube Data Api or Youtube Analytics API V3 without a valid key. You can find all error codes and their meanings from this link.
I hope it helps.
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
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.
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?