How to access over 10 details in Amazon api using php?

I am working with amazon api and used code from online sources http://www.codediesel.com/php/accessing-amazon-product-advertising-api-in-php/ .

I would like to get more than 10 product details when I make a search query using amazon api. I know about the Amazonian api policy to get 10 data per call, but is it possible to get more data by creating a loop or something like that?

When I make a request, I assigned the following parameters

$parameters = array("Operation" => "ItemSearch", "SearchIndex" => "Electronics", "ResponseGroup" => "Images,ItemAttributes,EditorialReview,Offers ", "ItemPage"=>"10", "Keywords" => $search ); 

So, although I asked for 10 pages of the result, I'm not sure how to display data from each page (from 1 to 10), so in the end I get 100 elements when I execute the query. I get the following response when I try to run the code:

 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) ) 
+7
source share
2 answers

Yes, you will need to go through 10 times and add an array or object. The AWS documentation says that ItemPage is actually a results page, so you just need to view it 10 times to get 100 results.

AWS Documentation on ItemPage :

http://docs.aws.amazon.com/AWSECommerceService/latest/DG/PagingThroughResults.html

 $obj = new AmazonProductAPI(); $results = array(); for ($i=1;$i<=10;$i++) { $parameters = array("Operation" => "ItemSearch", "SearchIndex" => "Electronics", "ResponseGroup" => "Images,ItemAttributes,EditorialReview,Offers ", "ItemPage"=>$i, "Keywords" => $search); $results[] = $obj->searchProducts($parameters); } foreach ($results as $r) { //do your stuff } 
+4
source

We can use the manufacturer parameter along with BrowseNode to retrieve more than 100 products in a specific category.

-one
source

All Articles