如何簡單快捷批次獲取店鋪的所有商品?

API測試Cris發表於2023-03-31

相信有很多做電商平臺的賣家也有在做其他平臺的分銷,就是把A平臺店鋪的東西鋪貨到B平臺賣,那麼第一步就需要先把A平臺店鋪的商品先提取出來,再在B平臺上架商品,相信很多小夥伴馬上想到的就是把A平臺的一個店鋪所有的連結都提取出來,一個一個去複製,要是店鋪的商品數量少這個辦法是可行的,要是一旦店鋪和商品多起來。一個一個去複製肯定不太現實的,現在小編教大家一個批次獲取店鋪所有商品的快捷方法,希望大家喜歡,幫助到大家。

item_search_shop-獲得店鋪的所有商品
1688.item_search_shop

公共引數

 

 

名稱 型別 必須 描述
key String 是 呼叫key(必須以GET方式拼接在URL中)
secret String 是 呼叫金鑰(介面v=PNG_WNMN)
api_name String 是 API介面名稱(包括在請求地址中)[item_search,item_get,item_search_shop等]
cache String 否 [yes,no]預設yes,將呼叫快取的資料,速度比較快
result_type String 否 [json,jsonu,xml,serialize,var_export]返回資料格式,預設為json,jsonu輸出的內容中文可以直接閱讀
lang String 否 [cn,en,ru]翻譯語言,預設cn簡體中文
version String 否 API版本

請求引數

請求引數:seller_nick=b2b-2200733087881719de&start_price=0&end_price=0&q=&page=1&cid=

引數說明:seller_nick:店鋪暱稱或sid(目前只支援sid))
sort:排序[bid,_bid,_sale,_credit]
(bid:總價(升序)_bid:總價(降序),sale:銷量,預設綜合排序,time:新品)
sort=new為店鋪上新資料,格式不統一,請注意
page:頁數


響應引數

Version: Date:

名稱 型別 必須 示例值 描述
items

items[] 0 店鋪的所有商品

請求示例

 

 

