Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A Python Library for interacting with the Amazon Product Advertising API.

Project description

## orangearrow

### A Python library for interacting with the Amazon Product Advertising API.

#### What is it?

[orangearrow]( is a Python library that simplifies usage of the [Amazon Product Advertising API]( It aims to be easy to use, flexible and gets out of your way when you need it to.

#### What do I need to get started?

You will need an Amazon Associate Tag and Amazon API credentials. All of that is covered [here](

#### How do I use it?

To use Search or Lookup functionality, first create an instance of the `AmazonProductAPI` class. You will need to pass your Amazon API credentials like so:

from orangearrow import AmazonProductAPI

amazon_api = AmazonProductAPI(

##### Search

To search for items, use the `item_search` method with a valid [Search Index]( and a list of keywords:

search_response = amazon_api.item_search(
['Television', 'Flatscreen',]

You can also optionally pass a `page` parameter to paginate results:

search_response = amazon_api.item_search(
['Television', 'Flatscreen',],

As well as specifying [Response Groups]( to filter the information that you want returned:

search_response = amazon_api.item_search(
['Television', 'Flatscreen',],
response_groups=['Variations', 'Reviews',],

To customize the request even further, you can add any [ItemSearch parameters supported by the Amazon API]( into a `parameters` dictionary:

search_response = amazon_api.item_search(
['Television', 'Flatscreen',],
'Brand': 'Sony',
'MaximumPrice': '50000',

##### Item Lookup

The `item_lookup` method can be used to look up individual items by their ASIN ID:

product_response = amazon_api.item_lookup('B07D4FQB8S')

Or by a different supported [IdType]( and [Search Index](

product_response = amazon_api.item_lookup(

Similar to the `search` method, `response_groups` and extra `parameters` supported by [ItemSearch]( may also be used:

product_response = amazon_api.item_lookup(
parameters={'TruncateReviewsAt': 200}

##### Similarity Lookup

The `similarity_lookup` method can be used to find similar items for one or more ASIN values:

similarities_response = amazon_api.similarity_lookup(['B00JFC9ALE', 'B06XY1YTMJ'])

This method will also accept `response_groups` and additional `parameters` that are supported by [Similarity Lookup](

similarities_response = amazon_api.similarity_lookup(
['B00JFC9ALE', 'B06XY1YTMJ'],
parameters={'MerchantId': 'Amazon'}

##### Responses

In the Search and Lookup examples above, an instance of `AmazonProductAPIResponse` will be returned. The returned data can be accessed in a dictionary via the `data` property of the response:

Or the raw XML can be accessed via the `raw_response_content` property:


If any errors occurred, the following properties will contain error information:


The instance will also contain the response's status code and headers:


Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for orangearrow, version 0.9.64
Filename, size File type Python version Upload date Hashes
Filename, size orangearrow-0.9.64-py3-none-any.whl (5.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size orangearrow-0.9.64.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page