HackU Barcelona 2011: YQL
-
Upload
steve-marshall -
Category
Technology
-
view
2.146 -
download
1
description
Transcript of HackU Barcelona 2011: YQL
![Page 1: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/1.jpg)
Friday, 11 February 2011
Everyone has an API these days; Google, Amazon, Twitter, Microsoft, Facebook, Yahoo, and a billion others.
All of them are different, though, so you end up having to write your own wrappers for each. and. every. one.
![Page 2: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/2.jpg)
Friday, 11 February 2011
YQL is different. YQL is the API for APIs. It turns the Internet into your database.
Want Google search results? Use YQL.Want a piece of text translated? Use YQL.Want to find a list of all the locations in a webpage? Use YQL.Want to get all the headers in a webpage? Use YQL.
YQL acts as middle-man between you and thousands of APIs (and growing). It searches, it translates, it geocodes! It would even make coffee, if you gave it an API for that.
![Page 3: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/3.jpg)
select * from internet
Friday, 11 February 2011
YQL uses a SQL-like query language, allowing you to create simple queries from one API or really easily chain queries together.
All of this, using one language, against one endpoint that gives you everything on the Internet.
But how do you test your queries? To the console!
![Page 4: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/4.jpg)
Friday, 11 February 2011
This is the console. You can enter queries here…
![Page 5: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/5.jpg)
Friday, 11 February 2011
We can do simple things like ‘Search flickr for 10 cat pictures’.
http://www.flickr.com/search/?q=cat&w=all&m=&s=
![Page 6: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/6.jpg)
Friday, 11 February 2011
By selecting from flickr.photos.search where the text is cat.
But what if we want to do something more complex?
![Page 7: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/7.jpg)
Friday, 11 February 2011
Let’s start by finding tweets about Egypt…
(select * from twitter.search where q='egypt')
![Page 8: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/8.jpg)
Friday, 11 February 2011
And now, let’s make them all Spanish…
select * from google.translate where q in (select text from twitter.search where q='egypt') and target="es";)
That’s pretty cool. What else can we do?
![Page 9: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/9.jpg)
Friday, 11 February 2011
And now, let’s wrap a UI around that…
And we have a hack!
(http://isithackday.com/hacks/twitter-translate-form.php?search=egypt&amount=20&language=es)
![Page 10: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/10.jpg)
Friday, 11 February 2011
Search Google, Bing, and Yahoo, all at once!
(select * from query.multi where queries=' select Title,Description,Url,DisplayUrl from microsoft.bing.web(20) where query="cat"; select title,clickurl,abstract,dispurl from search.web(20) where query="cat"; select titleNoFormatting,url,content,visibleUrl from google.search(20) where q="cat"')
![Page 11: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/11.jpg)
Friday, 11 February 2011
Give it a UI… that’s a hack!
(http://icant.co.uk/goohoobi/index.php?search=cat&style=)
![Page 12: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/12.jpg)
Friday, 11 February 2011
![Page 13: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/13.jpg)
Friday, 11 February 2011
Grab all the links from the CNN homepage.
(select * from html where url='http://cnn.com/' and xpath='//a')
![Page 14: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/14.jpg)
socialamazonameeanswersappdbapplearxivauthavatarsawsbasecampbatlasbbcbiblebitbizrateblackcountryhistorybostonbrazilbritishmuseumbrooklynbungiechristiescomicvinecouprecoupcraigslistdarkhelmetdeliciousdigg
digitalnzdopplrdostopsieduericssonlabsesmeetsyeyefifacebookfantasysportsfccfilemd5financefitbitflickrfolderscrapefoursquarefriendfeedgdacsgeogithubgooglegovgowallagreadergreenbookingsguardianhackernewshatenaign
imdbinfochimpsinstapaperintuitipkivalastfmlimewirestorelivedoorlocallongurlmapsmediawikiapimeetupmememendeleymicrosoftmiscmiximoviesmozillalabsmuseumoflondonmusicmybloglogmynewsdeskncbinestorianetflixneweggnextbus
ngmoconmmnmsinoaanprnytopenaustraliaopencalaisopencontextopenidopensocialpaypalpidgetspikchurplospubsubhubbubqueryrecoveryrssrtmsalesforceseafoodwatchsearchsearsseomozshelfarishippingshoppingshoppingcart
simplegeoslidesharesocialgraphsocialmentionsparqlspotifysunlighttarpipetesttextthemoviedbthetvdbtimeouttinysongtumblrtvragetwfytwitterukparliamentukpostcodeupcomingurbanesiausgsvictoriaandalbertvimeoweatherwesabewhitepageswordpress
Friday, 11 February 2011
Hundreds of APIs… all in one place. Accessible to your app…
![Page 15: HackU Barcelona 2011: YQL](https://reader033.fdocuments.in/reader033/viewer/2022060111/556533a9d8b42a313f8b496f/html5/thumbnails/15.jpg)
http://query.yahooapis.com/v1/public/yql?q=<your query here>
Friday, 11 February 2011