iDataRiver平臺 https://www.idatariver.com/zh-cn/ 提供開箱即用的Temu電商資料採集API,供使用者按需呼叫。
介面使用詳情請參考Temu介面文件
介面列表
1. 獲取商品詳情
引數 | 型別 | 是否必填 | 預設值 | 示例值 | 描述 |
---|---|---|---|---|---|
apikey | string | 是 | idr_*** | 從控制檯裡複製apikey | |
country | string | 是 | us | 國家code | |
item_id | number | 是 | 601099518118140 | 商品id | |
item_url | string | 是 | https://www.temu.com/1pc-ergonomic-wrist-rest-pad-improve-comfort-and-efficiency-while-working-or-gaming-on-your-computer-or-laptop-g-601099518118140.html?%26top_gallery_url=https%3A%2F%2Fimg.kwcdn.com%2Fproduct%2FFancyalgo%2FVirtualModelMatting%2F0a64188f31b0671119c94307a2cd103b.jpg%26spec_gallery_id=2005365967%26refer_page_sn=10012%26refer_source=0%26freesia_scene=3%26_oak_freesia_scene=3%26_oak_rec_ext_1=NzY%26_oak_gallery_order=2019227234,868963937,1928464894,837145900,927249579 | 商品連結,可從商品列表裡的seo_link_url欄位獲取 |
python程式碼使用requests庫請求示例
import requests
# 構建請求URL
# Build request URL
url = "https://api.idatariver.com/api/2019/item/detail/v1"
# 將apikey替換為自己的
# Replace apikey with yours
params = {
'apikey': 'idr_***',
'item_id': '601099518118140',
'item_url': 'https://www.temu.com/1pc-ergonomic-wrist-rest-pad-improve-comfort-and-efficiency-while-working-or-gaming-on-your-computer-or-laptop-g-601099518118140.html?%26top_gallery_url=https%3A%2F%2Fimg.kwcdn.com%2Fproduct%2FFancyalgo%2FVirtualModelMatting%2F0a64188f31b0671119c94307a2cd103b.jpg%26spec_gallery_id=2005365967%26refer_page_sn=10012%26refer_source=0%26freesia_scene=3%26_oak_freesia_scene=3%26_oak_rec_ext_1=NzY%26_oak_gallery_order=2019227234,868963937,1928464894,837145900,927249579',
}
response = requests.get(url, params=params, timeout=60)
data = response.json()
# 列印返回結果
# print response
print(f"Your response is: {data}")
比如採集Temu https://www.temu.com/
商品詳情介面返回資料樣例
2. 按照分類獲取商品列表
引數 | 型別 | 是否必填 | 預設值 | 示例值 | 描述 |
---|---|---|---|---|---|
apikey | string | 是 | idr_*** | 從控制檯裡複製apikey | |
country | string | 是 | us | 國家code | |
opt_id | number | 是 | 2170 | 分類id | |
cate_url | number | 是 | https://www.temu.com/cell-phones-o3-2641.html?opt_level=2&title=Cell Phones&_x_enter_scene_type=cate_tab&leaf_type=bro&show_search_type=0&opt1_id=-13 | 類別分享url |
更多介面支援定製,持續維護中...
總結
分析電商資料可以幫助商家有效最佳化產品與營銷結構,透過使用以上介面可以方便獲取Temu的公開商品資料,且計費透明。