SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Downloaden Sie, um offline zu lesen
Hacking on steroids
          with YQL
Anshu	
  Prateek	
  
Search/YDN	
  
@anshprat	
  
Hacking together
systems in 24 hours is
lot of fun.
Data manipulation
Hacks =           +
          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 learn what parameters you
     have
  •  Get data in obscure format
  •  Use data after converting and filtering
  •  More APIs you use, more is your
     annoyance
To make data access
  easy on the web,
Yahoo! created YQL
YQL turns web
services and data on
    the web into
     databases.
select {what} from {where}
    where {conditions}
You can select, filter,
   sort and limit
You can even insert,
update and delete from
          it.
Finding	
  Videos	
  about	
  Bangalore	
  


•  SELECT	
  *	
  FROM	
  youtube.search	
  where	
  
   query='bangalore'	
  
Selec@ng	
  Photos	
  of	
  HackdaY	
  


•  SELECT	
  *	
  FROM	
  flickr.photos.search	
  where	
  	
  
   text="hackday”	
  and	
  api_key=“b5a60b2a…”	
  
Inser@ng	
  data	
  


•  INSERT	
  INTO	
  bitly.shorten	
  (login,	
  apiKey,	
  
   longUrl)	
  
•  	
  	
  
•  VALUES	
  ('ME',	
  'API_KEY',	
  'hYp://yahoo.com')	
  	
  
upda@ng	
  data	
  


•  UPDATE	
  social.profile.status	
  	
  


•  SET	
  status="Using	
  YQL	
  UPDATE”	
  	
  


•  WHERE	
  guid="NJFIDHVPVVISDX7UKED2WHU"	
  
Retrieving	
  my	
  Contacts	
  


•  SELECT	
  *	
  FROM	
  social.contacts	
  WHERE	
  
   guid=me	
  
Accessing	
  Private	
  Data	
  
      •  hYp://query.yahooapis.com/v1/yql	
  
   	
  
Uses OAuth 1.0 for authorization

OAuth is complicated – use one of our SDKs at
https://github.com/yahoo
You can also mix and
 match several web
services using the in()
      command.
