京东api接口文档:获取京东APP端商品详情原数据 调用示例

京东是中国的综合网络零售商,是中国电子商务领域受消费者欢迎和具有影响力的电子商务网站之一,在线销售家电、数码通讯、电脑、家居百货、服装服饰、母婴、图书、食品、在线旅游等12大类数万个品牌百万种优质商品。

随着智能手机的普及,APP购物成为人们日常生活购物的方式之一。不断变化的市场也给电商商家们带来更大的挑战,如何在激烈竞争的线上商城分得一杯羹?借助计算机技术,不断提升数据分析管理效率,提升自己的竞争力。电商们想要做数据抓取和分析,必然离不开电商API的使用。

京东商品详情原数据API:jd.item_get_app

调用代码展示
# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://服务器地址/jd/item_get_app/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=10335871600"
headers = {
    "Accept-Encoding": "gzip",
    "Connection": "close"
}
if __name__ == "__main__":
    r = requests.get(url, headers=headers)
    json_obj = r.json()
    pr
参数说明

公共参数 (查看更多

名称

类型

必须

描述

key

String

调用key(必须以GET方式拼接在URL中)

secret

String

调用密钥

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版本

请求参数

请求参数:num_iid=10335871600

参数说明:item_id:商品ID

响应示例
"item": {
            "AdvertCount": {
                "ad": "",
                "id": ""
            },
            "CommentsCount": [
                {
                    "AfterCount": 0,
                    "AfterCountStr": "1600+",
                    "AverageScore": 5,
                    "CommentCount": 0,
                    "CommentCountStr": "20万+",
                    "DefaultGoodCount": 0,
                    "DefaultGoodCountStr": "20万+",
                    "GeneralCount": 0,
                    "GeneralCountStr": "2300+",
                    "GeneralRate": 0.017,
                    "GeneralRateShow": 2,
                    "GeneralRateStyle": 3,
                    "GoodCount": 0,
                    "GoodCountStr": "15万+",
                    "GoodRate": 0.97,
                    "GoodRateShow": 97,
                    "GoodRateStyle": 145,
                    "OneYear": 0,
                    "PoorCount": 0,
                    "PoorCountStr": "2100+",
                    "PoorRate": 0.013,
                    "PoorRateShow": 1,
                    "PoorRateStyle": 2,
                    "ProductId": 10335871600,
                    "SensitiveBook": 0,
                    "ShowCount": 0,
                    "ShowCountStr": "9800+",
                    "SkuId": 10335871600,
                    "VideoCount": 0,
                    "VideoCountStr": "400+"
                }
            ],
            "activeTypeInfo": {
                "cannotbuy": {
                    "cannotBuyMsg": "",
                    "cannotSingleBuy": "",
                    "cannotTuanBuy": ""
                }
            },
            "allOverImg": "",
            "areaId": "",
            "bigouinfo": "",
            "bizMsg": "",
            "bizRetCode": "0",
            "butie": {
                "appSecondOrder": "",
                "bannerRightTips1": "",
                "bannerRightTips2": "",
                "h5ArouseText": "",
                "icon": "",
                "joinTuanIconTips": "",
                "layerTips1": "",
                "layerTips2": "",
                "limitEnv": "",
                "pgOriginPrice": "",
                "raiseTuanIconTips": "",
                "subsidyAmount": "",
                "subsidyAmountText": "",
                "subsidyCode": "",
                "tips": "",
                "type": "",
                "wxappArouseText": ""
            },
            "chnImg": [],
            "daojia": "",
            "desc_content": {
                "content": "<div class=\"zn1St198939\" style=\"color:#000003;border-color:#091b10;height:0px\"></div><div class=\"zn-material\"><img src=\"https://img12.360buyimg.com/imgzone/jfs/t1/217824/8/16313/48059/62465a9aEadcae695/145031d99f141ce2.jpg\" usemap=\"#zndzHotMap01198939\" style=\"width:790px\" width=\"790\"><map name=\"zndzHotMap01198939\"><area shape=\"rect\" coords=\"24,108,380,363\" href=\"//coupon.m.jd.com/coupons/show.action?key=b9edad0474f74fcd969e6fd8ca08a73f&roleId=72539851&to=mall.jd.com/index-213251.html\"><area shape=\"rect\" coords=\"411,104,767,359\" href=\"//coupon.m.jd.com/coupons/show.action?key=6101bd52f3a24d0fad96fa063f5f8236&roleId=73124317&to=mall.jd.com/index-213251.html\"></map><img src=\"https://img30.360buyimg.com/imgzone/jfs/t1/127196/30/26975/228050/624fced3Ef9be8f55/d8d45caf67e8b623.jpg\" usemap=\"#znTplMap4568692\" style=\"width:790px\" width=\"790\"><map name=\"znTplMap4568692\"><area shape=\"rect\" coords=\"0,130,260,472\" href=\"https://item.jd.com/10044290960213.html\"><area shape=\"rect\" coords=\"260,130,520,472\" href=\"https://item.jd.com/25596134244.html\"><area shape=\"rect\" coords=\"520,130,780,472\" href=\"https://item.jd.com/10028966944315.html\"><area shape=\"rect\" coords=\"0,472,260,814\" href=\"https://item.jd.com/10026315129988.html\"><area shape=\"rect\" coords=\"260,472,520,814\" href=\"https://item.jd.com/10335566954.html\"><area shape=\"rect\" coords=\"520,472,780,814\" href=\"https://item.jd.com/65656601714.html\"><area shape=\"rect\" coords=\"0,814,260,1156\" href=\"https://item.jd.com/70376149209.html\"><area shape=\"rect\" coords=\"260,814,520,1156\" href=\"https://item.jd.com/71720843769.html\"><area shape=\"rect\" coords=\"520,814,780,1156\" href=\"https://item.jd.com/10022135644622.html\"></map></div><div class=\"zn1Ed198939\" style=\"color:#000003;border-color:#091b11;height:0px\"></div><div class=\"for_separator\"></div><p><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/112441/16/21855/174914/622aa541E728c9848/0556d44cc2411f1e.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/104909/34/24747/178970/622aa541E0584eed5/ac086ec86cdbff0f.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/114845/12/20742/197337/622aa541E660c5a4d/90e35e76bc558f0c.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/211967/8/14536/163117/622aa542Ebef86dc3/670158104e39bf3f.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/213625/14/14519/148085/622aa542Eff320257/b3079aacdc3f7b81.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/109135/15/24616/220354/62286518E2dd55d90/425cd4e750740a36.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/110839/14/24424/193971/62286518E8fe456c1/cae9456b117370ea.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/130072/16/14107/188132/62286518E6507ebf2/d0550030c3e4d115.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/108191/33/25739/257079/62286518E13110794/f2ecffb2e6138e7d.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/132976/12/24254/187891/62286518E3e1225d3/1258287c361dddcf.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/115666/32/21352/165015/62286518Ea39a2651/1eefdeacd69f15d3.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/135986/5/21674/178217/62286519Eaeeb6fbe/95a87e049c33ae3c.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/134586/34/24804/160728/6228644dEf8557e78/fac3331979621a39.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/87648/22/24567/193152/6228644dE335f3d67/20e01d21da62c5c4.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/121810/23/24721/138050/6228644dEc83e4c06/d9da22d23ea430fc.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/118725/13/21178/148289/6228644eE89a1f40c/7e788189d20b0a58.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/220618/7/14282/163522/6228644eE62cceffe/375097096c4ad386.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/135951/24/22365/73171/62272548Ea9dfcdff/dd63c41f1f533493.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/92820/27/24165/174365/62272549E52f9a3ca/1e0c0ddf86c5de44.jpg\"><img src=\"http://img30.360buyimg.com/popWareDetail/jfs/t1/149635/22/23378/242846/62272549E1be2aade/57e0c109310c3293.jpg\"></p><p><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/85156/23/10917/211412/5e2546caEbf42fae5/5e494f3c805915e6.jpg\"></p><p><br></p>",
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值