Blair Anderson
Blair Anderson

Reputation: 20181

Amazon: product advertising api pagination top sellers

Is this a limitation of the amazon API?

I would like to pull data similar to this page: amazon.com/Best-Sellers-Home-Improvement-Pumps-Plumbing-Equipment/zgbs/hi/13749581/ref=zg_bs_nav_hi_1_hi

STACKOVERFLOW BREAKS THIS LINK!

am using:

operation: 'BrowseNodeLookup',
response_group: "BrowseNodeInfo,TopSellers"

The TopSeller response group only returns 10 items and does not respond to ItemPage.

Is there a way to do item lookup without a query using a browse node and sorting by popularity?

Upvotes: 4

Views: 1236

Answers (1)

Chris Nauroth
Chris Nauroth

Reputation: 9854

The AWS documentation on the BrowseNodeLookup API and the TopSellers response group indicates that it only includes the top 10, and there is no mention of pagination.

The TopSellers response group returns the ASINs and titles of the 10 best sellers within a specified browse node.

However, the results from TopSellers are basically equivalent to the results of an ItemSearch with Sort set to salesrank. Therefore, you can solve pagination requirements as follows:

  1. On initial load (such as a user loading a web page or opening a particular view in a mobile application), issue BrowseNodeLookup and retrieve TopSellers. Populate some portion of the UI with information from the browse node and some other portion of the UI with the TopSellers results.
  2. If the user never goes past the first page, then do nothing more. (There is no need to spend time on an additional service call.)
  3. As the user navigates to subsequent pages, issue ItemSearch with Sort set to salesrank and ItemPage set to the page number. Use these results to update the portion of the web page/view in your application that was previously populated from the browse node TopSellers.

Note that you will still only be able to retrieve up to 10 pages worth of results. This is an ItemSearch API limitation.

Upvotes: 2

Related Questions