How to Get Amazon Product Price Using Your Name

I'm sorry if it is considered a duplicate, but I tried all the python modules that can communicate with the Amazon API, but unfortunately they still need a product identifier to get the exact price! and I need a price from the product name!

Finally, I tried the Bottlenose extension with its name python-amazon-simple-product-api , except that it has the same problem: how to get only the price from the product name.

here is what i tried:

product = api.search(Keyword = "playstation", SearchIndex='All') for i, produ in enumerate(product): print "{0}. '{1}'".format(i, produ.title) 

(this is the same result as when using produ.price_and_currency , which in the example with the file is used with the identifier)

and then give me this error:

 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build\bdist.win-amd64\egg\amazon\api.py", line 174, in __iter__ File "build\bdist.win-amd64\egg\amazon\api.py", line 189, in iterate_pages File "build\bdist.win-amd64\egg\amazon\api.py", line 211, in _query amazon.api.SearchException: Amazon Search Error: 'AWS.MinimumParameterRequirement', 'Your request should have atleast 1 of the following parameters: 'Keywords','Title','Power','BrowseNode','Artist','Author','Actor','Director','AudienceRati g','Manufacturer','MusicLabel','Composer','Publisher','Brand','Conductor','Orchestra','Tex Stream','Cuisine','City','Neighborhood'.' 

Edit: after correcting Keyword to Keywords I get a temporary response (infinite loop! And tried its time-out time)! not like returning all of the XML, but when using only bottlenose, I get tags that have no price or anything else ...

 <ItemLink> <Description>Technical Details</Description> <URL>http://www.amazon.com/*****</URL> </ItemLink> 

Update2: it seems that amazon will return ALL results, therefore, how to limit this to only the first bucket (because it gives results from 10 results )

+4
source share
2 answers

sorry for the delay, decided:

pagination is done using search_n :

 test = api.search_n(10, Keywords='example name', SearchIndex='All') # this will return only 10 results 

Link

0
source

Without Amazon API Experience: This is a matter of proper and reasonable search. Think about it carefully and read

http://docs.amazonwebservices.com/AWSECommerceService/2011-08-01/DG/ItemSearch.html

so that you don’t miss any important search function.

The response contains something from 0 to 20 million elements, depending on how smart the search query was. In any case, the elements in the response identify themselves through their ASIN, product identifier. Example: <ASIN>B00021HBN6</ASIN>

After collecting ASIN through ItemSearch you can run an ItemLookup on these items to find additional information, such as price.

+1
source

Source: https://habr.com/ru/post/1435755/


All Articles