HACKING ONSTEROIDS WITH YQLSaurabh SahniYDN Product Guy & HackerTwitter: @saurabhsahni
Hacking togethersystems in 24 hours islot of fun.
Data manipulationHacks =           +          Data visualization
The web has lot of data around
ProgrammableWeb.Com – 6831 APIs
Yahoo! has opened   up its data
http://developer.yahoo.com/everything.html
THE TROUBLE WITH DATA •  You need to find data API •  Get Access – Signup for key •  Find data endpoint •  Read docs to le...
To make dataaccess easy on theweb, Yahoo!created YQL
YQL turns webservices and data onthe web intodatabases.
select {what} from {where}    where {conditions}
You can select, filter,sort and limit
You can even insert,update and deletefrom it.
FINDING VIDEOS ABOUT BANGALORESELECT * FROM youtube.search wherequery=bangalore
SELECTING PHOTOS OF HACKDAYSELECT * FROM flickr.photos.search wheretext="hackday” and api_key=“b5a60b2a…”
INSERTING DATAINSERT INTO bitly.shorten (login, apiKey, longUrl)VALUES (ME, API_KEY, http://yahoo.com)
UPDATING DATA UPDATE social.profile.status SET status="Using YQL UPDATE” WHERE guid="NJFIDHVPVVISDX7UKED2WHU"
RETRIEVING MY CONTACTSSELECT * FROM social.contacts WHEREguid=me
ACCESSING PRIVATE DATA        http://query.yahooapis.com/v1/yqlUses OAuth 1.0 for authorizationOAuth is complicated – use ...
You can also mix andmatch several webservices using the in()command.
select * from search.termextractwhere context in (selectdescription from rss whereurl=http://rss.news.yahoo.com/rss/topsto...
Almost all the topAPIs on web areaccessible from YQL
Some	  of	  them	  amazon                   foursquare   peerindexapple                    geo          salesforcebbc     ...
You want evenmore?
Alright, how about this?   atom           json   csv            microformats   feed           rss   html           xml
The easiest way tostart with YQL is touse the consolehttp://developer.yahoo.com/yql/console
YQL: http://developer.yahoo.com/yql/console
How to get this datain your app?
YQL is a REST APIin itself and has twoendpoints
The public endpoint does not needany authentication.http://query.yahooapis.com/v1/public/yql?q={query} &format={format}
The private endpoint needs oauthauthentication.http://query.yahooapis.com/v1/yql?q={query}&format={format}
Output formats are XMLor JSON
LET’S SEE IT
QUERY EXAMPLES                 select	  *	  from	                   yahoo.finance.quotes	                   where	  symbol	...
QUERY EXAMPLES                 select	  *	  from	                   weather.bylocaHon	  where	                   locaHon	 ...
QUERY EXAMPLESFind hackday tweets:SELECT * FROM twitter.search where q=hackday’Search Yahoo! Answers for resolved question...
QUERY EXAMPLESGet Olympic medal listselect * from html where url=http://sports.yahoo.com/olympics/medals.html and xpath=//...
QUERY EXAMPLESScrape news from Yahoo! Finance:select * from html where url="http://finance.yahoo.com/q?s=yhoo" and xpath=/...
Let’s find hackdayphotos on flickr
How about limitingto those clicked inBangalore
MAKING REQUESTS: FLICKR URLS <photo farm="3"        id="5708163920"        isfamily="0"        isfriend="0"        ispubli...
MAKING REQUESTS: FLICKR URLS Photo URL	   http://farm{$farm}.static.flickr.com/{$server}/ {$id}_{$secret}.jpg Photo Page U...
https://github.com/saurabhsahni/Hacks/
Finding Recent Photos from flickr
Some YQL Hacks
ChromYQLip is achrome extension forpage scraping via YQLOpen	  Hack	  Bangalore	  2010	  Winner	  
http://bit.ly/chromeYQL
VIDEO CLIP
http://www.webmeme.in
WEBMEME.INFetch multiple feeds in different formats like atom, RSS andtransform them into consistent RSS formatSelect * fr...
YQL is open – youcan get your datatables in our system
All you need to do iswrite an XMLschema and put iton Github.
http://github.com/yql/yql-tables
Here is the craigslistsearch tablehttps://github.com/yql/yql-tables/tree/master/craigslist/craigslist.search.xml
USE INSTANTLY BY UPLOADING ON YOURSITE  USE http://www.mysite.com/my_table.xml  AS mytable;  SELECT * FROM mytable  WHERE ...
You can even writeserver sidejavascript to build awebservice oraugment one.hLp://developer.yahoo.com/yql/guide/yql-­‐execu...
There are lot ofthings you can dowith YQL.
Play yourselfhttp://developer.yahoo.com/yql/
One more thing
RESOURCESAll Yahoo! APIs and Serviceshttp://developer.yahoo.com/everything.htmlYQL Documentationhttp://developer.yahoo.com...
THANKS!http://www.slideshare.net/saurabhsahni Saurabh Sahni Twitter: @saurabhsahni Github: http://github.com/saurabhsahni ...
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
Upcoming SlideShare
Loading in …5
×

YQL: Hacking on steroids - Yahoo! Open Hack Day 2012

4,922 views

Published on

Introduction and tips and tricks to use YQL.

Published in: Technology, Design
3 Comments
6 Likes
Statistics
Notes
  • Free Download : http://gg.gg/114bb

    Hey Guyz and girls, Today I am gonna show you perfact tool, Remember This video is old, But the download link with hack is brand new. Its very simple to using this tool and here are some instructions in video. Please REDOWNLOAD. Don't Forget to Comment Subscribe & Rate My Video :)

    Virus Scan :- This file has been scanned with avast! Antivirus. -- Status: FILE IS CLEANN.

    Copyright © 2014. All Rights Reserved
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • @timir126 That's a community table. Click on 'Show community tables' in YQL console and you will see this table
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice presentation.
    But No definition found for Table yahoo.finance.quotes

    http://developer.yahoo.com/forum/YQL/No-definition-found-for-Table-yahoo-finance-quotes/1252596855000-919237d4-ef6d-397c-97d9-68a7f6336f02
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
4,922
On SlideShare
0
From Embeds
0
Number of Embeds
23
Actions
Shares
0
Downloads
41
Comments
3
Likes
6
Embeds 0
No embeds

No notes for slide

YQL: Hacking on steroids - Yahoo! Open Hack Day 2012

  1. HACKING ONSTEROIDS WITH YQLSaurabh SahniYDN Product Guy & HackerTwitter: @saurabhsahni
  2. Hacking togethersystems in 24 hours islot of fun.
  3. Data manipulationHacks = + Data visualization
  4. The web has lot of data around
  5. ProgrammableWeb.Com – 6831 APIs
  6. Yahoo! has opened up its data
  7. http://developer.yahoo.com/everything.html
  8. THE TROUBLE WITH DATA •  You need to find data API •  Get Access – Signup for key •  Find data endpoint •  Read docs to learn what parameters you have •  Get data in obscure format •  Use data after converting and filtering •  More APIs you use, more is your annoyance
  9. To make dataaccess easy on theweb, Yahoo!created YQL
  10. YQL turns webservices and data onthe web intodatabases.
  11. select {what} from {where} where {conditions}
  12. You can select, filter,sort and limit
  13. You can even insert,update and deletefrom it.
  14. FINDING VIDEOS ABOUT BANGALORESELECT * FROM youtube.search wherequery=bangalore
  15. SELECTING PHOTOS OF HACKDAYSELECT * FROM flickr.photos.search wheretext="hackday” and api_key=“b5a60b2a…”
  16. INSERTING DATAINSERT INTO bitly.shorten (login, apiKey, longUrl)VALUES (ME, API_KEY, http://yahoo.com)
  17. UPDATING DATA UPDATE social.profile.status SET status="Using YQL UPDATE” WHERE guid="NJFIDHVPVVISDX7UKED2WHU"
  18. RETRIEVING MY CONTACTSSELECT * FROM social.contacts WHEREguid=me
  19. ACCESSING PRIVATE DATA http://query.yahooapis.com/v1/yqlUses OAuth 1.0 for authorizationOAuth is complicated – use one of our SDKs athttps://github.com/yahoo
  20. You can also mix andmatch several webservices using the in()command.
  21. select * from search.termextractwhere context in (selectdescription from rss whereurl=http://rss.news.yahoo.com/rss/topstories)
  22. Almost all the topAPIs on web areaccessible from YQL
  23. Some  of  them  amazon foursquare peerindexapple geo salesforcebbc github slidesharebible google themovidebboss hackernews tumblrcampfire ign twittercontentanalysis intuit vimeocraigslist kiva weatherdelicious klout yahoodopplr lastfm youtubeetsy netflix zillowfacebook paypal
  24. You want evenmore?
  25. Alright, how about this? atom json csv microformats feed rss html xml
  26. The easiest way tostart with YQL is touse the consolehttp://developer.yahoo.com/yql/console
  27. YQL: http://developer.yahoo.com/yql/console
  28. How to get this datain your app?
  29. YQL is a REST APIin itself and has twoendpoints
  30. The public endpoint does not needany authentication.http://query.yahooapis.com/v1/public/yql?q={query} &format={format}
  31. The private endpoint needs oauthauthentication.http://query.yahooapis.com/v1/yql?q={query}&format={format}
  32. Output formats are XMLor JSON
  33. LET’S SEE IT
  34. QUERY EXAMPLES select  *  from   yahoo.finance.quotes   where  symbol  in   ("^IXIC","^DJI","YHOO ","AAPL")  
  35. QUERY EXAMPLES select  *  from   weather.bylocaHon  where   locaHon  in  ("bangalore,  in",   ”new  york,  us")  
  36. QUERY EXAMPLESFind hackday tweets:SELECT * FROM twitter.search where q=hackday’Search Yahoo! Answers for resolved questions about cars:select * from answers.search where query="cars" and type="resolved”Find distance between Bangalore and Mumbai:select * from geo.distance where place1="bangalore" andplace2="mumbai”Extract important terms from top stories on Yahoo! news:select * from search.termextract where context in (select descriptionfrom rss where url=http://rss.news.yahoo.com/rss/topstories)
  37. QUERY EXAMPLESGet Olympic medal listselect * from html where url=http://sports.yahoo.com/olympics/medals.html and xpath=//*[@id=mediasportsoverallmedalcount]/div[2]/table/tbody/tr/td/aShorten a URL:insert into yahoo.y.ahoo.it (url, keysize) values (http://www.javarants.com, 5)Search apartments in criagslist:select * from craigslist.search where location="bangalore" andtype="apa" and query="indiranagar”
  38. QUERY EXAMPLESScrape news from Yahoo! Finance:select * from html where url="http://finance.yahoo.com/q?s=yhoo" and xpath=//div[@id="yfi_headlines"]/div[2]/ul/li/a’Select, filter data from google spreadsheets:select * from csv where url="https://spreadsheets.google.com/pub?key=0ArYndzim-lbrdF8wc3A5QWl1ZGRpdkxRZk80SU9zUXc&output=csv"and col5 like Bangalore%’ ;
  39. Let’s find hackdayphotos on flickr
  40. How about limitingto those clicked inBangalore
  41. MAKING REQUESTS: FLICKR URLS <photo farm="3" id="5708163920" isfamily="0" isfriend="0" ispublic="1" owner="31832337@N04" secret="0075137487" server="2496" title="San Francisco"/>
  42. MAKING REQUESTS: FLICKR URLS Photo URL   http://farm{$farm}.static.flickr.com/{$server}/ {$id}_{$secret}.jpg Photo Page URL   http://www.flickr.com/photos/{$owner}/{$id} Photo Owner Profile URL   http://www.flickr.com/photos/{$owner}
  43. https://github.com/saurabhsahni/Hacks/
  44. Finding Recent Photos from flickr
  45. Some YQL Hacks
  46. ChromYQLip is achrome extension forpage scraping via YQLOpen  Hack  Bangalore  2010  Winner  
  47. http://bit.ly/chromeYQL
  48. VIDEO CLIP
  49. http://www.webmeme.in
  50. WEBMEME.INFetch multiple feeds in different formats like atom, RSS andtransform them into consistent RSS formatSelect * from rss where url in (‘http://feeds.feedburner.com/pluggd’,‘http://quatrainman.blogspot.com/atom.xml’, ‘…’)Filter news containing “india” from multiple feeds:select * from rss where url in (http://feeds.feedburner.com/TechCrunch, http://www.readwriteweb.com/rss.xml,http://gigaom.com/feed/) and description like %india%’
  51. YQL is open – youcan get your datatables in our system
  52. All you need to do iswrite an XMLschema and put iton Github.
  53. http://github.com/yql/yql-tables
  54. Here is the craigslistsearch tablehttps://github.com/yql/yql-tables/tree/master/craigslist/craigslist.search.xml
  55. USE INSTANTLY BY UPLOADING ON YOURSITE USE http://www.mysite.com/my_table.xml AS mytable; SELECT * FROM mytable WHERE user=saurabh
  56. You can even writeserver sidejavascript to build awebservice oraugment one.hLp://developer.yahoo.com/yql/guide/yql-­‐execute-­‐chapter.html  
  57. There are lot ofthings you can dowith YQL.
  58. Play yourselfhttp://developer.yahoo.com/yql/
  59. One more thing
  60. RESOURCESAll Yahoo! APIs and Serviceshttp://developer.yahoo.com/everything.htmlYQL Documentationhttp://developer.yahoo.com/yqlYQL Consolehttp://developer.yahoo.com/yql/consoleYQL Github Account (Contribute Tables)http://github.com/yql/yql-tables
  61. THANKS!http://www.slideshare.net/saurabhsahni Saurabh Sahni Twitter: @saurabhsahni Github: http://github.com/saurabhsahni Web: http://www.saurabhsahni.com

×