搜索Amazon只返回10个项目

搜索Amazon只返回10个项目,amazon,amazon-product-api,Amazon,Amazon Product Api,我正试图从亚马逊获取有关书籍的信息,并提供这些信息。到我自己的网络应用。问题是它只返回了10个结果。我怎样才能在前10次之后得到结果 我假设您使用的是来自Amazon产品广告API的ItemSearch操作 您的请求应该如下所示: http://ecs.amazonaws.com/onca/xml? Service=AWSECommerceService& AWSAccessKeyId=[AWS Access Key ID]& Operation=ItemSearch&

我正试图从亚马逊获取有关书籍的信息,并提供这些信息。到我自己的网络应用。问题是它只返回了10个结果。我怎样才能在前10次之后得到结果

我假设您使用的是来自Amazon产品广告API的ItemSearch操作

您的请求应该如下所示:

http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=ItemSearch&
Keywords=Edward%20Tufte&
SearchIndex=Books
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
这将返回一个如下所示的响应:

<TotalResults>132</TotalResults>
<TotalPages>14</TotalPages>
<Item>
  <ASIN>...</ASIN>
  <DetailPageURL>...</DetailPageURL>
  <ItemAttributes>...</ItemAttributes>
</Item>
<Item>
  <ASIN>...</ASIN>
  <DetailPageURL>...</DetailPageURL>
  <ItemAttributes>...</ItemAttributes>
</Item>
<Item>
  <ASIN>...</ASIN>
  <DetailPageURL>...</DetailPageURL>
  <ItemAttributes>...</ItemAttributes>
</Item>
...
132
14

)

你找到解决方案了吗,我也只得到了10项API版本2011-08-01(当前)上的最大项页面设置为10项
keywords="Edward Tufte"

# itemSearch will create the Amazon Product Advertising request
response=itemSearch(Keywords=keywords, SearchIndex="Books")
# Do whatever you want with the response for the first page
...

# getTotalPagesFromResponse will parse the XML response and return the totalPages
# (14 in the above example). 
totalPages = getTotalPagesFromResponse(response)
If totalPages > 1
  # Note that you cannot go beyond 400 pages (see [1])
  # Or you can limit yourself to a smaller number of pages
  totalPages=min(400,totalPages)

  page=2
  while page < totalPages
    response=itemSearch(Keywords=keywords, SearchIndex="Books", ItemPage=page)
    # Do whatever you want with the response
    ...
    page=page+1