SearchBins Response Group

Description

The SearchBins Response Group categorizes the items returned by ItemSearch into bins. A set of bins, for example, can be a set of price ranges for a product. In the case of women’s shoes, for example, you might have a bin that returns ASINs for shoes that cost between $0 and $50, a second bin for shoes that cost $50 to $100, and a third bin for shoes that cost more than $100.

Availability

US only

NarrowBy

The basis on which the items are split into bins is specified by the NarrowBy attribute in the SearchBinSet tag. In the following example, the NarrowBy attribute shows that the bins are based on price range:

<SearchBinSet NarrowBy="PriceRange">

For another product category, the NarrowBy attribute might be different, for example:

<SearchBinSet NarrowBy="BrandName">

You cannot specify NarrowBy values nor can you specify the values they encompass. When SearchBins is included as a Response Group in a request, ItemSearch automatically divides the ItemSearch results into bins.

NarrowBy Values

NarrowBy values include:

All Search Indices return the Subject bin. Most return all of the bins.

NarrowBy Values by Search Index

The following list shows which NarrowBy values are returned by each Search Index:

Element Tags in a Bin

The element tags in a bin vary according to the bin. For example, in bins based on price, the elements and Name values are:

<BinName>
	<BinItemCount>
	<BinParameter>
	   <Name>MinimumPrice</Name>
		<Value>
	<BinParameter>
		<Name>MaximumPrice</Name>
		<Value>

The elements show the minimum and maximum price for items in that bin, and the number of items in that bin.

Other NarrowBy values use other element tags in their bins. For example, when NarrowBy is “Brand,” the element tags and Name values are:

<Bin>
	<BinName> 
	<BinItemCount> 
	<BinParameter>
		<Name>Brand</Name> 
		<Value> 

You cannot specify the element tags returned in a bin.

Drilling Down

You can take the values in a bin and add them to the ItemSearch query to filter out of the response items that are outside of that bin. To narrow the search results to shirts that cost between $0 and $25, for example, you would add the following Name and its corresponding value as additional parameters in the original ItemSearch request:

&MinimumPrice=0
&MaximumPrice=2499

You could narrow the search results even further by adding an additional parameter to the query. For example, you could specify

&Brand=Levi’s

The response would then only include shirts by Levi’s that cost under $25. You could continue to drill down by adding additional parameters to the request.

Notice that in each case the results were narrowed down by adding the value tagged with Name and its corresponding value to the original ItemSearch request.

SearchBin Example

The following request asks for gloves:

http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[Your Access Key ID Here]&
Operation=ItemSearch&
MerchantId=A363XKZVKSMVXW&
Condition=All&
SearchIndex=SportingGoods&
Keywords=Glove&
ResponseGroup=SearchBins

The following response snippet shows the first ASINS and the first two bins for each NarrowBy value returned in the response:

 <Item>
	<ASIN>B00005R2GR</ASIN> 
 </Item>
 <Item>
	<ASIN>B00076ZDV8</ASIN> 
 </Item>
 <Item>
	 <ASIN>B00092FEEG</ASIN> 
 </Item>
 <Item>
	 <ASIN>B000ADTP1W</ASIN> 
 </Item>
<SearchBinSets>
	<SearchBinSet NarrowBy="PriceRange">
		<Bin>
			  <BinName>$25-$49</BinName> 
			  <BinItemCount>316</BinItemCount> 
		<BinParameter>
			  <Name>MinimumPrice</Name> 
			  <Value>2500</Value> 
		 </BinParameter>
		<BinParameter>
			  <Name>MaximumPrice</Name> 
			  <Value>4999</Value> 
		  </BinParameter>
		</Bin>
	</SearchBinSet>
		<Bin>
		  <BinName>$0-$24</BinName> 
		  <BinItemCount>280</BinItemCount> 
		<BinParameter>
		  <Name>MinimumPrice</Name> 
		  <Value>0</Value> 
		  </BinParameter>
		<BinParameter>
		  <Name>MaximumPrice</Name> 
		  <Value>2499</Value> 
		  </BinParameter>
		  </Bin>
 </SearchBinSet>
				
