SlideShare a Scribd company logo
1 of 26
Download to read offline
using Yahoo! APIs for the mobile web:
content, location and context
                                    ricardo varela
                       ricardov@yahoo-inc.com
                      http://twitter.com/phobeo


                                         overtheair09
                               London, 25th sept 2009
the age of mobile is
nigh! (no, really...)

iphone, android, mobile 2.0,
mobile services, ubiquitous
experience, j2me,
micropayments, widget, app
store, personalization, SDK ,
location-based services,
ecosystems, mobile porn, data
plans, cloud data, customer
loyalty, mobile marketing, w3c
MWI, pay through phone,
message-based services,
mobile-first experience,
femtocells, global reach, music
downloads, mobile
convergence
 buzzwords selected on purpose to beat the keyword bingo!



                                                            img by David Malcomson
but... what does
mobile mean?

 mobile is not just a smaller
 screen


 information where you need it


 things you can do only now




                            img from bestadsontv.com
what works in mobile?




                        data from all about the iphone, comscore mobile study and apple store
trying to summarize it in some way...

 content

 location

 and context
and what does yahoo have to do with this?

 we have been playing mobile for long


 http://mobile.yahoo.com


 but that’s not all!
the yahoo developer network

http://developer.yahoo.com
content




 finance, hotjobs, upcoming, local, weather, flickr, music, answers, search


 make your own: hadoop, pig