響應示例
{
"user": {
"id": null,
"nick": null,
"good_num": null,
"level": null,
"created": null,
"shop_type": null,
"user_num_id": null,
"company_id": null,
"company_dj": null,
"company_time": null,
"company_info": null,
"cid": "-1",
"sid": null,
"pic_url": null,
"video": null,
"title": null,
"address": null,
"phone": null,
"zhuy": "./page/contactinfo.htm",
"fh_score": null,
"hm_score": null,
"xy_score": null,
"ht_score": null,
"menu": null
},
"items": {
"item": [
{
"num_iid": "629206406356",
"title": "天語歐博信米圖手機X27S Mate30 P40 Pro個性簡約時尚手機殼批發",
"pic_url": "
"price": "19.9",
"detail_url": "https://m.1688.com/offer/629206406356.html"
},
{
"num_iid": "606991177049",
"title": "大容量10000毫安全新爆款移動電源自帶線充電寶禮品廠家直銷",
"pic_url": "
"price": "39.9",
"detail_url": "https://m.1688.com/offer/606991177049.html"
},
{
"num_iid": "603067013582",
"title": "P3跨境新爆款現貨6.5寸水滴大屏全網通4G智慧手機海外代發OEM定製",
"pic_url": "
"price": "52.0",
"detail_url": "https://m.1688.com/offer/603067013582.html"
},
{
"num_iid": "613515982791",
"title": "5.8寸大屏工作室root純淨版2+16G雲群控抖音快手微信手機OEM批發",
"pic_url": "
"price": "66.0",
"detail_url": "https://m.1688.com/offer/613515982791.html"
},
{
"num_iid": "637339319017",
"title": "P40 Pro品牌爆款6.5寸水滴大屏8+256G全網通5G安卓智慧手機批代發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/637339319017.html"
},
{
"num_iid": "632168014097",
"title": "新款30pro 7.5寸水滴大屏8+256G全網通5G低價智慧手機代批發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/632168014097.html"
},
{
"num_iid": "624579363633",
"title": "mate30 pro新款6.5英寸水滴大屏8+256G全網通5G低價智慧手機批發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/624579363633.html"
},
{
"num_iid": "624015201074",
"title": "新款X27 6.5寸全面水滴大屏8+128G全網通5G安卓智慧手機批代發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/624015201074.html"
},
{
"num_iid": "634673693747",
"title": "真新款mate40 pro 7.2寸水滴大屏8+256G全網通5G低價智慧手機批發",
"pic_url": "!!6000000003247-0-cib.jpg",
"price": "299.0",
"detail_url": "https://m.1688.com/offer/634673693747.html"
},
{
"num_iid": "634599513272",
"title": "新款mate40 pro 7.2寸水滴大屏10+256G全網通5G低價智慧手機批發",
"pic_url": "!!6000000007355-0-cib.jpg",
"price": "299.0",
"detail_url": "https://m.1688.com/offer/634599513272.html"
},
{
"num_iid": "589766232746",
"title": "新款X27 6.5寸全面水滴大屏8+128G全網通5G安卓智慧手機批代發",
"pic_url": "
"price": "308.0",
"detail_url": "https://m.1688.com/offer/589766232746.html"
},
{
"num_iid": "636684457600",
"title": "爆款hviv mate30 pro6.8寸水滴大屏256G全網通低價智慧手機批代發",
"pic_url": "
"price": "398.0",
"detail_url": "https://m.1688.com/offer/636684457600.html"
},
{
"num_iid": "622583886323",
"title": "爆款Hviv Mate40Pro+6.8寸水滴大屏512G全網通低價智慧手機批代發",
"pic_url": "!!2200733087881-0-cib.jpg",
"price": "399.0",
"detail_url": "https://m.1688.com/offer/622583886323.html"
},
{
"num_iid": "589984649469",
"title": "6.5寸大屏安卓9.0工作室root純淨版4+64G雲群控抖音快手閱讀手機",
"pic_url": "
"price": "469.0",
"detail_url": "https://m.1688.com/offer/589984649469.html"
},
{
"num_iid": "617854475887",
"title": "電視話購物工作室root純淨版4+64G雲群控抖音快手微信手機OEM批發",
"pic_url": "
"price": "698.0",
"detail_url": "https://m.1688.com/offer/617854475887.html"
},
{
"num_iid": "624494524174",
"title": "爆款hviv mate30 pro6.8寸水滴大屏256G全網通低價智慧手機批代發",
"pic_url": "
"price": "998.0",
"detail_url": "https://m.1688.com/offer/624494524174.html"
},
{
"num_iid": "630981381989",
"title": "品牌P40 Pro+7.5寸水滴大屏10+256G全網通低價智慧手機代批發",
"pic_url": "
"price": "1199.0",
"detail_url": "https://m.1688.com/offer/630981381989.html"
}
],
"total_results": "17",
"page_size": 20,
"pagecount": 1,
"page": "1",
"url": null
},
"error": "",
"secache": "3bbcb618f225b45561bbb1686d15b91c",
"secache_time": 1615280560,
"secache_date": "2021-03-09 17:02:40",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:8 max:10000",
"execution_time": 7.492,
"server_time": "Beijing/2021-03-09 17:02:40",
"client_ip": "106.6.35.144",
"call_args": {
"nick": "b2b-2200733087881719de"
},
"api_type": "1688",
"translate_language": "zh-CN",
"translate_engine": "google_cn",
"server_memory": "3.56MB",
"request_id": "gw-4.604739a9443f6"
}

異常示例

{
"error": "item-not-found",
"reason": "商品沒找到",
"error_code": "2000",
"success": 0,
"cache": 0,
"api_info": "today:0 max:10000",
"execution_time": 0.081,
"server_time": "Beijing/2020-06-10 23:44:00",
"call_args": [],
"api_type": "taobao",
"request_id": "15ee0ffc041242"}