<SearchBinSet NarrowBy="BrandName">
	<Bin>
	  <BinName>Rawlings</BinName> 
	  <BinItemCount>71</BinItemCount> 
	<BinParameter>
	  <Name>Brand</Name> 
	  <Value>Rawlings</Value> 
	  </BinParameter>
	  </Bin>
	<Bin>
	  <BinName>Body Glove</BinName> 
	  <BinItemCount>53</BinItemCount> 
	<BinParameter>
	  <Name>Brand</Name> 
	  <Value>Body Glove</Value> 
	  </BinParameter>
	  </Bin>
</SearchBinSet>
	  
<SearchBinSet NarrowBy="Merchant">
	<Bin>
	  <BinName>Sports"R"Us</BinName> 
	  <BinItemCount>860</BinItemCount> 
	<BinParameter>
	  <Name>MerchantId</Name> 
	  <Value>A363XKZVKSMVXW</Value> 
	  </BinParameter>
	  </Bin>
	<Bin>
	  <BinName>Target</BinName> 
	  <BinItemCount>8</BinItemCount> 
	<BinParameter>
	  <Name>MerchantId</Name> 
	  <Value>A1VC38T7YXB528</Value> 
	  </BinParameter>
	  </Bin>
</SearchBinSet>
	
<SearchBinSet NarrowBy="Subject">
	<Bin>
	  <BinName>Categories</BinName> 
	  <BinItemCount>860</BinItemCount> 
	<BinParameter>
	  <Name>BrowseNode</Name> 
	  <Value>3375301</Value> 
	  </BinParameter>
	  </Bin>
	<Bin>
	  <BinName>Baseball</BinName> 
	  <BinItemCount>311</BinItemCount> 
	<BinParameter>
	  <Name>BrowseNode</Name> 
	  <Value>3395731</Value> 
	  </BinParameter>
	  </Bin>
</SearchBinSet>

The response has two large parts. The first part is the list of ASINs that satisfy the request. The remainder of the response shows the first two bins in each NarrowBy value. There are several things to notice:

Understanding BrowseNode Results When Drilling Down

BrowseNodes are related in a hierarchy where one BrowseNode can have zero or more ancestor and child BrowseNodes, as shown in the following figure.

Hierarchy of BrowseNodes

This diagram shows five BrowseNodes and their hierarchy. Node A might be, for example, Shoes. Node B might be Women. Node C, a child of BrowseNodes A and B, might be Women’s Shoes.

The number inside each node represents the number of items in the BrowseNode when ItemSearch is called on Node A. BrowseNode C is a subset of BrowseNode A and a subset of BrowseNode B. Perhaps fifty of the items in BrowseNode C are also in BrowseNode A. When ItemSearch was run on BrowseNode A, the operation returned that BrowseNode A has 200 items. When ItemSearch is repeated using a BinParameter Name value that was returned in the first ItemSearch request, it is the same as running ItemSearch on a child of BrowseNode A, which, in this case, is BrowseNode C. By narrowing the search to only those values found in BrowseNode C, ItemSearch returns only those items in BrowseNode A that are also in BrowseNode C. As shown in the following figure, the number of common items is 35.

Drilling Down Changes Item Count in BrowseNodes

As a result, ItemSearch returns that BrowseNode A now only contains 35 items. While the change in the item count in BrowseNode A might, at first, be confusing, understanding that ItemSearch is returning only the intersection of BrowseNodes A and C explains why the number of items in BrowseNode A changes. Notice that the item counts in other BrowseNodes can also change.

Because the number of items in surrounding BrowseNodes can change with each new drilldown using ItemSearch, the BrowseNodes that contain the greatest number of items can change dramatically. In the previous discussion, for example, the number of items in BrowseNode A changed from 200 to 35 on successive ItemSearch requests. Because ItemSearch returns only the top ten BrowseNodes that contain the most items, the identity of the top ten BrowseNodes can change with each ItemSearch.