2. BOSS … What ?
Build your Own Search Service
“BOSS is a data API. It‟s not a search API”
Open Yahoo’s core search features via web services to
let 3rd parties revolutionize Search
3. What else ?
• Monetization - Ads Service : 3rd parties revenue
share
• Pay per use model. Don’t worry will give you free
access for hacking
4. BOSS features
• Web, News, Image, and Spelling Suggestion services
• Time span filtering for News Search
• Image attributes like height, width, etc
• Document type filtering
• And more… !
5. Boss APIs … Data Request ?
• http://yboss.yahooapis.com/ysearch/{service,*}?
q={keyword}
Arguments: service, q, start, count, market, format, callback, sites
Operators: And, Or, +(Include), -(Exclude)
7. BOSS … Authentication ?
• OAUTH 1.0 - HTTP headers or GET params
• Consumer Key and Secret
• Self-serve sample code available
– PHP: http://oauth.net/code
– Perl: http://search.cpan.org/dist/Net-OAuth/
– Ruby: https://gist.github.com/383159
– C#:
http://oauth.googlecode.com/svn/code/csharp/OAuth
Base.cs
– Java: http://code.google.com/p/oauth-signpost/
8. BOSS and YQL
• Table Name: boss.search
Parameters Example
Consumer Key ck -
Consumer Secret secret -
Query Term q ‘yahoo’
Service service ‘news’
• e.g. select * from boss.search where ck=… and
secret=… and q=„yahoo‟ and service=„news‟
9. Searching in body and in title
Searching for Dark Knight in the Title on Yahoo
movies
q=reviews
intitle:"darkknight"&sites=movies.yahoo.com
Searching for Dark Knight in the Title in Yahoo
movies containing Christian Bale
q=reviews intitle:"dark knight"
inbody:"christianbale"&sites=movies.yahoo.com
10. Image search parameters
Search for images that are not offensive
/ysearch/images?q=“Yahoo Hacks”&filter=yes
Search for images that are wallpaper size
/ysearch/images?q=“Yahoo Hacks”&dimensions=wallpaper
Search for an image at a certain refer URL
/ysearch/images?q=“Yahoo
Hacks”&refererurl=http://www.flickr.com
• Interesting Output Fields
format, file size, height, width, title, total result count
11. News search parameters
Search news that is less than 7 days old
/ysearch/news?q=lokpal&age=7d
Search news that is between 20hrs and 2 days old
/ysearch/news?q=lokpal&age=20h2d
Re-rank news results by date
/ysearch/news?q=lokpal&ranking=true
Interesting Output Fields
Source, Date, Source URL
12. Yahoo! Content Analysis API
• select * from contentanalysis.analyze where
text='Yahoo Kicks off hacku at IIT Madras';
13. What can I Hack ?
• Some Useful Data Sources to mashup:
- Wikipedia, Y! Answers, Wolfram Alpha
- Twitter,Facebook, Flickr, Youtube, Delicious
- Foursquare, Maps, Travel
- IMDB, Amazon, Netflix,Craigslist
- Open Data, TheInfo.org
and more…