HACKING WITH YAHOO!BOSSRahul HampoleSr Product Manager Yahoo! BOSSrhampole@yahoo-inc.com@ysearchboss
WHAT DOES BOSS GIVE YOU? Search Data and Infrastructure Monetization (We give you Ads!!) Support and ToolsBOSS is a service that provides you (thedeveloper) flexible access to different types ofdata from Yahoo and allows you to buildpowerful commercial applications with thatdata.BOSS provides you Search Advertisingand simple terms so that you canmonetize that innovative product andcontinue to invest your personal time init.BOSS also gives you Support and Tools toget your product working.
Restful XML and JSON APISearch Data - Web, Image, Spelling, News, Also Try, Blogs and Search AdsGeo Services – Placefinder & PlaceSpotterFlexibility to Blend and Re-rank Results Create your own look and feelChange rankingMix it with other API’soAuth based AuthenticationWHAT DOES THAT MEAN?
WHAT ELSE DO YOU GETWeb and Limited Web results (smaller subset) Complex query combinations and filters Searches for content on multiple marketsImage attributes like height, width, etcTime span filtering for News SearchExtended abstractsRecognizes most search filters from Yahoo! and Google (backdoor hacks)
YAHOO! BOSS GEO SERVICSPlacefinder1. Geocoding – Give it anaddress and get back aLat/Lon2. Address normalization3. Reverse Geocoding – Giveit a lat/long and get anaddressPlaceSpotter1. Recognize geographicalentities available in textualcontent2. Understand the meaningof those entities3. Couple with Geoplanet tounderstand geographicalmeaning6Learn more at http://developer.yahoo.com/boss/geo/
THE QUERYTells you what the user is looking forPowers secondary APIsCan be generated by a search box, URL,tags or keyword extraction from the page.Generates related topicsThe Query is your BFF!e.g. http://yboss.yahooapis.com/ysearch/web?q=“Dark Knight”&format=xml
SAMPLE CALLSGetting multiple data sets /ysearch/web,images,news?q=obama /ysearch/web,images,news?web.q=obama&images.q=flower&news.q=egyptSearching through sites A Simple Movie Search /ysearch/web?q=“Dark Knight”&sites=movies.yahoo.com,netflix.com,imdb.comAND/OR operators /ysearch/web?q="stevejobs"AND((ipad)OR(iphone))&sites=bestbuy.com,newegg.com
UNARY OPERATORSSearch for Batman but not “Dark Knight” q=(batman -“Dark Knight")Find pages with “Heath Ledger” but not “DarkKnight” q=+”heath ledger”–”DarkKnight”&sites=movies.yahoo.com
IMAGE SEARCH PARAMETERSSearch for images that are not offensive /ysearch/images?q=“san francisco”&filter=yesSearch for images that are wallpaper size /ysearch/images?q=“san francisco”&dimensions=wallpaperSearch for a image at a certain refer URL /ysearch/images?q=yahoo&refererurl=http://www.flickr.comInteresting Output Fields format, file size, height, width, title, total result count
NEWS SEARCH PARAMETERSSearch news that is less than 7 days old/ysearch/news? q=osama&age=7dSearch news that is between 20hrs and 2 days old/ysearch/news?q=osama&age=20h2dRe-rank news results by date/ysearch/news?q=osama&ranking=trueInteresting Output FieldsSource, Date, Source URL
BOSS + YQLTable Name: boss.searche.g. select * from boss.search where ck=… andsecret=… and q=„yahoo‟ and service=„news‟Parameters ExampleConsumer Key ck -Consumer Secret secret -Query Term q ‘yahoo’Service service ‘news’
UNDERSTAND OAUTHIdentificationConsumer Key – Used to make a call to the APIConsumer Secret – Used for 3 legged oAuth (not used for BOSS)Making a call(www.oauth.net/code)-Consumer Key-Nonce – Random string generated by oAuth (prevents replay attacks)-Signature – Generated by library-Signature Method – Various types of methods supported (e.g. HMAC-SHA1)-oAuth Timestamp –Unix time (valid for 5 minutes only)-oAuth version – 1.0We have code samples in most languages on BOSS Site
HACK IDEAS AND USEFUL API’SRealTime Twitter/Facebook APIMobile ApplicationsVideo YouTube data APIVertical search engines Programmable web has interesting API‟sLocal + Search Pull entities using Placespotter andrecognize relationships between contentChrome extensions
HACK AWAY1. We have BOSS Keys available for you Find me if you don’t have them2. Code samples in the BOSS Docs3. In depth demo later today Build a location aware news service17