'How to get ALL product names and keywords from Aliexpress with API?
I want to get ALL product names and keywords from Aliexpress and put them into CSV file for example, is there any way to do that? I did not find any solution yet. Thank you
Solution 1:[1]
-- you can use python with and aliexpress api go and visite https://developers.aliexpress.com/en/doc.htm?docId=118193&docType=1 for more informations
this is my test code if it can help in someway
from topsdk.client import TopApiClient,TopException
from nested_lookup import nested_lookup #for dicts searchs
import pandas as pd
import json
def get_ali_product():
# create Client
client = TopApiClient(appkey='#####get yours', app_sercet='######## get yours', top_gateway_url='http://gw.api.taobao.com/router/rest',verify_ssl=False)
request_dict = {
#'fields':'product_detail_url',
'keywords': 'smart technology',
'max_sale_price': '500',
'min_sale_price': '70',
'page_no':'3',
'page_size': '2',
#'platform_product_type':'TMALL',
'sort': 'SALE_PRICE_ESC' ,
'target_currency':'USD',
'target_language':'EN',
'tracking_id':'finderpool',
#'ship_to_country':'US',
#'delivery_days':'3'
}
file_param_dict = {}
# ????????????
try:
response = client.execute("aliexpress.affiliate.product.query",request_dict,file_param_dict)
json_object = json.dumps(response , indent = 2)
return(json_object)
#print(response['resp_result']['result']['products'][0]['product_detail_url'])
#return nested_lookup('product_detail_url', response)
except TopException as e:
print(e)
print(get_ali_product())
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | abdellah nasser |