HackU 2013University of Dundee         February 2013
The web is full of    juicy andlong lasting dataHackU 2013 – University of Dundee
And there is a lot of it aroundHackU 2013 – University of Dundee
However, ourattempts to get it can sometimes    be clumsyHackU 2013 – University of Dundee
What we need is                                    an easy way to                                    get to that dataHackU...
What about using APIs?                  Like RSS, JSON, XML, CSV, SOAP, REST, …HackU 2013 – University of Dundee
We could use APIs. But there are             thousands of APIs...HackU 2013 – University of Dundee
and it’s painful to get your head                    around them!HackU 2013 – University of Dundee
What if there was one API…                      One API for everything                          on the web?HackU 2013 – Un...
One World         One Web         One API ?Can it ever exist?        Sounds like         politics!HackU 2013 – University ...
Yes it does exist!                                     YQL:                                    The API                    ...
The Yahoo Query Language, or short     YQL is a unified interface language                 to the web.                What...
Accessing the web and its services       now becomes easy as ABC SQL   select * from web        select {what} from {servic...
Let’s try a real YQL example                        I love kittens.                YQL get me 5 kitten photos      select ...
Let’s try a real YQL example              select * from        flickr.photos.search where          text="kitten" limit 5  ...
I want to use YQL and I want it now.              That’s the easy part…http://query.yahooapis.com/v1/public/yql?q=<SQL_QUE...
That’s not all… You can mix and        match several web services using                the in() commandHackU 2013 – Univer...
Mix and match…         Find photos in Dundee, UK with a         Creative Commons “By” licenseselect * from flickr.photos.i...
Now use your imagination… and                   build away!                http://isithackday.com/hacks/cantine/index.php?...
Yahoo! offers lots of data for free!flickr.photos.exif	                   local.search	              mybloglog.community.fin...
… and more of it. ALL FREE!search.images	                       search.images	                   search.images	  search.ne...
You want more data?           amazon	                     nmm	             bitly	                      nyt	             de...
Why don’t you create your own data             source for YQL…                    Using YQL’s Open TablesAll we need to do...
What else can you do with YQL?Get data of a website          select * from html where url=http://          www.telegraph.c...
Anything else? Yes...Create a View (Filtered data set)     use http://yqlblog.net/samples/searchrank.xml     as searchrank...
YQL, where to start…User guide:http://developer.yahoo.com/yqlYQL Console (Test your queries…)http://developer.yahoo.com/yq...
Upcoming SlideShare
Loading in …5
×

Dundee University HackU 2013 - YQL

370
-1

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
370
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Dundee University HackU 2013 - YQL

  1. 1. HackU 2013University of Dundee February 2013
  2. 2. The web is full of juicy andlong lasting dataHackU 2013 – University of Dundee
  3. 3. And there is a lot of it aroundHackU 2013 – University of Dundee
  4. 4. However, ourattempts to get it can sometimes be clumsyHackU 2013 – University of Dundee
  5. 5. What we need is an easy way to get to that dataHackU 2013 – University of Dundee
  6. 6. What about using APIs? Like RSS, JSON, XML, CSV, SOAP, REST, …HackU 2013 – University of Dundee
  7. 7. We could use APIs. But there are thousands of APIs...HackU 2013 – University of Dundee
  8. 8. and it’s painful to get your head around them!HackU 2013 – University of Dundee
  9. 9. What if there was one API… One API for everything on the web?HackU 2013 – University of Dundee
  10. 10. One World One Web One API ?Can it ever exist? Sounds like politics!HackU 2013 – University of Dundee
  11. 11. Yes it does exist! YQL: The API for the webHackU 2013 – University of Dundee
  12. 12. The Yahoo Query Language, or short YQL is a unified interface language to the web. What are you waiting for? http://developer.yahoo.com/yqlHackU 2013 – University of Dundee
  13. 13. Accessing the web and its services now becomes easy as ABC SQL select * from web select {what} from {service} where {condition}HackU 2013 – University of Dundee
  14. 14. Let’s try a real YQL example I love kittens. YQL get me 5 kitten photos select * fromflickr.photos.search where text="kitten" limit 5HackU 2013 – University of Dundee
  15. 15. Let’s try a real YQL example select * from flickr.photos.search where text="kitten" limit 5 Output can be XML or JSONHackU 2013 – University of Dundee
  16. 16. I want to use YQL and I want it now. That’s the easy part…http://query.yahooapis.com/v1/public/yql?q=<SQL_QUERY>&format=<FORMAT>e.g.http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22&format=json There’s also a private endpoint which uses oauth authentication http://developer.yahoo.com/yql/guide/authorization-access.htmlHackU 2013 – University of Dundee
  17. 17. That’s not all… You can mix and match several web services using the in() commandHackU 2013 – University of Dundee
  18. 18. Mix and match… Find photos in Dundee, UK with a Creative Commons “By” licenseselect * from flickr.photos.info wherephoto_id in (select id fromflickr.photos.search where woe_id in (selectwoeid from geo.places where text=’dundee,uk)and license=4)HackU 2013 – University of Dundee
  19. 19. Now use your imagination… and build away! http://isithackday.com/hacks/cantine/index.php?loc=covent+gardenHackU 2013 – University of Dundee
  20. 20. Yahoo! offers lots of data for free!flickr.photos.exif   local.search   mybloglog.community.find  flickr.photos.info   music.ar1st.id   mybloglog.member  flickr.photos.interes1ngness   music.ar1st.popular   mybloglog.member.contacts  flickr.photos.recent   music.ar1st.search   mybloglog.member.newwithcontacts  flickr.photos.search   music.ar1st.similar   mybloglog.member.newwithme  flickr.photos.sizes   music.release.ar1st   mybloglog.members.find  flickr.places   music.release.id   mybloglog.stats.find  flickr.places.info   music.release.popular   upcoming.category  geo.places   music.release.search   upcoming.country  geo.places.ancestors   music.track.id   upcoming.events  geo.places.belongtos   music.track.popular   upcoming.events.bes1nplace  geo.places.children   music.track.search   upcoming.groups  geo.places.neighbors   music.video.category   upcoming.metro  geo.places.parent   music.video.id   upcoming.state  geo.places.siblings   music.video.popular   upcoming.user  geo.placetypes   music.video.search   upcoming.venue  gnip.ac1vity   music.video.similar       HackU 2013 – University of Dundee
  21. 21. … and more of it. ALL FREE!search.images   search.images   search.images  search.news   search.news   search.news  search.siteexplorer.inlinks   search.siteexplorer.inlinks   search.siteexplorer.inlinks  search.siteexplorer.pages   search.siteexplorer.pages   search.siteexplorer.pages  search.spelling   search.spelling   search.spelling  search.suggest   search.suggest   search.suggest  search.termextract   search.termextract   search.termextract  search.web   search.web   search.web  social.connec1ons   social.connec1ons   social.connec1ons  social.contacts   social.contacts   social.contacts  social.presence   social.presence   social.presence  social.profile   social.profile   social.profile  social.updates   social.updates   social.updates  weather.forecast   weather.forecast   weather.forecast  yahoo.iden1ty   yahoo.iden1ty   yahoo.iden1ty  yap.setsmallview   yap.setsmallview   yap.setsmallview   HackU 2013 – University of Dundee
  22. 22. You want more data? amazon   nmm   bitly   nyt   delicious   opensocial   dopplr   search   etsy   shopping   friendfeed   social   github   twi@er   Greader   update.groovy   guardian   weather   imdb   wesabe   iploca1on   whitepages   las?m   yahoo   nestoria   yelp   ne?lix   zillow       http://github.com/spullara/yql-tables/tree/masterHackU 2013 – University of Dundee
  23. 23. Why don’t you create your own data source for YQL… Using YQL’s Open TablesAll we need to do is create a schema that explains the data structure. http://developer.yahoo.com/yql/guide/yql-opentables- chapter.htmlHackU 2013 – University of Dundee
  24. 24. What else can you do with YQL?Get data of a website select * from html where url=http:// www.telegraph.co.uk/ and xpath=//h3/aGet data of several websites in one query select * from rss where url in (<url1>,<url2>);HackU 2013 – University of Dundee
  25. 25. Anything else? Yes...Create a View (Filtered data set) use http://yqlblog.net/samples/searchrank.xml as searchrank; select * from searchrank where query=pizza and dispurl like %pizzahut% More about YQL Execute: http://developer.yahoo.com/yql/guide/ yql-execute-chapter.htmlHackU 2013 – University of Dundee
  26. 26. YQL, where to start…User guide:http://developer.yahoo.com/yqlYQL Console (Test your queries…)http://developer.yahoo.com/yql/console/HackU 2013 – University of Dundee
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×