example: wassup!
but we always end up mixing services
 $myurl = sprintf('http://api.flickr.com/services/rest/?
 method=flickr.photos.search&per_page=%d&bbox=%s&api_key=%s&page=%d&tags=%s',
 $maxPerPage, $bbox, FLICKR_API_KEY, $page, TAGS);

 $xml_doc = DOMDocument::load($xml);

 $xpath = new DOMXPath($xml_doc);

 $result = $xpath->query("//rsp/photos/photo");

 foreach($result as $item){

     $photo_id = $item->getAttribute('id');

   $infourl = sprintf('http://api.flickr.com/services/rest/?
 method=flickr.photos.getInfo&api_key=%s&photo_id=%s', FLICKR_API_KEY, $id);

     $info_doc = DOMDocument::load($infourl);

     $xpath_info = new DOMXPath($info_doc);

     $image_url = $xpath_info->query("//urls/url");

     // insert more processing here...

 }
content: YQL, the swiss army knife of data

 select * from internet


 offers simple access to all of services from yahoo...


 ... or from outside (http://www.datatables.org/)
so that we end up with this...

  select urls.url from flickr.photos.info
    where photo_id in
      ( select id from flickr.photos.search
        where text="tate modern")




                                 imgs from housemouse and wellsoitappears on twitter
or other similar cases...

  select title,abstract,url from search.news
    where query="iphone"


  select * from local.search where query="sushi"
    and location="san francisco, ca"
    and Rating.AverageRating>4.0


  select name, website from music.artist.similar
    where id in
      (select id from music.artist.popular)
and it is also good for scraping...

 select src from html where url in
   (“http://icanhascheezburger.com/?s=phone”,
    “http://failblog.org/?s=phone”)
   and xpath=”//div[@class=’entry’]/div/div/p/img”


 use "http://phobeo.com/hacks/yql/tables/
 cineworld.cinemasearch.xml" as cinemas;
 select * from cinemas where nearlocation="wc2h"


 select * from microformats where
   url="http://upcoming.yahoo.com/event/4165902/"
and has widgety goodness

 Use server side...
 YQL_IMG_EXTRACT = "http://query.yahooapis.com/v1/public/yql?
 q=select%20*%20from%20html%20where%20url%3D'{URL}'%20and
 %20xpath%3D'%2F%2Fbody%5B%40id%3D%22noticias%22%5D%2Fdiv%5B
 %40id%3D%22wrapper%22%5D%2Fdiv%5B2%5D%2F%2Fimg%5B%40title
 %5D'%20limit%203&format=json"

    def images
      url = YQL_IMG_EXTRACT.gsub(/{URL}/,
         CGI.escape(self.url))
      results = JSON.parse(open(url).read)['query']['results']
and has widgety goodness

 ...or straight from the client!

 function get() {
   var old = document.getElementById('triggerscript');
   if(old){
     old.parentNode.removeChild(old);
   }
   var where = document.getElementById('loc').value;

   var url='http://query.yahooapis.com/v1/public/yql?q=select%20*%20from
 %20upcoming.events(100)%20where%20woeid%20in%20(select%20woeid%20from%20geo.places
 %20where%20text%3D%22'+encodeURIComponent(where)+'%22)%20limit%20'+count+'%20offset
 %20'+offset+'%20%7C%20sort(field%3D%22start_date
 %22)&format=json&callback=displayResult';

     var s = document.createElement('script');
     s.setAttribute('id','triggerscript');
     s.setAttribute('src',url);
     document.getElementsByTagName('head')[0].appendChild(s);
     return false;
 }
there’s also location




 maps, placemaker, fireeagle
again, we could use those from yql
 // check for geo references

 SELECT * FROM geo.placemaker
   WHERE documentContent = "First we take Manhattan, and then we take Berlin"
   AND documentType="text/plain"



 // geolocate all places in a page and give me the maps...

 select * from maps.map
   where (latitude, longitude) IN
   (SELECT match.place.centroid.latitude, match.place.centroid.longitude
     FROM geo.placemaker
     WHERE documentURL = "http://news.bbc.co.uk/1/hi/world/middle_east/8274262.stm"
     AND documentType="text/html")


 // combine place names with a text search for adding “location search”

 select * from nestoria.search where price_max=1000 and bedroom_min = 1 and
 listing_type="rent" and place_name in (
   select name from geo.places.neighbors where neighbor_woeid in (
     select woeid from geo.places where text="pimlico, uk" limit 1
   ) limit 3
 )
with the exception of fireeagle (for now...)

 also, a comment on auth modes


 (app or mobile auth should work just fine)
and finally, context...




 there’s more context than just location


 contacts, address book, social directory, boss keywords
example: trendnews
example: trendnews

 trending topic “Les Paul”


 http://www.rtve.es/noticias/20090813/fallece-a-los-anos-guitarrista-
 estadounidense-les-paul/288969.shtml

 select * from search.web
   where sites="http://www.rtve.es/noticias/20090813/
 fallece-a-los-anos-guitarrista-estadounidense-les-paul/
 288969.shtml"
   and view="keyterms" and query="les paul"
and for more...

http://developer.yahoo.com
so get on hacking...

 we have some nice present full
 of caffeinated goodness for the
 best hack using Yahoo! APIs


 for details on how to send
 yours, check the overtheair.org
 site!
and let us know if we
can lend a hand!

 YDN forums
 http://developer.yahoo.com/forum


 The Y! guys
 (located around bean bag area)
thank you!
                           ricardo varela
              ricardov@yahoo-inc.com
             http://twitter.com/phobeo

More Related Content

Recently uploaded

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Yahoo APIs For Mobile: Content, Location and Context - OverTheAir 2009

  • 1. using Yahoo! APIs for the mobile web: content, location and context ricardo varela ricardov@yahoo-inc.com http://twitter.com/phobeo overtheair09 London, 25th sept 2009
  • 2. the age of mobile is nigh! (no, really...) iphone, android, mobile 2.0, mobile services, ubiquitous experience, j2me, micropayments, widget, app store, personalization, SDK , location-based services, ecosystems, mobile porn, data plans, cloud data, customer loyalty, mobile marketing, w3c MWI, pay through phone, message-based services, mobile-first experience, femtocells, global reach, music downloads, mobile convergence buzzwords selected on purpose to beat the keyword bingo! img by David Malcomson
  • 3. but... what does mobile mean? mobile is not just a smaller screen information where you need it things you can do only now img from bestadsontv.com
  • 4. what works in mobile? data from all about the iphone, comscore mobile study and apple store
  • 5. trying to summarize it in some way... content location and context
  • 6. and what does yahoo have to do with this? we have been playing mobile for long http://mobile.yahoo.com but that’s not all!
  • 7. the yahoo developer network http://developer.yahoo.com
  • 8. content finance, hotjobs, upcoming, local, weather, flickr, music, answers, search make your own: hadoop, pig
  • 10. but we always end up mixing services $myurl = sprintf('http://api.flickr.com/services/rest/? method=flickr.photos.search&per_page=%d&bbox=%s&api_key=%s&page=%d&tags=%s', $maxPerPage, $bbox, FLICKR_API_KEY, $page, TAGS); $xml_doc = DOMDocument::load($xml); $xpath = new DOMXPath($xml_doc); $result = $xpath->query("//rsp/photos/photo"); foreach($result as $item){ $photo_id = $item->getAttribute('id'); $infourl = sprintf('http://api.flickr.com/services/rest/? method=flickr.photos.getInfo&api_key=%s&photo_id=%s', FLICKR_API_KEY, $id); $info_doc = DOMDocument::load($infourl); $xpath_info = new DOMXPath($info_doc); $image_url = $xpath_info->query("//urls/url"); // insert more processing here... }
  • 11. content: YQL, the swiss army knife of data select * from internet offers simple access to all of services from yahoo... ... or from outside (http://www.datatables.org/)
  • 12. so that we end up with this... select urls.url from flickr.photos.info where photo_id in ( select id from flickr.photos.search where text="tate modern") imgs from housemouse and wellsoitappears on twitter
  • 13. or other similar cases... select title,abstract,url from search.news where query="iphone" select * from local.search where query="sushi" and location="san francisco, ca" and Rating.AverageRating>4.0 select name, website from music.artist.similar where id in (select id from music.artist.popular)
  • 14. and it is also good for scraping... select src from html where url in (“http://icanhascheezburger.com/?s=phone”, “http://failblog.org/?s=phone”) and xpath=”//div[@class=’entry’]/div/div/p/img” use "http://phobeo.com/hacks/yql/tables/ cineworld.cinemasearch.xml" as cinemas; select * from cinemas where nearlocation="wc2h" select * from microformats where url="http://upcoming.yahoo.com/event/4165902/"
  • 15. and has widgety goodness Use server side... YQL_IMG_EXTRACT = "http://query.yahooapis.com/v1/public/yql? q=select%20*%20from%20html%20where%20url%3D'{URL}'%20and %20xpath%3D'%2F%2Fbody%5B%40id%3D%22noticias%22%5D%2Fdiv%5B %40id%3D%22wrapper%22%5D%2Fdiv%5B2%5D%2F%2Fimg%5B%40title %5D'%20limit%203&format=json" def images url = YQL_IMG_EXTRACT.gsub(/{URL}/, CGI.escape(self.url)) results = JSON.parse(open(url).read)['query']['results']
  • 16. and has widgety goodness ...or straight from the client! function get() { var old = document.getElementById('triggerscript'); if(old){ old.parentNode.removeChild(old); } var where = document.getElementById('loc').value; var url='http://query.yahooapis.com/v1/public/yql?q=select%20*%20from %20upcoming.events(100)%20where%20woeid%20in%20(select%20woeid%20from%20geo.places %20where%20text%3D%22'+encodeURIComponent(where)+'%22)%20limit%20'+count+'%20offset %20'+offset+'%20%7C%20sort(field%3D%22start_date %22)&format=json&callback=displayResult'; var s = document.createElement('script'); s.setAttribute('id','triggerscript'); s.setAttribute('src',url); document.getElementsByTagName('head')[0].appendChild(s); return false; }
  • 17. there’s also location maps, placemaker, fireeagle
  • 18. again, we could use those from yql // check for geo references SELECT * FROM geo.placemaker WHERE documentContent = "First we take Manhattan, and then we take Berlin" AND documentType="text/plain" // geolocate all places in a page and give me the maps... select * from maps.map where (latitude, longitude) IN (SELECT match.place.centroid.latitude, match.place.centroid.longitude FROM geo.placemaker WHERE documentURL = "http://news.bbc.co.uk/1/hi/world/middle_east/8274262.stm" AND documentType="text/html") // combine place names with a text search for adding “location search” select * from nestoria.search where price_max=1000 and bedroom_min = 1 and listing_type="rent" and place_name in ( select name from geo.places.neighbors where neighbor_woeid in ( select woeid from geo.places where text="pimlico, uk" limit 1 ) limit 3 )
  • 19. with the exception of fireeagle (for now...) also, a comment on auth modes (app or mobile auth should work just fine)
  • 20. and finally, context... there’s more context than just location contacts, address book, social directory, boss keywords
  • 22. example: trendnews trending topic “Les Paul” http://www.rtve.es/noticias/20090813/fallece-a-los-anos-guitarrista- estadounidense-les-paul/288969.shtml select * from search.web where sites="http://www.rtve.es/noticias/20090813/ fallece-a-los-anos-guitarrista-estadounidense-les-paul/ 288969.shtml" and view="keyterms" and query="les paul"
  • 24. so get on hacking... we have some nice present full of caffeinated goodness for the best hack using Yahoo! APIs for details on how to send yours, check the overtheair.org site!
  • 25. and let us know if we can lend a hand! YDN forums http://developer.yahoo.com/forum The Y! guys (located around bean bag area)
  • 26. thank you! ricardo varela ricardov@yahoo-inc.com http://twitter.com/phobeo