BAE
BAE

Reputation: 8936

Why I get only 50 items by python-amazon-product-api.AmazonAPI.search

I am using https://github.com/yoavaviram/python-amazon-simple-product-api. Each time the number of returned items is 50, even if I used search_n(100, ...). Anybody knows why? Where to set the maximum number? Thanks

    amazon = AmazonAPI('key',
            'key2',
            'key3',
            MaxQPS=0.9,
            Region='US')
    try:
            products = amazon.search_n(100, Keywords='drone', SearchIndex='All')
            for i, product in enumerate(products):
                 print_statement


    except Exception as e:
            print "Exception while searching Amazon:"+str(e)

Upvotes: 0

Views: 808

Answers (3)

Juno Nguyen
Juno Nguyen

Reputation: 1

You can find the maximum number of returned page here.
The Maximum Page Number of ItemLookup operation is 150 and of ItemSearch is 10 pages.

Upvotes: 0

yoav.aviram
yoav.aviram

Reputation: 1802

Amazon documentation about ItemPage parameter:

Valid values: 1 to 10 (1 to 5 when search index is All)

Upvotes: 1

AlejandroVK
AlejandroVK

Reputation: 7605

I'm facing the same problem, and it seems to be because Amazon restricts the number of pages to 10. So you can get a maximum of 100 products. You can try to refine the search to be more precise, and then you might narrow the search and obtain more products you're really interested in.

The search you're making there is too broad. Try to change it to something like:

products = amazon.search(Keywords='Drone', Title='Drone', SearchIndex='Electronics')

Hope this helps...

Upvotes: 0

Related Questions