Skip to content

sergioteula/python-aliexpress-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AliExpress API wrapper for Python

A simple Python wrapper for the AliExpress Open Platform API. This module allows getting information and affiliate links from AliExpress using the official API in an easier way.

PyPI Python License Support

Features

Installation

You can install or upgrade the module with:

pip install python-aliexpress-api --upgrade

Usage guide

Import and initialize the API:

from aliexpress_api import AliexpressApi, models
aliexpress = AliexpressApi(KEY, SECRET, models.Language.EN, models.Currency.EUR, TRACKING_ID)

Get products information:

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:

affiliate_links = aliexpress.get_affiliate_links('https://aliexpress.com/item/1005003091506814.html')
print(affiliate_links[0].promotion_link)

Get products:

response = aliexpress.get_products(keywords='bluetooth earphones', max_sale_price=3000)
print(response.products[0].product_title)

Get hotproducts:

response = aliexpress.get_hotproducts(keywords='bluetooth earphones', max_sale_price=3000)
print(response.products[0].product_main_image_url)

Get categories:

parent_categories = aliexpress.get_parent_categories()
child_categories = aliexpress.get_child_categories(parent_categories[0].category_id)

License

Copyright © 2020 Sergio Abad. See license for details.