Skip to main content

Amazon Product Advertising API 5.0 wrapper for Python

A simple Python wrapper for the last version of the Amazon Product Advertising API. This module allows to get product information from Amazon using the official API in an easier way. Like Bottlenose you can use cache reader and writer to limit the number of api calls.

PyPI Python GitHub Support Amazon API PyPI - Wheel Documentation Status

Features

  • Object oriented interface for simple usage
  • Get multiple products at once
  • Configurable query caching
  • Compatible with Python versions 3.6 and up
  • Support for AU, BR, CA, FR, IN, IT, JP, MX, ES, TR, MX, AE, UK and US Amazon Product Advertising API endpoints
  • Configurable throttling for batches of queries
  • Ask for new features through the issues section.
  • Full documentation on Read the Docs

Installation

You can install or upgrade the module with:

pip install amazon-paapi5 --upgrade

Usage guide

Search items::

from amazon.paapi import AmazonAPI
amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY)
products = amazon.search_items(keywords='harry potter')
print(product['data'][0].image_large)
print(product['data'][1].prices.price)

Get multiple products information::

from amazon.paapi import AmazonAPI
amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY)
products = amazon.get_items(item_ids=['B01N5IB20Q','B01F9G43WU'])
print(products['data']['B01N5IB20Q'].image_large)
print(products['data']['B01F9G43WU'].prices.price)

Get variations::

from amazon.paapi import AmazonAPI
amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY)
products = amazon.get_variations(asin=['B01N5IB20Q','B01F9G43WU'])

Get browse nodes::

from amazon.paapi import AmazonAPI
amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY)
browseNodes = amazon.get_browse_nodes(browse_node_ids=['473535031'])

Use cache reader and writer::

from amazon.paapi import AmazonAPI

DATA = []

def custom_save_function(url, data, http_info):  
    DATA.append({'url':url, 'data': data, 'http_info':http_info}) 

def custom_retrieval_function(url):  
    for item in DATA:  
        if item["url"] == url: 
            return {'data':item['data'], 'http_info': item['http_info']}  
    return None

amazon = AmazonAPI(KEY, SECRET, TAG, COUNTRY, CacheReader=custom_retrieval_function, CacheWriter=custom_save_function) 
products = amazon.search_items(keywords='harry potter')

Changelog

Version 1.1.3
    - Updated dependencies to fix known vulnerabilities, dropped unused mkdocs dev dependency
    - Hardened response cache deserialization against unsafe pickle payloads (backward compatible)
    - Modernized build/publish GitHub Actions workflows
Version 1.1.2
    - License MIT
Version 1.1.1
    - add additional parameters to api calls
Version 1.1.0
    - CacheReader and CacheWriter available for all the search functions
    - Defintion af AmazonException to get exceptions during the api calls
    - Constants defintion
    - AmazonProduct and AmazonBrowseNode definition
    - Uniform data structure returned by all the api calls
Version 1.0.0
    - CacheReader and CacheWriter
    - Enable throttling
Version 0.1.0
    - First release

Buy Me A Coffee

Release files for amazon-paapi5 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amazon-paapi5 1.1.3
File Size Uploaded
amazon_paapi5-1.1.3.tar.gz 14.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for amazon-paapi5 1.1.3
File Interpreter ABI Platform
amazon_paapi5-1.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 29.0 kB

Release files / amazon_paapi5-1.1.3.tar.gz

Download URL amazon_paapi5-1.1.3.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
729da06087b642264fd66970e8fbee14e8d3167c4d0dde00e628ab811268f8b9
BLAKE2b-256 checksum
How to use checksums
eb6dca508955d3aa73c9fc0e283c6e7babe8d4de6d25963c98d0912582731839
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / amazon_paapi5-1.1.3-py3-none-any.whl

Download URL amazon_paapi5-1.1.3-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4809887208a98a27f77a535e1dba92f2f7d869dbb10b5e4f7df736baac89cc46
BLAKE2b-256 checksum
How to use checksums
765fda911487827501a8c64a1d38b2bdd579455f96773236017c7408d63b9472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page