BOSS Overview

URI

URI

boss.yahooapis.com

All examples in this documentation require a Boss App ID. Please add the appid= parameter for proper query execution.

Universal BOSS API Arguments for Web, Images and News

start

Ordinal position of first result. First position is 0. Default sets start to 0.

count

Total number of results to return. Maximum value is 50. Default sets count to 10.

lang

Specifies the language search product to query. See Supported Regions and Languages for Web and News Search. Default sets lang to "en". Must be used in parallel with region. Other language results may appear in results. For strict filtering use the stringlang parameter described below.

region

Specifies which regional (country) search product to query. See Supported Regions and Languages for Web and News Search. Default sets region to "us". Must be used in parallel with lang.

strictlang Default is 0. (no strictness enforced) Setting strictlang=1 activates the strict language filtering based on the lang parameter defined in the query.

format

The data format of the response. Value can be set to either "xml" or "json". Default sets format to "json".

callback

The name of the callback function to wrap the result. Parameter is valid only if format is set to "json". No default value exists.

sites Restrict BOSS search results to a set of pre-defined sites. Multiple sites must be comma separated. Example: (sites=abc.com,cnn.com). The Images service does not yet support multiple sites. Note: This argument can use a single site parameter.
view Retrieve additional search data provided by the respective BOSS service. Please see individual chapters to see what view options are available.
style By default for web search result titles and abstracts contain <b> and </b> HTML tags around the search term. Use style=raw to remove the bold tags around the search terms in titles and abstracts.

Universal BOSS API Query Operators for Web, Images and News

Note

URL encode any reserved characters in the query and parameters before sending the BOSS API call. See Reserved Characters and Escape Values for more information.

Phrase Words

To ensure the exact query keywords are present in the search result, in the exact order, use quotation marks " " around the query keywords.

Example: http://boss.yahooapis.com/ysearch/web/v1/"Apple Pie"?appid=xyz&format=xml

minus Operator

To exclude content that contains certain keywords, use the - (minus) operator. This operator can be used in conjunction with other operators in the search query.

Example 1

Example 2

You can pre-append site: to queries to search for or exclude documents based on the domain of the document:

Syntax: site:<domain_suffix_value>

The domain name from the URL can be broken into fragments, from right to left. The domain name www.widget.org could be matched by any of the following queries:

site:www.widget.orgsite:widget.orgsite:org

To select documents from a site or domain we recommend that you use site:

chocolate cake site:widget.org

You can exclude sites (create a negative domain selection) by using the minus operator with site: in the query. This query (shown unescaped) locates all documents containing the word "food" that do not have a URL containing the domain "suffix com":

food -site:xyz.com

Example

The following is a query example to find recipe pages at epicurious.com that include salt, pepper, ginger, and garlic AND do not include onions:

Note

All dates and times are in GMT.

url vs clickurl

Note

There is a requirement to include the clickurl in anchor link of your search results.

Examine the following XML elements:

You would then generate the following HTML fragment for a search results page:

Table of Contents