Using YouTube API to retrieve information of past searches - youtube-api

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.

Related

Youtube API beginner, searching for a list of different terms automatically

I have no idea if I'm allowed to ask questions here, because I'm a complete beginner and I need help for a university paper I want to write. I need to search for quite a big list of terms in the YouTube API with a specific regioncode, location, locationradius, publishedafter and publishedbefore term.
So basically I need to do queries like these, but for the same search term I have to change these parameters a few times and I have to do that for a lot of search terms.
Does anyone have a good guide that shows how to do this? Or would someone be willing to help me with this?
Thanks in advance
You can find YouTube API search examples in every major language in this Github repository. The reference for this API endpoint as well as the list of parameters available for the search.list call is available here.
You'll need an API key to use the API which you can get by:
Going to the API Console (create an developer account and API project if you haven't already).
Enabling the YouTube API on your API project on this page.
Clicking Add credentials > API key and selecting "sever key"

Search YouTube API without login in

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&regionCode=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.

How should I get all the tweets of an specific hashtag?

I'm trying to develop some code in order to get all the tweets that were generated with certain hashtags, then parse them and finally analyse them. I believe I've already thought and solve the last two parts of this but I'm having some trouble with the first one. I've already read the Twitter Search API documentation but I haven't realised yet how to do this. Can anyone help me?
If you want to retrieve the tweets sent recently, you should use the search/tweets endpoint of twitter' REST API, and mention the hashtag inside q parameter
In case you want to listen to tweets containing the hashtag and receive them in real time, then twitter's streaming API is what you should use (statuses/filter endPoint).
Have a look at the documentation on twitter's website, there's also plenty of information on how to do this all around the web.

YouTube API 3.0 Query Search

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.

Twitter Data Archive

is there any service from where we can download tweets?
UPDATE!!!
Googling for sometime gave me this result
a.) http://snap.stanford.edu/data/twitter7.html
b.) http://140kit.com/datasets
Yes, there is. It's called the Twitter API.
As we have access to limited tweets by Twitter-API, we should make use of third-party resellers like Topsy for just the past data, GNIP just for streaming data, or DataSift for both streaming data as well as past data.
You might also want to check the following sites:
http://www.infochimps.com/collections/twitter-census
http://www.tweetarchivist.com/
Twitter API allows provides partial results, it gives you the last 100 or even 500 tweets fo every search. If you need to keep tweets long term, twitter API shows its limits.
I had same need as you apparently hae and I developed a tool that queries twitter API periodically and stores search results on a Wordpress database.
I called the tools twittcorder and you can find a live demo on twittcorder.com
I hope this helps.
These other data sources are probably shared against the Twitter TOS. I wouldn't want to invest my time and effort building something on datasets that are non-repeatable. The Twitter Streaming API allows collection of a sample of Tweets.
There's also Gnip: http://gnip.com/.
Sysomos is there for complete data analysis including twitter, faecbook and various boards and forums

Resources