boss

18

Upload: yahoo-developer-network

Post on 01-Nov-2014

1.206 views

Category:

Technology


0 download

DESCRIPTION

Slides for Rahul Hampole's BOSS talk for Yahoo! Hack Europe: London 2013.

TRANSCRIPT

Page 1: BOSS
Page 2: BOSS

HACKING WITH YAHOO! BOSSRahul Hampole

Sr Product Manager Yahoo! BOSS

[email protected]

@ysearchboss

Page 3: BOSS

WHAT DOES BOSS GIVE YOU?

Search Data and Infrastructure

Monetization (We give you Ads!!)

Support and Tools

BOSS is a service that provides you (the developer) flexible access to different types of data from Yahoo and allows you to build powerful commercial applications with that data.

BOSS provides you Search Advertising and simple terms so that you can monetize that innovative product and continue to invest your personal time in it.

BOSS also gives you Support and Tools to get your product working.

Page 4: BOSS

Restful XML and JSON API

Search Data - Web, Image, Spelling, News, Also Try, Blogs and Search Ads

Geo Services – Placefinder & PlaceSpotter

Flexibility to Blend and Re-rank Results

Create your own look and feel

Change ranking

Mix it with other API’s

oAuth based Authentication

WHAT DOES THAT MEAN?

Page 5: BOSS

WHAT ELSE DO YOU GET

Web and Limited Web results (smaller subset)

Complex query combinations and filters

Searches for content on multiple markets

Image attributes like height, width, etc

Time span filtering for News Search

Extended abstracts

Recognizes most search filters from Yahoo! and Google (backdoor hacks)

Page 6: BOSS

6

YAHOO! BOSS GEO SERVICS

Placefinder

1. Geocoding – Give it an

address and get back a

Lat/Lon

2. Address normalization

3. Reverse Geocoding – Give it

a lat/long and get an address

PlaceSpotter

1. Recognize geographical

entities available in textual

content

2. Understand the meaning of

those entities

3. Couple with Geoplanet to

understand geographical

meaningLearn more at http://developer.yahoo.com/boss/geo/

Page 7: BOSS

HOW DO I HACK WITH IT?

Page 8: BOSS

THE QUERY

Tells you what the user is looking for

Powers secondary APIs

Can be generated by a search box, URL,

tags or keyword extraction from the page.

Generates related topics

The Query is your BFF!

e.g. http://yboss.yahooapis.com/ysearch/web?q=“Dark Knight”&format=xml

Page 9: BOSS

SAMPLE CALLS

Getting multiple data sets

/ysearch/web,images,news?q=obama

/ysearch/web,images,news?web.q=obama&images.q=flower&news.q=egypt

Searching through sites

A Simple Movie Search

/ysearch/web?q=“Dark Knight”&

sites=movies.yahoo.com,netflix.com,imdb.com

AND/OR operators

/ysearch/web?q="steve

jobs"AND((ipad)OR(iphone))&sites=bestbuy.com,newegg.com

Page 10: BOSS

UNARY OPERATORS

Search for Batman but not “Dark Knight”

q=(batman -“Dark Knight")

Find pages with “Heath Ledger” but not “Dark

Knight”

q=+”heath ledger”–”Dark

Knight”&sites=movies.yahoo.com

AND OR

Page 11: BOSS

OUTPUT

Page 12: BOSS

IMAGE SEARCH PARAMETERS

Search for images that are not offensive

/ysearch/images?q=“san francisco”&filter=yes

Search for images that are wallpaper size

/ysearch/images?q=“san francisco”&dimensions=wallpaper

Search for a image at a certain refer URL

/ysearch/images?q=yahoo&refererurl=http://www.flickr.com

Interesting Output Fields

format, file size, height, width, title, total result count

Page 13: BOSS

NEWS SEARCH PARAMETERS

Search news that is less than 7 days old

/ysearch/news? q=osama&age=7d

Search news that is between 20hrs and 2 days old

/ysearch/news?q=osama&age=20h2d

Re-rank news results by date

/ysearch/news?q=osama&ranking=true

Interesting Output Fields

Source, Date, Source URL

Page 14: BOSS

BOSS + YQL

Table Name: boss.search

e.g. select * from boss.search where ck=… and secret=… and q=‘yahoo’ and service=‘news’

Parameters Example

Consumer Key ck -

Consumer Secret secret -

Query Term q ‘yahoo’

Service service ‘news’

Page 15: BOSS

UNDERSTAND OAUTH

IdentificationConsumer Key – Used to make a call to the API

Consumer 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.0

We have code samples in most languages on BOSS Site

Page 16: BOSS

HACK IDEAS AND USEFUL API’S

RealTime

Twitter/Facebook API

Mobile Applications

Video

YouTube data API

Vertical search engines

Programmable web has interesting API’s

Local + Search

Pull entities using Placespotter and

recognize relationships between content

Chrome extensions

Page 17: BOSS

17

HACK AWAY

1. We have BOSS Keys available for you

Find me if you don’t have them

2. Code samples in the BOSS Docs

3. In depth demo later today

Build a location aware news service

Page 18: BOSS

HACK AWAY!!Rahul Hampole

Sr Product Manager Yahoo! BOSS

[email protected]

@ysearchboss