SlideShare a Scribd company logo
1 of 26
Download to read offline
HackU 2013
University of Dundee
         February 2013
The web is full of
    juicy and
long lasting data




HackU 2013 – University of Dundee
And there is a lot of it around




HackU 2013 – University of Dundee
However, our
attempts to get it
 can sometimes
    be clumsy




HackU 2013 – University of Dundee
What we need is
                                    an easy way to
                                    get to that data




HackU 2013 – University of Dundee
What about using APIs?


                  Like RSS, JSON, XML, CSV, SOAP, REST, …




HackU 2013 – University of Dundee
We could use APIs. But there are
             thousands of APIs...




HackU 2013 – University of Dundee
and it’s painful to get your head
                    around them!




HackU 2013 – University of Dundee
What if there was one API…



                      One API for everything
                          on the web?


HackU 2013 – University of Dundee
One World
         One Web
         One API ?

Can it ever exist?

        Sounds like
         politics!


HackU 2013 – University of Dundee
Yes it does exist!

                                     YQL:

                                    The API
                                     for the
                                      web
HackU 2013 – University of Dundee
The Yahoo Query Language, or short
     YQL is a unified interface language
                 to the web.




                What are you waiting for?
             http://developer.yahoo.com/yql
HackU 2013 – University of Dundee
Accessing the web and its services
       now becomes easy as ABC SQL



   select * from web
        select {what} from {service}
              where {condition}


HackU 2013 – University of Dundee
Let’s try a real YQL example
                        I love kittens.
                YQL get me 5 kitten photos

      select * from
flickr.photos.search where
  text="kitten" limit 5



HackU 2013 – University of Dundee
Let’s try a real YQL example
              select * from
        flickr.photos.search where
          text="kitten" limit 5




                                Output can be XML or JSON
HackU 2013 – University of Dundee
I want to use YQL and I want it now.
              That’s the easy part…
http://query.yahooapis.com/v1/public/yql?q=
<SQL_QUERY>&format=<FORMAT>

e.g.

http://query.yahooapis.com/v1/public/yql?q=
select%20*%20from%20rss%20where%20url%3D
%22http%3A%2F%2Frss.news.yahoo.com%2Frss
%2Ftopstories%22&format=json

                There’s also a private endpoint which uses oauth authentication
                http://developer.yahoo.com/yql/guide/authorization-access.html

HackU 2013 – University of Dundee
That’s not all… You can mix and
        match several web services using
                the in() command




HackU 2013 – University of Dundee
Mix and match…

         Find photos in Dundee, UK with a
         Creative Commons “By” license