響應示例
{
"user": {
"id": null,
"nick": null,
"good_num": null,
"level": null,
"created": null,
"shop_type": null,
"user_num_id": null,
"company_id": null,
"company_dj": null,
"company_time": null,
"company_info": null,
"cid": "-1",
"sid": null,
"pic_url": null,
"video": null,
"title": null,
"address": null,
"phone": null,
"zhuy": "./page/contactinfo.htm",
"fh_score": null,
"hm_score": null,
"xy_score": null,
"ht_score": null,
"menu": null
},
"items": {
"item": [
{
"num_iid": "629206406356",
"title": "天語歐博信米圖手機X27S Mate30 P40 Pro個性簡約時尚手機殼批發",
"pic_url": "
"price": "19.9",
"detail_url": "https://m.1688.com/offer/629206406356.html"
},
{
"num_iid": "606991177049",
"title": "大容量10000毫安全新爆款移動電源自帶線充電寶禮品廠家直銷",
"pic_url": "
"price": "39.9",
"detail_url": "https://m.1688.com/offer/606991177049.html"
},
{
"num_iid": "603067013582",
"title": "P3跨境新爆款現貨6.5寸水滴大屏全網通4G智慧手機海外代發OEM定製",
"pic_url": "
"price": "52.0",
"detail_url": "https://m.1688.com/offer/603067013582.html"
},
{
"num_iid": "613515982791",
"title": "5.8寸大屏工作室root純淨版2+16G雲群控抖音快手微信手機OEM批發",
"pic_url": "
"price": "66.0",
"detail_url": "https://m.1688.com/offer/613515982791.html"
},
{
"num_iid": "637339319017",
"title": "P40 Pro品牌爆款6.5寸水滴大屏8+256G全網通5G安卓智慧手機批代發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/637339319017.html"
},
{
"num_iid": "632168014097",
"title": "新款30pro 7.5寸水滴大屏8+256G全網通5G低價智慧手機代批發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/632168014097.html"
},
{
"num_iid": "624579363633",
"title": "mate30 pro新款6.5英寸水滴大屏8+256G全網通5G低價智慧手機批發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/624579363633.html"
},
{
"num_iid": "624015201074",
"title": "新款X27 6.5寸全面水滴大屏8+128G全網通5G安卓智慧手機批代發",
"pic_url": "
"price": "298.0",
"detail_url": "https://m.1688.com/offer/624015201074.html"
},
{
"num_iid": "634673693747",
"title": "真新款mate40 pro 7.2寸水滴大屏8+256G全網通5G低價智慧手機批發",
"pic_url": "!!6000000003247-0-cib.jpg",
"price": "299.0",
"detail_url": "https://m.1688.com/offer/634673693747.html"
},
{
"num_iid": "634599513272",
"title": "新款mate40 pro 7.2寸水滴大屏10+256G全網通5G低價智慧手機批發",
"pic_url": "!!6000000007355-0-cib.jpg",
"price": "299.0",
"detail_url": "https://m.1688.com/offer/634599513272.html"
},
{
"num_iid": "589766232746",
"title": "新款X27 6.5寸全面水滴大屏8+128G全網通5G安卓智慧手機批代發",
"pic_url": "
"price": "308.0",
"detail_url": "https://m.1688.com/offer/589766232746.html"
},
{
"num_iid": "636684457600",
"title": "爆款hviv mate30 pro6.8寸水滴大屏256G全網通低價智慧手機批代發",
"pic_url": "
"price": "398.0",
"detail_url": "https://m.1688.com/offer/636684457600.html"
},
{
"num_iid": "622583886323",
"title": "爆款Hviv Mate40Pro+6.8寸水滴大屏512G全網通低價智慧手機批代發",
"pic_url": "!!2200733087881-0-cib.jpg",
"price": "399.0",
"detail_url": "https://m.1688.com/offer/622583886323.html"
},
{
"num_iid": "589984649469",
"title": "6.5寸大屏安卓9.0工作室root純淨版4+64G雲群控抖音快手閱讀手機",
"pic_url": "
"price": "469.0",
"detail_url": "https://m.1688.com/offer/589984649469.html"
},
{
"num_iid": "617854475887",
"title": "電視話購物工作室root純淨版4+64G雲群控抖音快手微信手機OEM批發",
"pic_url": "
"price": "698.0",
"detail_url": "https://m.1688.com/offer/617854475887.html"
},
{
"num_iid": "624494524174",
"title": "爆款hviv mate30 pro6.8寸水滴大屏256G全網通低價智慧手機批代發",
"pic_url": "
"price": "998.0",
"detail_url": "https://m.1688.com/offer/624494524174.html"
},
{
"num_iid": "630981381989",
"title": "品牌P40 Pro+7.5寸水滴大屏10+256G全網通低價智慧手機代批發",
"pic_url": "
"price": "1199.0",
"detail_url": "https://m.1688.com/offer/630981381989.html"
}
],
"total_results": "17",
"page_size": 20,
"pagecount": 1,
"page": "1",
"url": null
},
"error": "",
"secache": "3bbcb618f225b45561bbb1686d15b91c",
"secache_time": 1615280560,
"secache_date": "2021-03-09 17:02:40",
"translate_status": "",
"translate_time": 0,
"language": {
"default_lang": "cn",
"current_lang": "cn"
},
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:8 max:10000",
"execution_time": 7.492,
"server_time": "Beijing/2021-03-09 17:02:40",
"client_ip": "106.6.35.144",
"call_args": {
"nick": "b2b-2200733087881719de"
},
"api_type": "1688",
"translate_language": "zh-CN",
"translate_engine": "google_cn",
"server_memory": "3.56MB",
"request_id": "gw-4.604739a9443f6"
}

異常示例

{
"error": "item-not-found",
"reason": "商品沒找到",
"error_code": "2000",
"success": 0,
"cache": 0,
"api_info": "today:0 max:10000",
"execution_time": 0.081,
"server_time": "Beijing/2020-06-10 23:44:00",
"call_args": [],
"api_type": "taobao",
"request_id": "15ee0ffc041242"}

請求地址暫不展示,歡迎私信程式碼交流。


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70028219/viewspace-2943190/,如需轉載,請註明出處,否則將追究法律責任。

相關文章