YQL
One API to query them all
Sumeet Mulani
[Technical Yahoo!]
@teemus
3
#yhackhyderabad2013
data manipulation
hacks = +
data visualisation
4
The internet is data-heavy!
5
<h#ps://www.flickr.com/photos/nadircruise/8593208924/>	
  
ProgrammableWeb.com – 9504 APIs
6
The problems with APIs…
•  Discovery (Endpoints,
capabilities, etc.)
•  Access (API keys, secrets,
etc.)
•  RTFM (A pain w...
YQL #FTW
8
Make data access easy for the web!
9
YQL turns web services and data on
the internet into databases.
SQL-like syntax
SELECT {what}
FROM {where}
WHERE {condit...
10
Select
Filter
Sort
Limit
Insert
Update
Delete
<h#ps://www.flickr.com/photos/capcase/4970062156/>	
  
11
http://developer.yahoo.com/yql/console
12
Finding videos on YouTube…
SELECT *
FROM youtube.search
WHERE query="russell peters"
13
14
Stock quotes, anyone?
SELECT *
FROM yahoo.finance.quotes
WHERE symbol
IN ("YHOO", "AAPL", "GOOG",
"AMZN”, “FB”);
15
Search craigslist…
SELECT *
FROM craigslist.search
WHERE location="sfbay”
AND type="sss”
AND query="dj mixer"
16
One-line URL shortener…
INSERT INTO
yahoo.y.ahoo.it (url, keysize)
VALUES
('http://9to5mac.com/', 5)
17
Retrieve my Yahoo! contacts
SELECT *
FROM social.contacts
WHERE guid=me
Accessing private data
•  Use the endpoint
http://query.yahooapis.com/v1/yql
•  Requires OAuth for authentication
http://d...
19
1000+ APIs
How do I get data from YQL into hacks?
20
•  YQL is a REST API in itself and has two
endpoints
•  Public endpoint requires...
YQL is open!
21
•  You can get your data tables into our system!
•  Just write an XML schema and put it on GitHub -
https:...
22
Or, host your own table and use ‘USE’!
USE ‘http://www.mysite.com/
myTable.xml’ as mytable;
SELECT * FROM mytable
WHERE...
23
There are a lot of things you
can do with YQL.
Your imagination is the limit.
Amazing YQL-powered hacks
•  Webmeme.In – http://www.webmeme.in/
§  Indian news aggregator
•  ChromeYQLip – http://y.ahoo...
25
YQL Console and hack demos
Wake up. It’s over.
(Get coffee. Prepare to hack!)
<http://developer.yahoo.com/yql/>
26
27
Thank you!
@teemus
YQL - One API to query them all
Upcoming SlideShare
Loading in …5
×

YQL - One API to query them all

1,390 views
1,255 views

Published on

Talk on an introduction to YQL presented at Yahoo! Hack 2013 India in Hyderabad, on 13th July 2013.

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

  • Be the first to like this

No Downloads
Views
Total views
1,390
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

YQL - One API to query them all

  1. 1. YQL One API to query them all Sumeet Mulani [Technical Yahoo!] @teemus
  2. 2. 3 #yhackhyderabad2013
  3. 3. data manipulation hacks = + data visualisation 4
  4. 4. The internet is data-heavy! 5 <h#ps://www.flickr.com/photos/nadircruise/8593208924/>  
  5. 5. ProgrammableWeb.com – 9504 APIs 6
  6. 6. 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>  
  7. 7. YQL #FTW 8 Make data access easy for the web!
  8. 8. 9 YQL turns web services and data on the internet into databases. SQL-like syntax SELECT {what} FROM {where} WHERE {conditions}
  9. 9. 10 Select Filter Sort Limit Insert Update Delete <h#ps://www.flickr.com/photos/capcase/4970062156/>  
  10. 10. 11 http://developer.yahoo.com/yql/console
  11. 11. 12
  12. 12. Finding videos on YouTube… SELECT * FROM youtube.search WHERE query="russell peters" 13
  13. 13. 14 Stock quotes, anyone? SELECT * FROM yahoo.finance.quotes WHERE symbol IN ("YHOO", "AAPL", "GOOG", "AMZN”, “FB”);
  14. 14. 15 Search craigslist… SELECT * FROM craigslist.search WHERE location="sfbay” AND type="sss” AND query="dj mixer"
  15. 15. 16 One-line URL shortener… INSERT INTO yahoo.y.ahoo.it (url, keysize) VALUES ('http://9to5mac.com/', 5)
  16. 16. 17 Retrieve my Yahoo! contacts SELECT * FROM social.contacts WHERE guid=me
  17. 17. 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
  18. 18. 19 1000+ APIs
  19. 19. 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!
  20. 20. 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
  21. 21. 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/>  
  22. 22. 23 There are a lot of things you can do with YQL. Your imagination is the limit.
  23. 23. 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
  24. 24. 25 YQL Console and hack demos
  25. 25. Wake up. It’s over. (Get coffee. Prepare to hack!) <http://developer.yahoo.com/yql/> 26
  26. 26. 27 Thank you! @teemus

×