Skip to content

Commit 3ef5cab

Browse files
committed
updated readme
1 parent 7b9fa26 commit 3ef5cab

File tree

1 file changed

+61
-63
lines changed

1 file changed

+61
-63
lines changed

README.md

Lines changed: 61 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,129 @@
1-
# Amazon Product Advertising API 5.0 wrapper for Python
1+
# Python Amazon PAAPI
22

3-
A simple Python wrapper for the [last version of the Amazon Product Advertising
4-
API](https://webservices.amazon.com/paapi5/documentation/quick-start/using-sdk.html).
5-
This module allows interacting with Amazon using the official API in an easier way.
3+
A simple Python wrapper for the [Amazon Product Advertising API 5.0](https://webservices.amazon.com/paapi5/documentation/). Easily interact with Amazon's official API to retrieve product information, search for items, and more.
64

75
[![PyPI](https://img.shields.io/pypi/v/python-amazon-paapi?color=%231182C2&label=PyPI)](https://pypi.org/project/python-amazon-paapi/)
8-
[![Python](https://img.shields.io/badge/Python->3.9-%23FFD140)](https://www.python.org/)
6+
[![Python](https://img.shields.io/badge/Python-3.9-%23FFD140)](https://www.python.org/)
97
[![License](https://img.shields.io/badge/License-MIT-%23e83633)](https://github.com/sergioteula/python-amazon-paapi/blob/master/LICENSE)
108
[![Amazon API](https://img.shields.io/badge/Amazon%20API-5.0-%23FD9B15)](https://webservices.amazon.com/paapi5/documentation/)
11-
[![PyPI - Downloads](https://img.shields.io/pypi/dm/python-amazon-paapi?label=Installs)](https://pypi.org/project/python-amazon-paapi/)
9+
[![Downloads](https://img.shields.io/pypi/dm/python-amazon-paapi?label=Downloads)](https://pypi.org/project/python-amazon-paapi/)
1210

1311
## Features
1412

15-
- Object oriented interface for simple usage.
16-
- Get information about a product through its ASIN or URL.
17-
- Get item variations or search for products on Amazon.
18-
- Get browse nodes information.
19-
- Get multiple results at once without the 10 items limitation from Amazon.
20-
- Configurable throttling to avoid requests exceptions.
21-
- Type hints to help you coding.
22-
- Support for [all available countries](https://github.com/sergioteula/python-amazon-paapi/blob/956f639b2ab3eab3f61644ae2ca8ae6500881312/amazon_paapi/models/regions.py#L1).
23-
- Ask for new features through the [issues](https://github.com/sergioteula/python-amazon-paapi/issues) section.
24-
- Join our [Telegram group](https://t.me/PythonAmazonPAAPI) for support or development.
25-
- Check the [documentation](https://python-amazon-paapi.readthedocs.io/en/latest/index.html) for reference.
26-
- See the [changelog](https://github.com/sergioteula/python-amazon-paapi/blob/master/CHANGELOG.md) for version history.
13+
- 🎯 **Simple object-oriented interface** for easy integration
14+
- 🔍 **Product search** by keywords, categories, or browse nodes
15+
- 📦 **Product details** via ASIN or Amazon URL
16+
- 🔄 **Item variations** support (size, color, etc.)
17+
- 🌍 **20+ countries** supported ([full list](https://github.com/sergioteula/python-amazon-paapi/blob/master/amazon_paapi/models/regions.py))
18+
-**Batch requests** to get multiple items without the 10-item limit
19+
- 🛡️ **Built-in throttling** to avoid API rate limits
20+
- 📝 **Full type hints** for better IDE support
2721

2822
## Installation
2923

30-
You can install or upgrade the module with:
31-
32-
pip install python-amazon-paapi --upgrade
33-
34-
## Usage guide
24+
```bash
25+
pip install python-amazon-paapi --upgrade
26+
```
3527

36-
**Basic usage:**
28+
## Quick Start
3729

3830
```python
3931
from amazon_paapi import AmazonApi
32+
33+
# Initialize the API (get credentials from Amazon Associates)
4034
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY)
35+
36+
# Get product information by ASIN
4137
item = amazon.get_items('B01N5IB20Q')[0]
42-
print(item.item_info.title.display_value) # Item title
38+
print(item.item_info.title.display_value)
4339
```
4440

45-
**Get multiple items information:**
41+
## Usage Examples
42+
43+
### Get Multiple Products
4644

4745
```python
4846
items = amazon.get_items(['B01N5IB20Q', 'B01F9G43WU'])
4947
for item in items:
50-
print(item.images.primary.large.url) # Primary image url
51-
print(item.offers.listings[0].price.amount) # Current price
48+
print(item.images.primary.large.url)
49+
print(item.offers.listings[0].price.amount)
5250
```
5351

54-
**Use URL instead of ASIN:**
52+
### Use Amazon URL Instead of ASIN
5553

5654
```python
5755
item = amazon.get_items('https://www.amazon.com/dp/B01N5IB20Q')
5856
```
5957

60-
**Get item variations:**
58+
### Search Products
6159

6260
```python
63-
variations = amazon.get_variations('B01N5IB20Q')
64-
for item in variations.items:
65-
print(item.detail_page_url) # Affiliate url
61+
results = amazon.search_items(keywords='nintendo switch')
62+
for item in results.items:
63+
print(item.item_info.title.display_value)
6664
```
6765

68-
**Search items:**
66+
### Get Product Variations
6967

7068
```python
71-
search_result = amazon.search_items(keywords='nintendo')
72-
for item in search_result.items:
73-
print(item.item_info.product_info.color) # Item color
69+
variations = amazon.get_variations('B01N5IB20Q')
70+
for item in variations.items:
71+
print(item.detail_page_url)
7472
```
7573

76-
**Get browse node information:**
74+
### Get Browse Node Information
7775

7876
```python
79-
browse_nodes = amazon.get_browse_nodes(['667049031', '599385031'])
80-
for browse_node in browse_nodes:
81-
print(browse_node.display_name) # The name of the node
77+
nodes = amazon.get_browse_nodes(['667049031', '599385031'])
78+
for node in nodes:
79+
print(node.display_name)
8280
```
8381

84-
**Get the ASIN from URL:**
82+
### Extract ASIN from URL
8583

8684
```python
8785
from amazon_paapi import get_asin
86+
8887
asin = get_asin('https://www.amazon.com/dp/B01N5IB20Q')
88+
# Returns: 'B01N5IB20Q'
8989
```
9090

91-
**Throttling:**
91+
### Configure Throttling
9292

93-
Throttling value represents the wait time in seconds between API calls, being the
94-
default value 1 second. Use it to avoid reaching Amazon request limits.
93+
Control the wait time between API calls to avoid rate limits:
9594

9695
```python
97-
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=4) # Makes 1 request every 4 seconds
98-
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=0) # No wait time between requests
96+
# Wait 4 seconds between requests
97+
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=4)
98+
99+
# No throttling (use with caution)
100+
amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=0)
99101
```
100102

101-
## Contribution
103+
## Documentation
104+
105+
- 📖 [Full Documentation](https://python-amazon-paapi.readthedocs.io/)
106+
- 📋 [Changelog](https://github.com/sergioteula/python-amazon-paapi/blob/master/CHANGELOG.md)
107+
- 💬 [Telegram Support Group](https://t.me/PythonAmazonPAAPI)
108+
109+
## Contributing
102110

103-
Creating pull requests for this repo is highly appreciated to add new features or solve
104-
bugs. To help during development process, follow these steps:
111+
Contributions are welcome! To get started:
105112

106113
1. Install [uv](https://docs.astral.sh/uv/) package manager
107-
2. Clone the repository and install dependencies:
114+
2. Clone and set up the project:
108115

109116
```bash
110117
git clone https://github.com/sergioteula/python-amazon-paapi.git
111118
cd python-amazon-paapi
112119
uv sync
113-
```
114-
115-
3. Set up pre-commit hooks:
116-
117-
```bash
118120
uv run pre-commit install
119121
```
120122

121-
4. Copy `.env.template` to `.env` and fill in your Amazon API credentials for integration tests.
123+
3. Copy `.env.template` to `.env` and add your Amazon API credentials for integration tests.
122124

123-
The pre-commit hooks will run Ruff (linting and formatting), mypy (type checking), and
124-
tests before each commit. The same checks will also run on the repo with GitHub Actions
125-
to ensure all tests pass before merge.
125+
Pre-commit hooks will automatically run Ruff, mypy, and tests before each commit.
126126

127127
## License
128128

129-
Copyright © 2026 Sergio Abad. See
130-
[license](https://github.com/sergioteula/python-amazon-paapi/blob/master/LICENSE) for
131-
details.
129+
MIT License © 2026 [Sergio Abad](https://github.com/sergioteula)

0 commit comments

Comments
 (0)