How to get product description from Aliexpress with API?

Wramana picture Wramana · Aug 23, 2017 · Viewed 9k times · Source

I was scraping product details with beautifulsoup from aliexpress. But that is too slow and too much of a hassle.

So I signed up for the aliexpress API. Everything works. But how can I get the description of products using the API?

I found nothing in the help center. Google also does not have anything. I am also using

https://github.com/EitherSoft/python-aliexpress-api-client

It seems to me that it is not possible to get the description with the API? The documentation for the API is very poor imo.


Right now I am using this call:
http://gw.api.alibaba.com/openapi/param2/2/portals.open/api.listPromotionProduct/MY_API_KEY?fields=imageUrl,productId&keywords=chess&highQualityItems=yes
This call only returns the image, product id for products with the keyword "chess".
But how can I also get the description?

Answer

stovfl picture stovfl · Aug 23, 2017

Comment: how can I get the description?

The API provide the following details, there is no description.
I assume you have to get it from the productUrl.

config.py
'details': [ 'productId', 'productTitle', 'productUrl', 'imageUrl', 'originalPrice', 'salePrice', 'discount', 'evaluateScore', 'commission', 'commissionRate', '30daysCommission', 'volume', 'packageType', 'lotNum', 'validTime', 'storeName', 'storeUrl', 'allImageUrls',


Question: . I do not quite know what you mean?

What do you get using the following:

from aliexpress_api_client import AliExpress
aliexpress = AliExpress('api_key', 'affiliate_id')

#Get product details:
product = aliexpress.get_product_details(['productId', 'productTitle', 'salePrice'], product_id)
print(product)