https://github.com/sergioteula/python-aliexpress-api
AliExpress API wrapper for Python 🧧
https://github.com/sergioteula/python-aliexpress-api
affiliate aliexpress api-wrapper hacktoberfest python python-aliexpress-api python3
Last synced: 5 months ago
JSON representation
AliExpress API wrapper for Python 🧧
- Host: GitHub
- URL: https://github.com/sergioteula/python-aliexpress-api
- Owner: sergioteula
- License: mit
- Created: 2020-11-25T10:51:02.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-20T21:45:02.000Z (over 1 year ago)
- Last Synced: 2025-12-05T07:44:38.440Z (7 months ago)
- Topics: affiliate, aliexpress, api-wrapper, hacktoberfest, python, python-aliexpress-api, python3
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 122
- Watchers: 7
- Forks: 35
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AliExpress API wrapper for Python
A simple Python wrapper for the [AliExpress Open Platform API](https://developers.aliexpress.com/en). This module allows getting information and affiliate links from AliExpress using the official API in an easier way.
[](https://pypi.org/project/python-aliexpress-api/)
[](https://www.python.org/)
[](https://github.com/sergioteula/python-aliexpress-api/blob/master/LICENSE)
[](https://github.com/sergioteula/python-aliexpress-api/issues)
## Features
- Object oriented interface for simple usage.
- Requests follow the [official documentation](https://developers.aliexpress.com/en/doc.htm?docId=45803&docType=2).
- Ask for new features through the [issues](https://github.com/sergioteula/python-aliexpress-api/issues) section.
- Join our [Telegram group](https://t.me/PythonAliExpressAPI) for support or development.
## Installation
You can install or upgrade the module with:
pip install python-aliexpress-api --upgrade
## Usage guide
**Import and initialize the API:**
```python
from aliexpress_api import AliexpressApi, models
aliexpress = AliexpressApi(KEY, SECRET, models.Language.EN, models.Currency.EUR, TRACKING_ID)
```
**Get products information:**
```python
products = aliexpress.get_products_details(['1000006468625', 'https://aliexpress.com/item/1005003091506814.html'])
print(products[0].product_title, products[1].target_sale_price)
```
**Get affiliate link:**
```python
affiliate_links = aliexpress.get_affiliate_links('https://aliexpress.com/item/1005003091506814.html')
print(affiliate_links[0].promotion_link)
```
**Get products:**
```python
response = aliexpress.get_products(keywords='bluetooth earphones', max_sale_price=3000)
print(response.products[0].product_title)
```
**Get hotproducts:**
```python
response = aliexpress.get_hotproducts(keywords='bluetooth earphones', max_sale_price=3000)
print(response.products[0].product_main_image_url)
```
**Get categories:**
```python
parent_categories = aliexpress.get_parent_categories()
child_categories = aliexpress.get_child_categories(parent_categories[0].category_id)
```
## License
Copyright © 2020 Sergio Abad. See [license](https://github.com/sergioteula/python-aliexpress-api/blob/master/LICENSE) for details.