select * from flickr.photos.info where
photo_id in (select id from
flickr.photos.search where woe_id in (select
woeid from geo.places where text=’dundee,uk')
and license=4)



HackU 2013 – University of Dundee
Now use your imagination… and
                   build away!




                http://isithackday.com/hacks/cantine/index.php?loc=covent+garden
HackU 2013 – University of Dundee
Yahoo! offers lots of data for free!
flickr.photos.exif	
                   local.search	
              mybloglog.community.find	
  
flickr.photos.info	
                   music.ar1st.id	
            mybloglog.member	
  
flickr.photos.interes1ngness	
         music.ar1st.popular	
       mybloglog.member.contacts	
  
flickr.photos.recent	
                 music.ar1st.search	
        mybloglog.member.newwithcontacts	
  
flickr.photos.search	
                 music.ar1st.similar	
       mybloglog.member.newwithme	
  
flickr.photos.sizes	
                  music.release.ar1st	
       mybloglog.members.find	
  
flickr.places	
                        music.release.id	
          mybloglog.stats.find	
  
flickr.places.info	
                   music.release.popular	
     upcoming.category	
  
geo.places	
                          music.release.search	
      upcoming.country	
  
geo.places.ancestors	
                music.track.id	
            upcoming.events	
  
geo.places.belongtos	
                music.track.popular	
       upcoming.events.bes1nplace	
  
geo.places.children	
                 music.track.search	
        upcoming.groups	
  
geo.places.neighbors	
                music.video.category	
      upcoming.metro	
  
geo.places.parent	
                   music.video.id	
            upcoming.state	
  
geo.places.siblings	
                 music.video.popular	
       upcoming.user	
  
geo.placetypes	
                      music.video.search	
        upcoming.venue	
  
gnip.ac1vity	
                        music.video.similar	
       	
  
                                      	
  


  HackU 2013 – University of Dundee
… and more of it. ALL FREE!
search.images	
                       search.images	
                   search.images	
  
search.news	
                         search.news	
                     search.news	
  
search.siteexplorer.inlinks	
         search.siteexplorer.inlinks	
     search.siteexplorer.inlinks	
  
search.siteexplorer.pages	
           search.siteexplorer.pages	
       search.siteexplorer.pages	
  
search.spelling	
                     search.spelling	
                 search.spelling	
  
search.suggest	
                      search.suggest	
                  search.suggest	
  
search.termextract	
                  search.termextract	
              search.termextract	
  
search.web	
                          search.web	
                      search.web	
  
social.connec1ons	
                   social.connec1ons	
               social.connec1ons	
  
social.contacts	
                     social.contacts	
                 social.contacts	
  
social.presence	
                     social.presence	
                 social.presence	
  
social.profile	
                       social.profile	
                   social.profile	
  
social.updates	
                      social.updates	
                  social.updates	
  
weather.forecast	
                    weather.forecast	
                weather.forecast	
  
yahoo.iden1ty	
                       yahoo.iden1ty	
                   yahoo.iden1ty	
  
yap.setsmallview	
                    yap.setsmallview	
                yap.setsmallview	
  




  HackU 2013 – University of Dundee
You want more data?
           amazon	
                     nmm	
  
           bitly	
                      nyt	
  
           delicious	
                  opensocial	
  
           dopplr	
                     search	
  
           etsy	
                       shopping	
  
           friendfeed	
                 social	
  
           github	
                     twi@er	
  
           Greader	
                    update.groovy	
  
           guardian	
                   weather	
  
           imdb	
                       wesabe	
  
           iploca1on	
                  whitepages	
  
           las?m	
                      yahoo	
  
           nestoria	
                   yelp	
  
           ne?lix	
                     zillow	
  
           	
                           	
  
                      http://github.com/spullara/yql-tables/tree/master
HackU 2013 – University of Dundee
Why don’t you create your own data
             source for YQL…

                    Using YQL’s Open Tables

All we need to do is create a schema that
       explains the data structure.

 http://developer.yahoo.com/yql/guide/yql-opentables-
                     chapter.html




HackU 2013 – University of Dundee
What else can you do with YQL?


Get data of a website
          select * from html where url='http://
          www.telegraph.co.uk/' and xpath='//h3/a'




Get data of several websites in one query
          select * from rss where url in (<url1>,<url2>);




HackU 2013 – University of Dundee
Anything else? Yes...


Create a View (Filtered data set)
     use 'http://yqlblog.net/samples/searchrank.xml'
     as searchrank;
     select * from searchrank where query='pizza' and
     dispurl like '%pizzahut%'



     More about YQL Execute:
     http://developer.yahoo.com/yql/guide/
     yql-execute-chapter.html

HackU 2013 – University of Dundee
YQL, where to start…

User guide:
http://developer.yahoo.com/yql

YQL Console (Test your queries…)
http://developer.yahoo.com/yql/console/




HackU 2013 – University of Dundee

More Related Content

Similar to Dundee University HackU 2013 - YQL

Open Hack London - Introduction to YQL
Open Hack London - Introduction to YQLOpen Hack London - Introduction to YQL
Open Hack London - Introduction to YQLChristian Heilmann
 
YQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationYQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationKorben00
 
Emerging Technologies
Emerging TechnologiesEmerging Technologies
Emerging TechnologiesKaren Brooks
 
Exploring the Semantic Web
Exploring the Semantic WebExploring the Semantic Web
Exploring the Semantic WebRoberto García
 
99 scholars - increase your online research visibility
99 scholars - increase your online research visibility99 scholars - increase your online research visibility
99 scholars - increase your online research visibility99Scholars
 
Technology Driven Diff Instruction
Technology Driven Diff InstructionTechnology Driven Diff Instruction
Technology Driven Diff InstructionVicki Davis
 
Cooltools nsw elearning11
Cooltools nsw elearning11Cooltools nsw elearning11
Cooltools nsw elearning11Michael Coghlan
 
Web 2.0 tools for science
Web 2.0 tools for scienceWeb 2.0 tools for science
Web 2.0 tools for scienceegaunce
 
iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE Joquetta Johnson
 
Differentiated Instruction and Assessment with Technology - NCTIES 1 pm
Differentiated Instruction and Assessment with Technology - NCTIES 1 pmDifferentiated Instruction and Assessment with Technology - NCTIES 1 pm
Differentiated Instruction and Assessment with Technology - NCTIES 1 pmVicki Davis
 
Technology Driven Differentiated Instruction 330pm
Technology Driven Differentiated Instruction 330pmTechnology Driven Differentiated Instruction 330pm
Technology Driven Differentiated Instruction 330pmVicki Davis
 
Web 2.0: What's the Buzz?
Web 2.0: What's the Buzz?Web 2.0: What's the Buzz?
Web 2.0: What's the Buzz?Julia Parra
 
Technology Driven Differentiated Instruction June 2013 #tic13
Technology Driven Differentiated Instruction June 2013 #tic13Technology Driven Differentiated Instruction June 2013 #tic13
Technology Driven Differentiated Instruction June 2013 #tic13Vicki Davis
 
Goodle Developer Days London 2008 - Open Social Update
Goodle Developer Days London 2008 - Open Social UpdateGoodle Developer Days London 2008 - Open Social Update
Goodle Developer Days London 2008 - Open Social UpdatePatrick Chanezon
 
Preparing for the Impact of Web 3.0
Preparing for the Impact of Web 3.0 Preparing for the Impact of Web 3.0
Preparing for the Impact of Web 3.0 Judy O'Connell
 
Learning in Networks of Knowledge
Learning in Networks of KnowledgeLearning in Networks of Knowledge
Learning in Networks of KnowledgeJudy O'Connell
 

Similar to Dundee University HackU 2013 - YQL (20)

Open Hack London - Introduction to YQL
Open Hack London - Introduction to YQLOpen Hack London - Introduction to YQL
Open Hack London - Introduction to YQL
 
Things to use, find and share
Things to use, find and shareThings to use, find and share
Things to use, find and share
 
Georgia Tech Hack Day
Georgia Tech Hack DayGeorgia Tech Hack Day
Georgia Tech Hack Day
 
YQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationYQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentation
 
Emerging Technologies
Emerging TechnologiesEmerging Technologies
Emerging Technologies
 
Exploring the Semantic Web
Exploring the Semantic WebExploring the Semantic Web
Exploring the Semantic Web
 
99 scholars - increase your online research visibility
99 scholars - increase your online research visibility99 scholars - increase your online research visibility
99 scholars - increase your online research visibility
 
Technology Driven Diff Instruction
Technology Driven Diff InstructionTechnology Driven Diff Instruction
Technology Driven Diff Instruction
 
Cooltools nsw elearning11
Cooltools nsw elearning11Cooltools nsw elearning11
Cooltools nsw elearning11
 
Web 2.0 tools for science
Web 2.0 tools for scienceWeb 2.0 tools for science
Web 2.0 tools for science
 
iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE
 
Differentiated Instruction and Assessment with Technology - NCTIES 1 pm
Differentiated Instruction and Assessment with Technology - NCTIES 1 pmDifferentiated Instruction and Assessment with Technology - NCTIES 1 pm
Differentiated Instruction and Assessment with Technology - NCTIES 1 pm
 
Technology Driven Differentiated Instruction 330pm
Technology Driven Differentiated Instruction 330pmTechnology Driven Differentiated Instruction 330pm
Technology Driven Differentiated Instruction 330pm
 
Web 2.0: What's the Buzz?
Web 2.0: What's the Buzz?Web 2.0: What's the Buzz?
Web 2.0: What's the Buzz?
 
Technology Driven Differentiated Instruction June 2013 #tic13
Technology Driven Differentiated Instruction June 2013 #tic13Technology Driven Differentiated Instruction June 2013 #tic13
Technology Driven Differentiated Instruction June 2013 #tic13
 
Web 2.0 Playground
Web 2.0 PlaygroundWeb 2.0 Playground
Web 2.0 Playground
 
Goodle Developer Days London 2008 - Open Social Update
Goodle Developer Days London 2008 - Open Social UpdateGoodle Developer Days London 2008 - Open Social Update
Goodle Developer Days London 2008 - Open Social Update
 
iCame! iSaw! iGoogled!
iCame! iSaw! iGoogled!iCame! iSaw! iGoogled!
iCame! iSaw! iGoogled!
 
Preparing for the Impact of Web 3.0
Preparing for the Impact of Web 3.0 Preparing for the Impact of Web 3.0
Preparing for the Impact of Web 3.0
 
Learning in Networks of Knowledge
Learning in Networks of KnowledgeLearning in Networks of Knowledge
Learning in Networks of Knowledge
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Recently uploaded (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Dundee University HackU 2013 - YQL

  • 1. HackU 2013 University of Dundee February 2013
  • 2. The web is full of juicy and long lasting data HackU 2013 – University of Dundee
  • 3. And there is a lot of it around HackU 2013 – University of Dundee
  • 4. However, our attempts to get it can sometimes be clumsy HackU 2013 – University of Dundee
  • 5. What we need is an easy way to get to that data HackU 2013 – University of Dundee
  • 6. What about using APIs? Like RSS, JSON, XML, CSV, SOAP, REST, … HackU 2013 – University of Dundee
  • 7. We could use APIs. But there are thousands of APIs... HackU 2013 – University of Dundee
  • 8. and it’s painful to get your head around them! HackU 2013 – University of Dundee
  • 9. What if there was one API… One API for everything on the web? HackU 2013 – University of Dundee
  • 10. One World One Web One API ? Can it ever exist? Sounds like politics! HackU 2013 – University of Dundee
  • 11. Yes it does exist! YQL: The API for the web HackU 2013 – University of Dundee
  • 12. The Yahoo Query Language, or short YQL is a unified interface language to the web. What are you waiting for? http://developer.yahoo.com/yql HackU 2013 – University of Dundee
  • 13. Accessing the web and its services now becomes easy as ABC SQL select * from web select {what} from {service} where {condition} HackU 2013 – University of Dundee
  • 14. Let’s try a real YQL example I love kittens. YQL get me 5 kitten photos select * from flickr.photos.search where text="kitten" limit 5 HackU 2013 – University of Dundee
  • 15. Let’s try a real YQL example select * from flickr.photos.search where text="kitten" limit 5 Output can be XML or JSON HackU 2013 – University of Dundee
  • 16. I want to use YQL and I want it now. That’s the easy part… http://query.yahooapis.com/v1/public/yql?q= <SQL_QUERY>&format=<FORMAT> e.g. http://query.yahooapis.com/v1/public/yql?q= select%20*%20from%20rss%20where%20url%3D %22http%3A%2F%2Frss.news.yahoo.com%2Frss %2Ftopstories%22&format=json There’s also a private endpoint which uses oauth authentication http://developer.yahoo.com/yql/guide/authorization-access.html HackU 2013 – University of Dundee
  • 17. That’s not all… You can mix and match several web services using the in() command HackU 2013 – University of Dundee
  • 18. Mix and match… Find photos in Dundee, UK with a Creative Commons “By” license select * from flickr.photos.info where photo_id in (select id from flickr.photos.search where woe_id in (select woeid from geo.places where text=’dundee,uk') and license=4) HackU 2013 – University of Dundee
  • 19. Now use your imagination… and build away! http://isithackday.com/hacks/cantine/index.php?loc=covent+garden HackU 2013 – University of Dundee
  • 20. Yahoo! offers lots of data for free! flickr.photos.exif   local.search   mybloglog.community.find   flickr.photos.info   music.ar1st.id   mybloglog.member   flickr.photos.interes1ngness   music.ar1st.popular   mybloglog.member.contacts   flickr.photos.recent   music.ar1st.search   mybloglog.member.newwithcontacts   flickr.photos.search   music.ar1st.similar   mybloglog.member.newwithme   flickr.photos.sizes   music.release.ar1st   mybloglog.members.find   flickr.places   music.release.id   mybloglog.stats.find   flickr.places.info   music.release.popular   upcoming.category   geo.places   music.release.search   upcoming.country   geo.places.ancestors   music.track.id   upcoming.events   geo.places.belongtos   music.track.popular   upcoming.events.bes1nplace   geo.places.children   music.track.search   upcoming.groups   geo.places.neighbors   music.video.category   upcoming.metro   geo.places.parent   music.video.id   upcoming.state   geo.places.siblings   music.video.popular   upcoming.user   geo.placetypes   music.video.search   upcoming.venue   gnip.ac1vity   music.video.similar       HackU 2013 – University of Dundee
  • 21. … and more of it. ALL FREE! search.images   search.images   search.images   search.news   search.news   search.news   search.siteexplorer.inlinks   search.siteexplorer.inlinks   search.siteexplorer.inlinks   search.siteexplorer.pages   search.siteexplorer.pages   search.siteexplorer.pages   search.spelling   search.spelling   search.spelling   search.suggest   search.suggest   search.suggest   search.termextract   search.termextract   search.termextract   search.web   search.web   search.web   social.connec1ons   social.connec1ons   social.connec1ons   social.contacts   social.contacts   social.contacts   social.presence   social.presence   social.presence   social.profile   social.profile   social.profile   social.updates   social.updates   social.updates   weather.forecast   weather.forecast   weather.forecast   yahoo.iden1ty   yahoo.iden1ty   yahoo.iden1ty   yap.setsmallview   yap.setsmallview   yap.setsmallview   HackU 2013 – University of Dundee
  • 22. You want more data? amazon   nmm   bitly   nyt   delicious   opensocial   dopplr   search   etsy   shopping   friendfeed   social   github   twi@er   Greader   update.groovy   guardian   weather   imdb   wesabe   iploca1on   whitepages   las?m   yahoo   nestoria   yelp   ne?lix   zillow       http://github.com/spullara/yql-tables/tree/master HackU 2013 – University of Dundee
  • 23. Why don’t you create your own data source for YQL… Using YQL’s Open Tables All we need to do is create a schema that explains the data structure. http://developer.yahoo.com/yql/guide/yql-opentables- chapter.html HackU 2013 – University of Dundee
  • 24. What else can you do with YQL? Get data of a website select * from html where url='http:// www.telegraph.co.uk/' and xpath='//h3/a' Get data of several websites in one query select * from rss where url in (<url1>,<url2>); HackU 2013 – University of Dundee
  • 25. Anything else? Yes... Create a View (Filtered data set) use 'http://yqlblog.net/samples/searchrank.xml' as searchrank; select * from searchrank where query='pizza' and dispurl like '%pizzahut%' More about YQL Execute: http://developer.yahoo.com/yql/guide/ yql-execute-chapter.html HackU 2013 – University of Dundee
  • 26. YQL, where to start… User guide: http://developer.yahoo.com/yql YQL Console (Test your queries…) http://developer.yahoo.com/yql/console/ HackU 2013 – University of Dundee