1. Sebastian Rahlf
  2. python-amazon-product-api
  3. Issues
Issue #21 resolved

Pagination can only return first 400 pages

Sebastian Rahlf
repo owner created an issue

When paginating over a result returned by ItemSearch, I face the following problem.

{{{

!pytb

Traceback (most recent call last): File "/home/basti/workspace/amazon/competition.py", line 49, in <module> ResponseGroup='Large', Sort='salesrank'): File "/home/basti/.virtualenvs/amazon-reviews/lib/python2.5/site-packages/amazonproduct.py", line 775, in call root = fun(args, *kwargs) File "/home/basti/.virtualenvs/amazon/lib/python2.5/site-packages/amazonproduct.py", line 489, in item_search return self._parse(fp) File "/home/basti/.virtualenvs/amazon/lib/python2.5/site-packages/amazonproduct.py", line 415, in _parse raise AWSError(code, msg) amazonproduct.AWSError: AWS.ParameterOutOfRange: The value you specified for ItemPage is invalid. Valid values must be between 1 and 400. }}}

My search returns 501 result pages. However, according to the [[http://docs.amazonwebservices.com/AWSECommerceService/2010-11-01/DG/index.html?ItemSearch.html|Documentation]] Valid Values have to be in range "1 to 400 (1 to 5 when the search index = 'All')".

Quick fix: set default value of limit=400.

Comments (3)

  1. Log in to comment