Menu
Product Advertising API
Developer Guide (API Version 2013-08-01)

Providing Price Ranges for Product Categories

You can use the SearchBins response group to return the price ranges of items for sale in a specified product category. The following response to an ItemSearch request shows how the SearchBins response group can provide price ranges.

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

This response shows that there are 316 items in this product category that cost between $25 and $49 and 280 items that cost between $0 and $24.

Knowing what price ranges are available for a product category enables you to use the MaximumPrice and MinimumPrice parameters in a second ItemSearch request to retrieve items only in the specified price range. Using one of the offer response groups in the same request enables you to display the prices of the items in a specified price range.