|« PreviousNext »|
|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
The valid values for the Sort parameter in
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.
|pricerank, price, +price||Order items according to price from cheapest to the most expensive. The three versions of this value are equivalent in meaning but are valid in different search indices.|
|inversepricerank, -price||Order items according to price from the most expensive to the cheapest. The two versions of this value are equivalent in meaning but are valid in different search indices.|
|salesrank||Order items according to how well they've sold, from best to worst sellers.|
|relevancerank||Order items according to how often the keyword appears in the product description, where the keyword appears (for example, the ranking is higher when keywords are found in titles), if there are multiple keywords, how closely they occur in descriptions, and, finally, how often customers purchased the products they found using the keyword.|
|reviewrank||Order items according to how highly rated the item was reviewed by customers where the highest ranked items are listed first and the lowest ranked items are listed last.|
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.