SearchBins Response Group

The SearchBins response group groups 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. The basis on which the items are split into bins is specified by the NarrowBy attribute in the SearchBinSet tag. To refine the search, you make repeated requests using the NarrowBy values.

ItemSearch returns the first twenty-five bins of results.

For more information about search bins, see Using Search Bins to Find Items.

US locale only.

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 include:

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

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

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.

Operations that can use this response group include:

The following table describes the elements returned by SearchBins. In the Ancestry column, the elements on the left side of a slash mark are the parents of the elements on the right side of the slash mark.

SearchBins also returns the elements that all response groups return, which is described in Elements Common to All Response Groups.

The following response groups are parent response groups of SearchBins.

The following response groups are child response groups of SearchBins.

The following request was used to illustrate the XML response elements returned by SearchBins.

http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=ItemSearch&
MerchantId=A363XKZVKSMVXW&
Condition=All&
SearchIndex=SportingGoods&
Keywords=Glove&
ResponseGroup=SearchBins&
Version=2007-10-29

The following response snippet shows the elements returned by SearchBins.

<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>

Notice that the NarrowBy value is PriceRange.