Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Product Advertising API - How I can fetch more than 100 results with ItemSearch?

does the ItemSearch operation have parameters like offset? I need to fetch more than 100 results, I don't mind if I have to execute more queries.

The parameters I use are the following:

'Service' => "AWSECommerceService",
'AssociateTag' => [TAG],
'AWSAccessKeyId' => [ID],
'Operation' => "ItemSearch",
'BrowseNode' => "2445220011",
'Condition' => "All",
'ItemPage' => $_GET["p"],
'Timestamp' => date("Y-m-d\TH:i:s.\\0\\0\\0\\Z"),
'ResponseGroup' => "ItemAttributes",
'SearchIndex' => "VideoGames"
like image 466
Flavio Li Volsi Avatar asked Dec 25 '22 16:12

Flavio Li Volsi


2 Answers

You can add parameters like MinPrice & MaxPrice and send your request in different price ranges to get more that 100 results. But still you end up having 100 products for that price range.

You can even add Keyword parameter i your request and can send different closely related values for this parameter.

like image 71
Upinder Avatar answered Dec 28 '22 07:12

Upinder


Per the documentation:

ItemSearch returns up to ten search results per page.

The ItemPage parameter enables you to return a specified page of results. The maximum ItemPage number that can be returned is 10.

This is seemingly impossible, and your only option is likely to capture MoreSearchResultsURL out of the response:

MoreSearchResultsURL: The URL where the complete search results are displayed. The URLs provided in the search results are the exact ones that you should use when you link back to Amazon.com. They are tagged with your Associate tag and contain other tracking information to increase your hourly request limit as the sales that you generate increase.

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

like image 37
brandonscript Avatar answered Dec 28 '22 05:12

brandonscript