京东店铺的所有商品API接口-(item_search_shop-获得店铺的所有商品接口),京东API接口
生活随笔
收集整理的這篇文章主要介紹了
京东店铺的所有商品API接口-(item_search_shop-获得店铺的所有商品接口),京东API接口
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
一、京東店鋪的所有商品API接口-(item_search_shop-獲得店鋪的所有商品接口),京東API接口代碼如下:
1.公共參數(shù)
| key | String | 是 | 調(diào)用key(必須以GET方式拼接在URL中) |
| secret | String | 是 | 調(diào)用密鑰 (點擊獲取測試key和secret) |
| api_name | String | 是 | API接口名稱(包括在請求地址中)[item_search,item_get,item_search_shop等] |
| cache | String | 否 | [yes,no]默認(rèn)yes,將調(diào)用緩存的數(shù)據(jù),速度比較快 |
| result_type | String | 否 | [json,jsonu,xml,serialize,var_export]返回數(shù)據(jù)格式,默認(rèn)為json,jsonu輸出的內(nèi)容中文可以直接閱讀 |
| lang | String | 否 | [cn,en,ru]翻譯語言,默認(rèn)cn簡體中文 |
| version | String | 否 | API版本 |
2.請求參數(shù)
請求參數(shù):seller_nick=皓頓HAUTTON京東自營旗艦店&start_price=0&end_price=0&q=&page=1&cid=
參數(shù)說明:seller_nick:店鋪昵稱
start_price:開始價格
end_price:結(jié)束價格
q:搜索關(guān)鍵字
page:頁數(shù)
cid:分類ID
3.響應(yīng)參數(shù)
| items | item[] | 獲得店鋪的所有商品 | ||
| num_iid | Bigint | 10021415166448 | 寶貝ID | |
| detail_url | String | https://item.jd.com/10021415166448.html | 商品詳情頁 | |
| title | String | 俞兆林2件裝半高領(lǐng)打底衫秋冬長袖洋氣純色內(nèi)衣內(nèi)搭上衣黑色薄款女士秋衣女春秋保暖內(nèi)衣女針織衫 黑色+淺卡其(80-130斤) | 商品標(biāo)題 | |
| pic_url | String | //img13.360buyimg.com/n7/jfs/t1/115150/13/17438/307259/5f58be2fE727cfb0d/aa76563060a56420.png | 寶貝圖片 | |
| price | Float | 188 | 價格 | |
| promotion_price | Float | 188 | 優(yōu)惠價 | |
| sales | Int | 銷量 | ||
| sample_id | Bigint | 商品風(fēng)格標(biāo)識ID | ||
| post_fee | Float | 物流費用 | ||
| seller | String | 俞兆林YZL旗艦店 | 賣家昵稱 |
?4.請求示例(CURL、PHP 、PHPsdk 、Java 、C# 、Python…)
# coding:utf-8 """ Compatible for python2.x and python3.x requirement: pip install requests """ from __future__ import print_function import requests # 請求示例 url 默認(rèn)請求參數(shù)已經(jīng)做URL編碼 url = "https://wx19970108018/jd/item_search_shop/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&seller_nick=皓頓HAUTTON京東自營旗艦店&start_price=0&end_price=0&q=&page=1&cid=" headers = {"Accept-Encoding": "gzip","Connection": "close" } if __name__ == "__main__":r = requests.get(url, headers=headers)json_obj = r.json()print(json_obj)?5.響應(yīng)示例
{"user": {"id": "","nick": "皓頓HAUTTON京東自營旗艦店","city": "","state": "","good_num": "","level": "","score": "","total_num": "","created": "","shop_type": "B","user_num_id": 1000081830,"cid": "","pic_url": "","delivery_score": "","item_score": "","sid": "","title": "","phone": "","zhuy": "//mall.jd.com/index-1000081830.html?from=pc","score_p": "","company_name": ""},"items": {"item": [{"num_iid": "100006965163","detail_url": "https://item.jd.com/100006965163.html","title": "皓頓休閑鞋男鞋頭層牛皮時尚潮牌運動小白鞋百搭板鞋子男 9301XB148 白色 38碼","pic_url": "//img13.360buyimg.com/n7/jfs/t1/153961/17/1801/305679/5f813073E03c570f7/8d5a59f610675771.jpg","price": 368,"promotion_price": 368,"sales": null,"sample_id": "","post_fee": "","seller": "皓頓HAUTTON京東自營旗艦店"},{"num_iid": "100008260461","detail_url": "https://item.jd.com/100008260461.html","title": "皓頓HAUT TON 休閑鞋男鞋頭層牛皮高幫時尚潮牌運動小白鞋百搭板鞋靴子男 9393XB540 白色 39碼","pic_url": "//img11.360buyimg.com/n7/jfs/t1/131902/17/11990/270074/5f813353E3ad47052/9d15482c3a553659.jpg","price": 398,"promotion_price": 398,"sales": null,"sample_id": "","post_fee": "","seller": "皓頓HAUTTON京東自營旗艦店"},{"num_iid": "100006965175","detail_url": "https://item.jd.com/100006965175.html","title": "皓頓休閑鞋男鞋頭層牛皮時尚潮牌運動小白鞋百搭板鞋子男 9301XB148 白色 41碼","pic_url": "//img10.360buyimg.com/n7/jfs/t1/129151/18/14410/305679/5f813097E2b67ae38/594356ed51abb69c.jpg","price": 368,"promotion_price": 368,"sales": null,"sample_id": "","post_fee": "","seller": "皓頓HAUTTON京東自營旗艦店"},{"num_iid": "100014803052","detail_url": "https://item.jd.com/100014803052.html","title": "皓頓HAUT TON 休閑鞋男鞋頭層牛皮高幫時尚潮牌運動小白鞋百搭板鞋靴子男 9394GB411 白色 41碼","pic_url": "//img12.360buyimg.com/n7/jfs/t1/128350/32/14720/262542/5f813012E457e96c4/bdf4fc8345082f34.jpg","price": 398,"promotion_price": 398,"sales": null,"sample_id": "","post_fee": "","seller": "皓頓HAUTTON京東自營旗艦店"},{"num_iid": "100012921200","detail_url": "https://item.jd.com/100012921200.html","title": "皓頓HAUT TON 休閑鞋男鞋頭層牛皮韓版時尚潮牌運動小白鞋百搭板鞋子男 9303XB030 白色 39碼","pic_url": "//img10.360buyimg.com/n7/jfs/t1/152705/30/1828/298006/5f812e75Ee03a3a12/3abde62340b8d3f6.jpg","price": 368,"promotion_price": 368,"sales": null,"sample_id": "","post_fee": "","seller": "皓頓HAUTTON京東自營旗艦店"}],"total_results": "5","page_size": "60","pagecount": 1,"page": "","url": "https://search.jd.com/Search?keyword=皓頓HAUTTON京東自營旗艦店&enc=utf-8&wq=皓頓HAUTTON京東自營旗艦店&pvid=33dbb420d9fa4ca483a869f2e4c5625c"},"error": "","secache": "e0f8552465a91326c012ad26414763d9","secache_time": 1615538585,"secache_date": "2021-03-12 16:43:05","translate_status": "","translate_time": 0,"language": {"default_lang": "cn","current_lang": "cn"},"reason": "","error_code": "0000","cache": 0,"api_info": "today:11 max:10000","execution_time": 3.413,"server_time": "Beijing/2021-03-12 16:43:06","client_ip": "106.6.36.174","call_args": ["100006965163"],"api_type": "jd","translate_language": "zh-CN","translate_engine": "google_cn","server_memory": "3.16MB","request_id": "gw-3.604b299752ee5" }總結(jié)
以上是生活随笔為你收集整理的京东店铺的所有商品API接口-(item_search_shop-获得店铺的所有商品接口),京东API接口的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Paper-----文献引用格式
- 下一篇: 安捷伦频谱仪的使用方法图解_安捷伦E44