Sorting by Popularity, Price, or Condition

The order in which you present the items returned is important to your customers. Often, they would like to know things, such as, what item is the least expensive, which is the most popular, which items are collectibles? Amazon Associates Web Service provides this functionality using the Sort parameter in ItemSearch, ListLookup, and SellerListingSearch requests.

The valid values for the Sort parameter in ListLookup and SellerListingSearch requests are limited but the same in all locales. Valid values for the Sort parameter in ItemSearch requests, however, vary by locale and search index. For a complete list of valid values, see "ItemSearch Sort Values By Locale."

Some of the most common ItemSearch Sort parameter values are:

For example, the following request:

http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=ItemSearch&
Keywords=Rocket&
SearchIndex=Toys&
Sort=price&
ResponseGroup=Offers&
ItemPage=241

returns a list of toy rockets sorted from the cheapest to the most expensive, as shown in the following response snippet:

<Item>
  <ASIN>B000BOWQWA</ASIN> 
  <OfferSummary>
    <LowestNewPrice>
      <Amount>210</Amount> 
      <CurrencyCode>USD</CurrencyCode> 
      <FormattedPrice>$2.10</FormattedPrice> 
    </LowestNewPrice>
    <TotalNew>3</TotalNew> 
    <TotalUsed>0</TotalUsed> 
    <TotalCollectible>0</TotalCollectible> 
    <TotalRefurbished>0</TotalRefurbished> 
  </OfferSummary>
</Item>
<Item>
  <ASIN>B0006N6MGW</ASIN> 
  <OfferSummary>
    <LowestNewPrice>
      <Amount>211</Amount> 
      <CurrencyCode>USD</CurrencyCode> 
      <FormattedPrice>$2.11</FormattedPrice> 
    </LowestNewPrice>
  <TotalNew>2</TotalNew> 
  <TotalUsed>0</TotalUsed> 
  <TotalCollectible>0</TotalCollectible> 
  <TotalRefurbished>0</TotalRefurbished> 
  </OfferSummary>
</Item>

This response lists two different items (toy rockets), which are ordered by price. The same ASIN can be offered for sale by multiple merchants and sellers. The Offers response group provides a summary of the lowest price per condition. For example, the first item, B000BOWQWA, listed in the response is being sold as "New" by three sellers (<TotalNew>3</TotalNew>). The lowest price of this item in New condition is $2.10. No one is selling this item in Used, Collectible, or Refurbished condition.

All other Sort parameter values work in a similar way.