Title: Yahoo Web Services
1Yahoo! Web Services
Dan Theurer dan_at_yahoo-inc.com January 10, 2005
2Coming up
- The Yahoo! Developer Network
- Web services overview
- Current state of Yahoo! Web services
- Code Samples
- Questions
3Developer Network
- Yahoo! provides a number of useful and free Web
services that you can use in your applications
and Web sites today - First Services on developer.yahoo.net launched in
March 2005. All were search related (video, web,
local, news and image) - In April we started building a dedicated team to
co-ordinate and support efforts for publicly
available Web services within Yahoo! Currently
there are 6 people on the team and we are still
growing - We have a pretty busy launch calendar for the
next couple of month and what we offer today is
just the tip of the iceberg
4Why Web Services
- Extend the reach of Yahoo! properties
- Beyond the browser mobile, desktop, etc.
- Enable combinations of properties (Flickr images
on Maps! Movie listings with restaurant reviews!
Travel, Local Search and Traffic) - Enable users to use Yahoo! data in their own way
- We devote resources to making the greatest good
for the greatest number happen - But we also recognize that todays marginal use
case can become tomorrows mainstream behavior - Enabling users of Yahoo! to create applications
themselves is an important way to make this
happen
5Technical Details
- We offer several styles of APIs
- Most are REST / yREST / RESTful or RSS return XML
or JSON - SOAP is on the Roadmap. Flickr offers SOAP today
- JavaScript / ActionScript APIs for Maps
- HTTP GET or POST that return HTML - old Maps
- No lengthy sign-up process or fees (if you have a
Y! ID youre pretty much good to go) - Most calls take an application ID (which is used
solely to help you determine how popular your app
is) - Rate-limiting is done per IP address (not per app
ID) - Most of the applications are Web based, and is
limited per server. For client application or
ones that use JSON rate limiting is therefore
done per user. - Some APIs (Simple Maps API, RSS feeds, others)
have no rate limits - Limits are noted on the documentation pages
(developer.yahoo.net)
6Web Services We Provide Today
- del.ico.us
- Social bookmarking
- Flickr
- Best way to store, sort, search and share your
photos online. - Maps
- 5 different technologies supported
- Embed maps
- Geocoding, Traffic Overlay
- Music
- Customize YME with plug-ins or skins
- Webjay - publish web playlists.
- RSS Feeds
- Search Marketing
- Advertiser Web Services
- Shopping
- Comparison shopping
- Search APIs
- Web Search
- News, Local
- Audio, Image, Video
- Content Analysis
- My Web (bookmarks tags FOAF)
- Travel
- Trip planer
- FairChase
- Upcoming.org
- Community-driven calendar
- Y! Widgets
- Desktop helper applications
7Flash Friendly
- Yahoo! opened up most of their APIs for Flash
developers. About 130 REST calls and we will add
more in the future. - APIs
8Yahoo! Search APIs
- Search API was the first Yahoo! Web service and
we are constantly adding new calls - Use Y! Search in your web site / client
applications (JSON) - Offers all the advanced search options that are
available on the web site. The major advantage of
an API is that you can use those services more
efficiently. Make more out of Advanced Web
Search. - What is possible?
- Local Search Maps Mash-up
- Vertical search (e.g. Web / News)
- Content analysis Term extraction
spiffYSearch
9Example Context Analysis API
- Only takes 3 parameters
- appid
- query
- context
- appid YahooDemo
- context Labor Day on the Empire State Building
- query vacation (optional)
- Call http//api.search.yahoo.com/ContentAnalysisS
ervice/V1/termExtraction?appidYahooDemoqueryvac
ationcontextLabor20Day20on20the20Empire20St
ate20Building
10Context Analysis XML Result
-
- hema-instance"
- xmlns"urnyahoocate" xsischemaLocation"urnyah
oocate http//api.search.yahoo.com/ContentAnalysi
sService/V1/TermExtractionResponse.xsd" - empire state building
- labor day
- empire
- state
- empire state
- state building
-
11Travel API
- Want to get away?
- The Yahoo! Travel web services enables you to
build applications that use the trip plan data
from the Yahoo! Travel Trip Planner
(http//travel.yahoo.com/trip). - The APIs support JSON as a alternative output
method. This allows Web service requests to be
made within a browser without the need of a
proxy. - Currently all Travel services are read-only, but
they have big plans for future APIs - The pattern for this API is identical to our
other APIs (Search, Shopping)
12Yahoo! Shopping API
- Retrieve comparison shopping data from our
database of millions of products and thousands of
merchants - Search inventory of all merchants or from a
single, specific merchant - Shopping is constantly adding new calls. The
latest additions allow you to get user reviews
for a product and product specifications. - The pattern for this API is identical to our
other APIs (Search, Travel)
13The completely new Maps API
- 5 different technologies to work with Yahoo! Maps
- AJAX API
- Flash APIs
- JavaScript
- ActionScript (Flash IDE)
- Flex
- Simple API
- Maps RESTy APIs
14Maps AJAX APIs
- The Yahoo! AJAX Maps API lets developers add maps
to their web sites using DHTML and JavaScript. - Maps are fully embeddable and scriptable using
the JavaScript programming language. - Offered features
- Pan
- Zoom
- Markers
- Smart Windows
- Event handling
- Its todays way of interacting with embeddable
maps EventBrowser
15Maps Flash APIs
- Even richer user experience and set of
functionality than the AJAX API - JavaScript for Flash
- You can interact with a Flash Map using common
JavaScript to leverage a rich Maps experience - ActionScipt for Flash
- Build your application in the Flash IDE
- Flex
- Flex developers can use the Flex API with
Presentation Server Technology to create
powerful applications. - Overlays
- Traffic Overlay
- Local Search Overlay (only a couple lines of
code) Local Overlay
16Simple Maps API
- Perfect for store locators, plotting your road
trip and/or crime spree, etc. - Overlay data is in geoRSS format
- Add latitude/longitude or address/city/state/zip
data to a normal RSS feed - RSS feed can reside on a server you own or you
can POST the RSS data to us - No rate limits for this API!
- Excel tool that lets you generate the GeoRSS
17Maps REST APIs
- Geocoding API Pass in location data by address
and receive geocoded (encoded with
latitude-longitude) responses. - Map Image API - Stitch map images together to
build your own maps for usage in custom
applications, including mobile and offline use.
mapImage - Traffic API - Build applications that take
dynamic traffic report data to help you plan
optimal routes and keep on top of your commute - Local Search API - Query against the Yahoo! Local
service, which now returns longitude-latitude
with every search result for easy plotting on a
map. Also new is the inclusion of ratings from
Yahoo! users for each establishment to give added
context. EverythingElse
18Flickr API
- Photo sharing, tagging, community
- Fully programmable
- About 80 API calls
- SOAP / REST / XML-RPC / FLASH
- Geotagging maps pictures to locations
- Samples in various languages available
- Personalized results though Authentication API
for - Web applications
- Desktop
- Mobile apps (http//www.flickr.com/services/api/au
th.howto.mobile.html)
19Flickr Authentication for Mobile
- 1. Obtain an API key
- 2. Configure your key
- Note down the Shared Secret
- Title and Description are required for all
applications - Choose a permission level for your application
(r, w, del) - Note down your authentication URL.
(http//www.flickr.com/auth-12345678) - 3. Obtain a mini-token
- Send the user to the authentication URL you
obtained above. - User will be given a 9 digit code, for example
123-456-789. - User need to enter this code into mobile
application.
20Flickr Authentication for Mobile
- Exchange the mini-token for a full token
- To obtain a full authentication token, call the
flickr.auth.getFullToken method. - method flickr.auth.getFullToken
api_key 9a0554259914a86fb9e7eb014e4e5d52
mini_token 123-456-789 api_sig
fddd34ac63af89b1b73b144aef8ef3d5 - http//flickr.com/services/rest/?methodflickr.aut
h.getFullTokenapi_key9a0...mini_token12.. - The response to the method call looks like this
- 45-76598454353455re
ad
username"Bees" fullname"Cal H" / -
- 5. Make an authenticated call
- Every authenticated call requires both the
auth_token and api_sig arguments.
21del.icio.us API
- del.icio.us is a collection of favorites - yours
and everyone else's. - Keep links to your favorite articles, blogs,
music, restaurant reviews, and more on
del.icio.us and access them from any computer on
the web. - Share favorites with friends, family, and
colleagues. - Discover new things. Everything on del.icio.us is
someone's favorite - they've already done the
work of finding it. Explore and enjoy. - REST APIs
- tags - get, rename,
- tags/bundles - all, set, delete
- posts - update, recent, get, all, dates, add,
delete - The del.icio.us APIs use HTTP-Auth for user
authentication
22del.ico.us Sample Request
- Sample request 1
- http//del.icio.us/api/posts/add?descriptionYahoo
20Developer20Networkurlhttp//developer.yahoo.
com - Sample response 1
- code"done" /
- Sample request 2 http//del.icio.us/api/posts/get
- Sample response 2
- dt"2006-01-10" tag"" user"dantheurer"href"http//developer.yahoo.com/"
description"Yahoo Developer Network"
hash"5e71407ce40a86ad7843ace97dc68eee"
others"1" tag"services web" time"2006-01-10T01
4849Z" /description"Dan Theurer's blog"
hash"0c02ef805d2cbaa17b75c68f583775be"
others"3" tag"blog technology"
time"2006-01-10T015030Z" /
23Upcoming.org APIs
- A community-driven event calendar where users
interact with their friends around events. - 22 REST calls to work with
- events
- metros
- venues
- categories
- watchlists
- Users
- RSS feeds for Metros, Groups, and user specific
events as well as parameterizes search. - Token-based authentication (similar to Flickr)
24Music Engine Plug-Ins
- The Yahoo! Music Engine is a pluggable, skinable
music player for Windows - Released in May, currently in beta
- Provides the full range of music listening
options your own MP3 library, streaming radio,
stream on demand, purchase tracks, burn to CD,
etc. - Plug-ins can be created in C/C or in the form
of a Web page - Use Javascript to access the Music Engine object
model from within the player - New WebJay just joined the Yahoo! family.
- It is a tool that helps you listen to and publish
web playlists and also supports REST APIs
25Yahoo! Widgets
- An application development platform that enables
the creation of software widgets - Cross platform (Mac OS X/Windows)
- Widgets are ridiculously easy to build (XML,
Javascript, graphics) - Huge enhancements for 3.0 version like build in
DOM parser, scrollbars, subviews - FREE Download at http//widgets.yahoo.com
26Yahoo! Developer Resources
- Developer Web Site
- http//developer.yahoo.net/
- Documentation, code examples, etc.
- Developer Blog
- http//developer.yahoo.net/blog/
- RSS goodness to keep up on our latest releases
- Developer Community/Support
- http//developer.yahoo.net/community/
- We mostly use Yahoo! Groups (mailing lists) for
developer support - Ask Us About Commercial Use Of Our APIs
- http//developer.yahoo.net/faq/commercial
27Questions
28Example Shopping API
http//api.shopping.yahoo.com/ShoppingService/V1/p
roductSearch?appidmyappidquerysonyresults10
29Shopping Search Response XML
xmlnsxsi"http//www.w3.org/2001/XMLSchema-instan
ce" xmlns"urnyahooprods" xsischemaLocation"ur
nyahooprods http//api.shopping.yahoo.com/shoppi
ngservice/v1/productsearch.xsd"
totalResultsAvailable"9204" totalResultsReturned
"20" firstResultPosition"1" grouping"store"
S-model201522203Chi3EFlat20Panel20LCD3C2F
hi3E20SDM-HS532FW20Monitor1991232768
Flat Panel LCD SDM-HS53/W Monitor
249.76
311.00
/shopping/238787/catalog_t_1991232768.1048793976.j
pg?rm_____DMn6NHFjl
70 70
continued...
30Shopping Search Response XML
frame design of Sonys SDMHS53 Flat Panel LCD
complements any room in your home Images are
crisp and responsive whether youre working
playing games or surfing the internet Its simple
to set up so youre up and running in no time
Itsou83 ?onys best value flat panel
LCDbr 0 in LCD Monitor - 15 in viewable - TFT active
matrix display - 0.3 mm pitch - 1024 x 768
Resolution - 4001 ...
5
0
0.0
ny20HS-model201522203Chi3EFlat20Panel20LCD
3C2Fhi3E20SDM-HS532FW20Monitor1991232768pa
geuser-reviews
m/pSony20HS-model201522203Chi3EFlat20Panel
20LCD3C2Fhi3E20SDM-HS532FW20Monitor1991232
768pagepost-reviews
DATASize
Monitor
ationLabel TFT active matrix
Size
in