select * from search.termextract
where context in (select description
     from rss where url='http://
rss.news.yahoo.com/rss/topstories')
Almost all the top
 APIs on web are
accessible from YQL
1255 APIs
Some	
  of	
  them	
  
     amazon              foursquare   peerindex
      apple              geo          salesforce
       bbc               github       slideshare
       bible             google       themovideb
       boss              hackernews   tumblr
    campfire             ign          twitter
 contentanalysis         intuit       vimeo
    craigslist           kiva         weather
    delicious            klout        yahoo
      dopplr             lastfm       youtube
       etsy              netflix      zillow
    facebook             paypal
You want even more?
Alright, how about this?


           atom   json
            csv   microformats
           feed   rss
           html   xml
The easiest way to start
 with YQL is to use the
        console
http://developer.yahoo.com/yql/console
YQL: http://developer.yahoo.com/yql/console
How to get this data in
     your app?
YQL is a REST API in
 itself and has two
      endpoints
The public endpoint does not need any
             authentication.

http://query.yahooapis.com/v1/public/yql?
        q={query} &format={format}
The private endpoint needs oauth
         authentication.

http://query.yahooapis.com/v1/yql?
    q={query}&format={format}
Output formats are XML
       or JSON
Let’s	
  See	
  It	
  
Query	
  Examples	
  

          select	
  *	
  from	
  
          yahoo.finance.quotes	
  
          where	
  symbol	
  in	
  
          ("^IXIC","^DJI","YHOO
          ","AAPL")	
  
Query	
  Examples	
  
         select	
  *	
  from	
  
         weather.byloca@on	
  where	
  
         loca@on	
  in	
  ("bangalore,	
  in",	
  
         ”new	
  york,	
  us")	
  
• 
                            Query	
  Examples	
  
    Find	
  hackday	
  tweets:	
  
•  SELECT	
  *	
  FROM	
  twi]er.search	
  where	
  q='hackday’	
  

•  Search	
  Yahoo!	
  Answers	
  for	
  resolved	
  ques@ons	
  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"	
  and	
  
   place2="mumbai”	
  

•  Extract	
  important	
  terms	
  from	
  top	
  stories	
  on	
  Yahoo!	
  news:	
  
•  select	
  *	
  from	
  search.termextract	
  where	
  context	
  in	
  (select	
  descrip@on	
  
   from	
  rss	
  where	
  url='h]p://rss.news.yahoo.com/rss/topstories')	
  
Query	
  Examples	
  
•  Get	
  Olympic	
  medal	
  list	
  
•  select	
  *	
  from	
  html	
  where	
  url='h]p://sports.yahoo.com/olympics/
   medals.html'	
  and	
  xpath='//*[@id='mediasportsoverallmedalcount']/
   div[2]/table/tbody/tr/td/a'	
  

•  Shorten	
  a	
  URL:	
  
•  insert	
  into	
  yahoo.y.ahoo.it	
  (url,	
  keysize)	
  values	
  ('h]p://
   www.javarants.com',	
  5)	
  

•  Search	
  apartments	
  in	
  criagslist:	
  
•  select	
  *	
  from	
  craigslist.search	
  where	
  loca@on="bangalore"	
  and	
  
   type="apa"	
  and	
  query="indiranagar”	
  
Query	
  Examples	
  
•  Scrape	
  news	
  from	
  Yahoo!	
  Finance:	
  
•  select	
  *	
  from	
  html	
  where	
  url="h]p://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="h]ps://
   spreadsheets.google.com/pub?key=0ArYndzim-­‐
   lbrdF8wc3A5QWl1ZGRpdkxRZk80SU9zUXc&output=csv"	
  and	
  
   col5	
  like	
  'Bangalore%’	
  ;	
  
There are lot of things
you can do with YQL.
Play yourself
         http://
developer.yahoo.com/yql/
One more thing
Don’t look for features.
Solve one problem
Resources	
  
•  All	
  Yahoo!	
  APIs	
  and	
  Services	
  
•  hYp://developer.yahoo.com/everything.html	
  	
  

•  YQL	
  Documentahon	
  
•  hYp://developer.yahoo.com/yql	
  	
  	
  

•  YQL	
  Console	
  
•  hYp://developer.yahoo.com/yql/console	
  	
  

•  YQL	
  Github	
  Account	
  (Contribute	
  Tables)	
  
Thanks!	
  
http://www.slideshare.net/
anshprat




 Anshu Prateek

 Twitter: @anshprat
 Github: http://github.com/anshprat
 Web: http://hackalyst.info
Yql hacku iitd_2012
Yql hacku iitd_2012
Yql hacku iitd_2012
Yql hacku iitd_2012
Yql hacku iitd_2012

Weitere ähnliche Inhalte

Was ist angesagt?

BOSS around the web
BOSS around the webBOSS around the web
BOSS around the webJai Santhosh
 
Cheap tricks for startups
Cheap tricks for startupsCheap tricks for startups
Cheap tricks for startupsSimon Willison
 
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! SocialOpen Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! SocialSaurabh Sahni
 
Web Scraping In Ruby Utosc 2009.Key
Web Scraping In Ruby Utosc 2009.KeyWeb Scraping In Ruby Utosc 2009.Key
Web Scraping In Ruby Utosc 2009.Keyjtzemp
 
Place not Space; Geo without Maps
Place not Space; Geo without MapsPlace not Space; Geo without Maps
Place not Space; Geo without MapsGary Gale
 
YQL:: Select * from Internet
YQL:: Select * from InternetYQL:: Select * from Internet
YQL:: Select * from Internetdrgath
 
Mobile Web App Development (Building your API)
Mobile Web App Development (Building your API)Mobile Web App Development (Building your API)
Mobile Web App Development (Building your API)Syd Lawrence
 
Hack u iitb_social
Hack u iitb_socialHack u iitb_social
Hack u iitb_socialRajesh Kumar
 
Getting Information off the Internet
Getting Information off the InternetGetting Information off the Internet
Getting Information off the InternetNick Rate
 
Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013
Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013
Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013Ruth Cheesley
 

Was ist angesagt? (12)

BOSS around the web
BOSS around the webBOSS around the web
BOSS around the web
 
Cheap tricks for startups
Cheap tricks for startupsCheap tricks for startups
Cheap tricks for startups
 
Open Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! SocialOpen Hack Day Bangalore: Hacking Yahoo! Social
Open Hack Day Bangalore: Hacking Yahoo! Social
 
Find,Mix And Show
Find,Mix And ShowFind,Mix And Show
Find,Mix And Show
 
Web Scraping In Ruby Utosc 2009.Key
Web Scraping In Ruby Utosc 2009.KeyWeb Scraping In Ruby Utosc 2009.Key
Web Scraping In Ruby Utosc 2009.Key
 
Place not Space; Geo without Maps
Place not Space; Geo without MapsPlace not Space; Geo without Maps
Place not Space; Geo without Maps
 
YQL:: Select * from Internet
YQL:: Select * from InternetYQL:: Select * from Internet
YQL:: Select * from Internet
 
Educator as a Maker Educator
Educator as a Maker EducatorEducator as a Maker Educator
Educator as a Maker Educator
 
Mobile Web App Development (Building your API)
Mobile Web App Development (Building your API)Mobile Web App Development (Building your API)
Mobile Web App Development (Building your API)
 
Hack u iitb_social
Hack u iitb_socialHack u iitb_social
Hack u iitb_social
 
Getting Information off the Internet
Getting Information off the InternetGetting Information off the Internet
Getting Information off the Internet
 
Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013
Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013
Microdata, Rich Snippets and Google Authorship with Joomla - JoomlaDagen 2013
 

Andere mochten auch

Openstack - getting it all up magically - and when the magic fails.
Openstack - getting it all up magically - and when the magic fails.Openstack - getting it all up magically - and when the magic fails.
Openstack - getting it all up magically - and when the magic fails.Anshu Prateek
 
M-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immr
M-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immrM-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immr
M-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immrPhil Hendrix
 
Drive Revenue and Loyalty by Engaging Mobile and Social Consumers
Drive Revenue and Loyalty by Engaging Mobile and Social ConsumersDrive Revenue and Loyalty by Engaging Mobile and Social Consumers
Drive Revenue and Loyalty by Engaging Mobile and Social ConsumersPhil Hendrix
 
Tablet Market Outlook - April 2011 - Dr. Phil Hendrix, immr
Tablet Market Outlook - April 2011 - Dr. Phil Hendrix, immrTablet Market Outlook - April 2011 - Dr. Phil Hendrix, immr
Tablet Market Outlook - April 2011 - Dr. Phil Hendrix, immrPhil Hendrix
 
Scaling up with Aerospike!
Scaling up with Aerospike!Scaling up with Aerospike!
Scaling up with Aerospike!Anshu Prateek
 
what/why/how of IPv6 || 2002:3239:43c3::1
what/why/how of IPv6 || 2002:3239:43c3::1what/why/how of IPv6 || 2002:3239:43c3::1
what/why/how of IPv6 || 2002:3239:43c3::1Anshu Prateek
 
AS Week 6 Observational Research
AS Week 6 Observational ResearchAS Week 6 Observational Research
AS Week 6 Observational ResearchJamie Davies
 

Andere mochten auch (8)

Openstack - getting it all up magically - and when the magic fails.
Openstack - getting it all up magically - and when the magic fails.Openstack - getting it all up magically - and when the magic fails.
Openstack - getting it all up magically - and when the magic fails.
 
M-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immr
M-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immrM-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immr
M-Commerce - Social-Loco Slides - Dr. Phil Hendrix, immr
 
Drive Revenue and Loyalty by Engaging Mobile and Social Consumers
Drive Revenue and Loyalty by Engaging Mobile and Social ConsumersDrive Revenue and Loyalty by Engaging Mobile and Social Consumers
Drive Revenue and Loyalty by Engaging Mobile and Social Consumers
 
Tablet Market Outlook - April 2011 - Dr. Phil Hendrix, immr
Tablet Market Outlook - April 2011 - Dr. Phil Hendrix, immrTablet Market Outlook - April 2011 - Dr. Phil Hendrix, immr
Tablet Market Outlook - April 2011 - Dr. Phil Hendrix, immr
 
20 Shades of Blue
20 Shades of Blue20 Shades of Blue
20 Shades of Blue
 
Scaling up with Aerospike!
Scaling up with Aerospike!Scaling up with Aerospike!
Scaling up with Aerospike!
 
what/why/how of IPv6 || 2002:3239:43c3::1
what/why/how of IPv6 || 2002:3239:43c3::1what/why/how of IPv6 || 2002:3239:43c3::1
what/why/how of IPv6 || 2002:3239:43c3::1
 
AS Week 6 Observational Research
AS Week 6 Observational ResearchAS Week 6 Observational Research
AS Week 6 Observational Research
 

Ähnlich wie Yql hacku iitd_2012

YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012Saurabh Sahni
 
YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011Saurabh Sahni
 
YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기Jinho Jung
 
YQL: Select * from Internet
YQL: Select * from InternetYQL: Select * from Internet
YQL: Select * from Internetdrgath
 
Lessons Learned - Building YDN
Lessons Learned - Building YDNLessons Learned - Building YDN
Lessons Learned - Building YDNDan Theurer
 
Boss hack u-iit-madras-2012
Boss hack u-iit-madras-2012Boss hack u-iit-madras-2012
Boss hack u-iit-madras-2012discoversudhir
 
YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mixmarkandey
 
YQL and Geo
YQL and GeoYQL and Geo
YQL and Geomambo91
 
Building web applications using the web.
Building web applications using the web.Building web applications using the web.
Building web applications using the web.Christian Heilmann
 
CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016 CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016 Karthik Padmanabhan
 
Select * from internet
Select * from internetSelect * from internet
Select * from internetmarkandey
 
Open Hack NYC Yahoo Social SDKs
Open Hack NYC Yahoo Social SDKsOpen Hack NYC Yahoo Social SDKs
Open Hack NYC Yahoo Social SDKsDustin Whittle
 
Open Hack London - Introduction to YQL
Open Hack London - Introduction to YQLOpen Hack London - Introduction to YQL
Open Hack London - Introduction to YQLChristian Heilmann
 
Query the web with YQL
Query the web with YQLQuery the web with YQL
Query the web with YQLramace
 
Building Things Fast - and getting approval
Building Things Fast - and getting approvalBuilding Things Fast - and getting approval
Building Things Fast - and getting approvalSimon Willison
 
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011traactivity
 
My first-crawler-in-python
My first-crawler-in-pythonMy first-crawler-in-python
My first-crawler-in-pythonViller Hsiao
 

Ähnlich wie Yql hacku iitd_2012 (20)

YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
 
YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011
 
YQL & Yahoo! Apis
YQL & Yahoo! ApisYQL & Yahoo! Apis
YQL & Yahoo! Apis
 
YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기
 
YQL: Select * from Internet
YQL: Select * from InternetYQL: Select * from Internet
YQL: Select * from Internet
 
Lessons Learned - Building YDN
Lessons Learned - Building YDNLessons Learned - Building YDN
Lessons Learned - Building YDN
 
Boss hack u-iit-madras-2012
Boss hack u-iit-madras-2012Boss hack u-iit-madras-2012
Boss hack u-iit-madras-2012
 
Web services and JavaScript
Web services and JavaScriptWeb services and JavaScript
Web services and JavaScript
 
YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mix
 
YQL and Geo
YQL and GeoYQL and Geo
YQL and Geo
 
Building web applications using the web.
Building web applications using the web.Building web applications using the web.
Building web applications using the web.
 
CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016 CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016
 
Select * from internet
Select * from internetSelect * from internet
Select * from internet
 
Open Hack NYC Yahoo Social SDKs
Open Hack NYC Yahoo Social SDKsOpen Hack NYC Yahoo Social SDKs
Open Hack NYC Yahoo Social SDKs
 
Open Hack London - Introduction to YQL
Open Hack London - Introduction to YQLOpen Hack London - Introduction to YQL
Open Hack London - Introduction to YQL
 
Query the web with YQL
Query the web with YQLQuery the web with YQL
Query the web with YQL
 
SEA Open Hack - YQL
SEA Open Hack - YQLSEA Open Hack - YQL
SEA Open Hack - YQL
 
Building Things Fast - and getting approval
Building Things Fast - and getting approvalBuilding Things Fast - and getting approval
Building Things Fast - and getting approval
 
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
 
My first-crawler-in-python
My first-crawler-in-pythonMy first-crawler-in-python
My first-crawler-in-python
 

Kürzlich hochgeladen

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Kürzlich hochgeladen (20)

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

Yql hacku iitd_2012

  • 1. Hacking on steroids with YQL Anshu  Prateek   Search/YDN   @anshprat  
  • 2.
  • 3. Hacking together systems in 24 hours is lot of fun.
  • 4. Data manipulation Hacks = + Data visualization
  • 5. The web has lot of data around
  • 7. Yahoo! has opened up its data
  • 9. 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
  • 10. To make data access easy on the web, Yahoo! created YQL
  • 11. YQL turns web services and data on the web into databases.
  • 12. select {what} from {where} where {conditions}
  • 13. You can select, filter, sort and limit
  • 14. You can even insert, update and delete from it.
  • 15. Finding  Videos  about  Bangalore   •  SELECT  *  FROM  youtube.search  where   query='bangalore'  
  • 16. Selec@ng  Photos  of  HackdaY   •  SELECT  *  FROM  flickr.photos.search  where     text="hackday”  and  api_key=“b5a60b2a…”  
  • 17. Inser@ng  data   •  INSERT  INTO  bitly.shorten  (login,  apiKey,   longUrl)   •      •  VALUES  ('ME',  'API_KEY',  'hYp://yahoo.com')    
  • 18. upda@ng  data   •  UPDATE  social.profile.status     •  SET  status="Using  YQL  UPDATE”     •  WHERE  guid="NJFIDHVPVVISDX7UKED2WHU"  
  • 19. Retrieving  my  Contacts   •  SELECT  *  FROM  social.contacts  WHERE   guid=me  
  • 20. Accessing  Private  Data   •  hYp://query.yahooapis.com/v1/yql     Uses OAuth 1.0 for authorization OAuth is complicated – use one of our SDKs at https://github.com/yahoo
  • 21. You can also mix and match several web services using the in() command.
  • 22. select * from search.termextract where context in (select description from rss where url='http:// rss.news.yahoo.com/rss/topstories')
  • 23. Almost all the top APIs on web are accessible from YQL
  • 25. Some  of  them   amazon foursquare peerindex apple geo salesforce bbc github slideshare bible google themovideb boss hackernews tumblr campfire ign twitter contentanalysis intuit vimeo craigslist kiva weather delicious klout yahoo dopplr lastfm youtube etsy netflix zillow facebook paypal
  • 26. You want even more?
  • 27. Alright, how about this? atom json csv microformats feed rss html xml
  • 28. The easiest way to start with YQL is to use the console http://developer.yahoo.com/yql/console
  • 30.
  • 31.
  • 32.
  • 33. How to get this data in your app?
  • 34. YQL is a REST API in itself and has two endpoints
  • 35. The public endpoint does not need any authentication. http://query.yahooapis.com/v1/public/yql? q={query} &format={format}
  • 36. The private endpoint needs oauth authentication. http://query.yahooapis.com/v1/yql? q={query}&format={format}
  • 37. Output formats are XML or JSON
  • 39. Query  Examples   select  *  from   yahoo.finance.quotes   where  symbol  in   ("^IXIC","^DJI","YHOO ","AAPL")  
  • 40. Query  Examples   select  *  from   weather.byloca@on  where   loca@on  in  ("bangalore,  in",   ”new  york,  us")  
  • 41. •  Query  Examples   Find  hackday  tweets:   •  SELECT  *  FROM  twi]er.search  where  q='hackday’   •  Search  Yahoo!  Answers  for  resolved  ques@ons  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"  and   place2="mumbai”   •  Extract  important  terms  from  top  stories  on  Yahoo!  news:   •  select  *  from  search.termextract  where  context  in  (select  descrip@on   from  rss  where  url='h]p://rss.news.yahoo.com/rss/topstories')  
  • 42. Query  Examples   •  Get  Olympic  medal  list   •  select  *  from  html  where  url='h]p://sports.yahoo.com/olympics/ medals.html'  and  xpath='//*[@id='mediasportsoverallmedalcount']/ div[2]/table/tbody/tr/td/a'   •  Shorten  a  URL:   •  insert  into  yahoo.y.ahoo.it  (url,  keysize)  values  ('h]p:// www.javarants.com',  5)   •  Search  apartments  in  criagslist:   •  select  *  from  craigslist.search  where  loca@on="bangalore"  and   type="apa"  and  query="indiranagar”  
  • 43. Query  Examples   •  Scrape  news  from  Yahoo!  Finance:   •  select  *  from  html  where  url="h]p://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="h]ps:// spreadsheets.google.com/pub?key=0ArYndzim-­‐ lbrdF8wc3A5QWl1ZGRpdkxRZk80SU9zUXc&output=csv"  and   col5  like  'Bangalore%’  ;  
  • 44. There are lot of things you can do with YQL.
  • 45. Play yourself http:// developer.yahoo.com/yql/
  • 47. Don’t look for features. Solve one problem
  • 48. Resources   •  All  Yahoo!  APIs  and  Services   •  hYp://developer.yahoo.com/everything.html     •  YQL  Documentahon   •  hYp://developer.yahoo.com/yql       •  YQL  Console   •  hYp://developer.yahoo.com/yql/console     •  YQL  Github  Account  (Contribute  Tables)  
  • 49. Thanks!   http://www.slideshare.net/ anshprat Anshu Prateek Twitter: @anshprat Github: http://github.com/anshprat Web: http://hackalyst.info