| Did this page help you? Yes No Tell us about it... |
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? Product Advertising API provides
this functionality using the Sort parameter in ItemSearch
requests.
The valid values for the Sort parameter in ItemSearch
requests 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
described in the following table.
For example, the following request returns a list of toy rockets sorted from the cheapest to the most expensive.
http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=ItemSearch&
Keywords=Rocket&
SearchIndex=Toys&
Sort=price&
ResponseGroup=Offers&
ItemPage=10
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
The following is a snippet of the response.
<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.