A simple Python wrapper for the Amazon Product Advertising API 5.0. Easily interact with Amazon's official API to retrieve product information, search for items, and more.
- π― Simple object-oriented interface for easy integration
- π Product search by keywords, categories, or browse nodes
- π¦ Product details via ASIN or Amazon URL
- π Item variations support (size, color, etc.)
- π 20+ countries supported (full list)
- β‘ Batch requests to get multiple items without the 10-item limit
- π‘οΈ Built-in throttling to avoid API rate limits
- π Full type hints for better IDE support
pip install python-amazon-paapi --upgradefrom amazon_paapi import AmazonApi
# Initialize the API (get credentials from Amazon Associates)
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY)
# Get product information by ASIN
item = amazon.get_items('B01N5IB20Q')[0]
print(item.item_info.title.display_value)items = amazon.get_items(['B01N5IB20Q', 'B01F9G43WU'])
for item in items:
print(item.images.primary.large.url)
print(item.offers.listings[0].price.amount)item = amazon.get_items('https://www.amazon.com/dp/B01N5IB20Q')results = amazon.search_items(keywords='nintendo switch')
for item in results.items:
print(item.item_info.title.display_value)variations = amazon.get_variations('B01N5IB20Q')
for item in variations.items:
print(item.detail_page_url)nodes = amazon.get_browse_nodes(['667049031', '599385031'])
for node in nodes:
print(node.display_name)from amazon_paapi import get_asin
asin = get_asin('https://www.amazon.com/dp/B01N5IB20Q')
# Returns: 'B01N5IB20Q'Control the wait time between API calls to avoid rate limits:
# Wait 4 seconds between requests
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=4)
# No throttling (use with caution)
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=0)- π Full Documentation
- π Changelog
- π¬ Telegram Support Group
Contributions are welcome! To get started:
- Install uv package manager
- Clone and set up the project:
git clone https://github.com/sergioteula/python-amazon-paapi.git
cd python-amazon-paapi
uv sync
uv run pre-commit install- Copy
.env.templateto.envand add your Amazon API credentials for integration tests.
Pre-commit hooks will automatically run Ruff, mypy, and tests before each commit.
MIT License Β© 2026 Sergio Abad