YQL (Yahoo Query Language) allows users to query data from web services and on the internet using SQL-like syntax. It provides a standardized way to access over 1000 APIs without having to deal with authentication or data formatting issues. Developers can also expose their own data through custom XML schemas hosted on GitHub or their own servers for others to query through YQL. Examples are given showing how to retrieve data from YouTube, stock quotes, Craigslist, and Yahoo services like contacts using YQL queries.
7. 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>
18. 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
20. 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!
21. 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
22. 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/>
23. 23
There are a lot of things you
can do with YQL.
Your imagination is the limit.
24. 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