我正在使用 amazon api,并使用了来自在线资源http://www.codediesel.com/php/accessing-amazon-product-advertising-api-in-php/的代码。
当我使用 amazon api 进行搜索查询时,我想获得 10 多个产品的详细信息。我知道每次调用获取 10 个数据的 amazon api 政策,但是否可以通过创建循环或其他方式获取更多数据?
当我提出请求时,我分配了以下参数
$parameters = array("Operation" => "ItemSearch",
"SearchIndex" => "Electronics",
"ResponseGroup" => "Images,ItemAttributes,EditorialReview,Offers ",
"ItemPage"=>"10",
"Keywords" => $search );
因此,即使我要求了 10 页的结果,但我不确定如何显示每一页(1 到 10)的数据,所以当我进行查询时,我总共得到 100 个项目。当我尝试运行代码时,我得到以下响应:
SimpleXMLElement Object (
[Request] => SimpleXMLElement Object (
[IsValid] => True
[ItemSearchRequest] => SimpleXMLElement Object (
[ItemPage] => 10
[Keywords] => laptop
[ResponseGroup] => Array (
[0] => Images
[1] => ItemAttributes
[2] => EditorialReview
[3] => Offers
)
[SearchIndex] => Electronics
)
)
[TotalResults] => 3383691
[TotalPages] => 338370
[MoreSearchResultsUrl] => http://www.amazon.co.uk/gp/redirect.html?camp=2025&creative=12734&location=http%3A%2F%2Fwww.amazon.co.uk%2Fgp%2Fsearch%3Fkeywords%3Dlaptop%26url%3Dsearch-.................(and on)
)