Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all
-
Upload
yahoo-developer-network -
Category
Technology
-
view
103 -
download
0
description
Transcript of Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all
![Page 1: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/1.jpg)
![Page 2: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/2.jpg)
YQL One API to query them all Sumeet Mulani [Technical Yahoo!] @teemus
![Page 3: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/3.jpg)
3
#yhackhyderabad2013
![Page 4: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/4.jpg)
data manipulation hacks = + data visualisation
4
![Page 5: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/5.jpg)
The internet is data-heavy!
5
<h#ps://www.flickr.com/photos/nadircruise/8593208924/>
![Page 6: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/6.jpg)
ProgrammableWeb.com – 9504 APIs
6
![Page 7: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/7.jpg)
The problems with APIs… • Discovery (Endpoints,
capabilities, etc.) • Access (API keys, secrets,
etc.) • RTFM (A pain when you
are in hack mode!) • Data massaging
(Conversion, filtering, etc.) • The more, the merrier,
NOT
7
<h#p://en.wikipedia.org/wiki/File:The_Scream.jpg>
![Page 8: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/8.jpg)
YQL #FTW
8
Make data access easy for the web!
![Page 9: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/9.jpg)
9
YQL turns web services and data on the internet into databases.
SQL-like syntax SELECT {what} FROM {where} WHERE {conditions}
![Page 10: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/10.jpg)
10
Select Filter Sort Limit Insert Update Delete
<h#ps://www.flickr.com/photos/capcase/4970062156/>
![Page 11: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/11.jpg)
11
http://developer.yahoo.com/yql/console
![Page 12: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/12.jpg)
12
![Page 13: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/13.jpg)
Finding videos on YouTube…
SELECT * FROM youtube.search WHERE query="russell peters"
13
![Page 14: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/14.jpg)
14
Stock quotes, anyone?
SELECT * FROM yahoo.finance.quotes WHERE symbol IN ("YHOO", "AAPL", "GOOG", "AMZN”, “FB”);
![Page 15: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/15.jpg)
15
Search craigslist…
SELECT * FROM craigslist.search WHERE location="sfbay” AND type="sss” AND query="dj mixer"
![Page 16: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/16.jpg)
16
One-line URL shortener…
INSERT INTO yahoo.y.ahoo.it (url, keysize) VALUES ('http://9to5mac.com/', 5)
![Page 17: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/17.jpg)
17
Retrieve my Yahoo! contacts
SELECT * FROM social.contacts WHERE guid=me
![Page 18: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/18.jpg)
Accessing private data • Use the endpoint
http://query.yahooapis.com/v1/yql • Requires OAuth for authentication
http://developer.yahoo.com/oauth/guide/index.html
• Use one of our SDKs –
https://github.com/yahoo
18
![Page 19: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/19.jpg)
19
1000+ APIs
![Page 20: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/20.jpg)
How do I get data from YQL into hacks?
20
• YQL is a REST API in itself and has two endpoints
• Public endpoint requires no authentication: http://query.yahooapis.com/v1/public/yql?q=query&format=format
• The private endpoint requires OAuth credentials: http://query.yahooapis.com/v1/yql?q=query&format=format
• Supported output formats: JSON, XML • Use your favourite programming language!
![Page 21: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/21.jpg)
YQL is open!
21
• You can get your data tables into our system!
• Just write an XML schema and put it on GitHub - https://github.com/yql/yql-tables
• Example: craigslist search table - https://github.com/yql/yql-tables/blob/master/craigslist/craigslist.search.xml
![Page 22: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/22.jpg)
22
Or, host your own table and use ‘USE’!
USE ‘http://www.mysite.com/myTable.xml’ as mytable; SELECT * FROM mytable WHERE key=“value”;
<h#ps://www.flickr.com/photos/weldhouse/3083969633/>
![Page 23: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/23.jpg)
23
There are a lot of things you can do with YQL. Your imagination is the limit.
![Page 24: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/24.jpg)
Amazing YQL-powered hacks • Webmeme.In – http://www.webmeme.in/
§ Indian news aggregator • ChromeYQLip – http://y.ahoo.it/bVSq9
§ A Chrome extension for page scraping using YQL § Open Hack Bangalore 2010 winner
• FakeSiri – http://y.ahoo.it/3D05u § Voice assistant for Chrome
24
![Page 25: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/25.jpg)
25
YQL Console and hack demos
![Page 26: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/26.jpg)
Wake up. It’s over. (Get coffee. Prepare to hack!) <http://developer.yahoo.com/yql/>
26
![Page 27: Yahoo! Hack India: Hyderabad 2013 | YQL - One API to query them all](https://reader034.fdocuments.us/reader034/viewer/2022051612/54c644974a79599b3a8b4571/html5/thumbnails/27.jpg)
27
Thank you! @teemus