Hack 32 Sort Books by Average Customer Rating


Use customer ratings as a guide to which books you should be looking at.

Average customer ratings are one of those aggregate features where it's not the voice of a single Amazon user giving advice, but rather it's the collective advice of everyone who has written a review. Each review includes a 1-5 star rating, and the average review reflects the group opinion of a book.

32.1 Sorting Search Results

You can sort any search results by choosing Avg. Customer Review from the "Sort by:" drop-down menu on any results page (see Figure 3-3). Make the selection and click Go! to reorder the results.

Figure 3-3. Sorting by Average Customer Review

If you're performing power searches via a URL [Hack #9], you can sort by review with the rank variable set to reviewrank:


If you have a specific set of books that you'd like to sort by review rank, you can use a power search and include each ASIN:


This query looks for the products 0596004478, 0596004605, and 0596004613 and sorts the results by average customer rating.

As with most sorting-related values, you can specify + or - in front of the value to reverse the results. For example, you can specify -reviewrank to sort in reverse order: from lowest to highest customer review.

32.2 Sorting Web Services Queries

Web Services XML/HTTP queries Section 6.6 use the same method with the sort variable in the URL.

http://xml.amazon.com/onca/xml2?t=insert affiliate tag &dev-t=insert dev  [RETURN]
token &type=heavy&f=xml&mode=books&KeywordSearch=Hacks&sort=+reviewrank