• 京东商品详情API调用实例讲解


          api接口调用是指使用python的requests库进行访问,基本上是get或post请求,有些接口会加密,我们所需要的数据在请求后的返回结果中,所看到的基本上都是json格式的解析,所以请求后可以使用requests自带的json函数进行解析,然后提取所需的数据,访问一次就能得到一个数据。

     API测试工具

    名称类型是否隐私示例值描述
    itemsitems[]获得JD商品详情
    num_iidBigint29186819959商品ID
    titleStringMOCO2018夏季新品时尚V领条纹连衣裙 摩安珂 蓝白条色 S商品标题
    desc_shortString商品简介
    priceFloat719.0价格
    total_priceFloat0
    suggestive_priceFloat0
    orginal_priceFloat1199.00原价
    nickStringMO&Co.官方旗舰店掌柜昵称
    numInt999
    min_numInt0
    detail_urlStringhttp://item.jd.com/29186819959.html商品链接
    pic_urlString//img14.360buyimg.com/n0/jfs/t22033/147/1051007175/85125/c44dd0df/5b1f2855Ncbe35858.jpg商品图片
    brandString品牌名称
    brandIdInt品牌ID
    rootCatIdInt1343顶级分类ID
    cidInt9719
    crumbsMix[]
    created_timeString
    modified_timeString
    delist_timeString
    descString
    desc_imgMix[]
    item_imgsMix[{ "url": "//img14.360buyimg.com/n0/jfs/t22033/147/1051007175/85125/c44dd0df/5b1f2855Ncbe35858.jpg"}]商品图片
    item_weightString
    item_sizeString
    locationString发货地
    post_feeFloat6.00物流费用
    express_feeFloat6.00快递费用
    ems_feeFloat6.00EMS费用
    shipping_toString发货至
    has_discountBooleanfalse
    videoMix[]商品视频
    is_virtualString
    sample_idString商品风格标识ID
    is_promotionBoolean
    props_nameString0:0:尺码:S;0:1:尺码:XS;0:2:尺码:M;0:3:尺码:L;0:4:尺码:XL商品属性名
    prop_imgsMix{"prop_img": []}商品属性图片列表
    property_aliasString0:0:S;0:1:XS;0:2:M;0:3:L;0:4:XL商品属性别名
    propsMix[{ "name": "尺码","value": "S XS M L XL" }]商品详情
    total_soldInt
    skusMix{"sku": [{"price": "719.00", "orginal_price": "1199.00", "properties": "0:0", "properties_name": "0:0:尺码:S", "quantity": 99, "sku_id": 29186819959, "sku_url": "http://item.jd.com/29186819959.html"}]商品规格信息
    seller_idInt卖家ID
    salesInt销量
    shop_idInt店铺ID
    props_listMix{"0:0": "尺码:S"}商品属性
    seller_infoMix{"level": null, "shop_type": null, "user_num_id": 57467, "cid": null, "delivery_score": null, "item_score": null, "score_p": null, "zhuy": "//moco.jd.com", "search_id": "", "nick": "MO&Co.官方旗舰店", "shop_name": "MO&Co.官方旗舰店", "title": "MO&Co.官方旗舰店" }卖家信息
    tmallBooleanfalse是否天猫
    errorString错误信息
    warningString警告信息
    url_logMix[]
    props_imgMix[]属性图片
    shop_itemMix[]
    relate_itemsMix[]

     实例

    {
        "item": {
            "num_iid": "100016931023",
            "title": "荣耀X30骁龙6nm疾速5G芯66W超级快充120Hz全视屏全网通版8GB+128GB钛空银",
            "desc_short": "",
            "price": "1569.00",
            "total_price": "",
            "suggestive_price": "",
            "orginal_price": "100000.00",
            "nick": null,
            "num": 33,
            "min_num": 0,
            "detail_url": "https://item.jd.com/100016931023.html#crumb-wrap",
            "pic_url": "m.360buyimg.com/mobilecms/s750x750_jfs/t1/219583/26/7800/151098/61b8a3f2E2879c4f6/9b73c1d24e0abecb.jpg",
            "brand": "荣耀",
            "brandId": "413457",
            "rootCatId": "653",
            "cid": "655",
            "created_time": "",
            "modified_time": "",
            "delist_time": "",
            "desc": "

    \n            
    \n        \n
    \n
    \n        \n
    \n
    \n        \n
    \n
    \n        \n
    \n
    \n        \n
    \n
    \n        \n
    \n\n    
    \n ",
            "desc_img": [],
            "item_imgs": [
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/219583/26/7800/151098/61b8a3f2E2879c4f6/9b73c1d24e0abecb.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/160500/31/23215/131391/61b8a3f2E1e467423/5bbe26aeef5dd20c.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/139813/6/23454/72371/61b8a3f2E515528ae/26f8d4f510c7546d.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/203027/29/18673/111714/61b8a3f2E8eb0064f/66011b25428e5834.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/170223/23/27538/64291/61b8a3f2E87fb54c5/b918d212365f8bf1.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/211588/11/12486/110295/61b8a3f2E16eef19a/b5e72b1cf8011a3a.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/168992/36/27501/64612/61b8a3f2E9a21c23d/e276745c8f331969.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/198370/10/20631/82923/61b8a3f2E39c0797b/b57f01ca5397ba00.jpg"
                },
                {
                    "url": "//img10.360buyimg.com/n1/jfs/t1/169350/23/26516/43363/61b8a401Ed5203256/df42c2124a10c6ab.jpg"
                }
            ],
            "item_weight": "0.475kg",
            "item_volume": "",
            "item_size": "",
            "location": null,
            "post_fee": "",
            "express_fee": "",
            "ems_fee": "",
            "shipping_to": "",
            "has_discount": "",
            "video": null,
            "is_virtual": "",
            "sample_id": "",
            "is_promotion": "",
            "props_name": "0:0:版本:6GB+128GB;0:1:版本:8GB+128GB;0:2:版本:8GB+256GB;0:3:版本:12GB+256GB;1:0:颜色:钛空银;1:1:颜色:幻夜黑;1:2:颜色:魅海蓝;1:3:颜色:晨曦金;1:4:颜色:钛空银星环版;",
            "prop_imgs": [],
            "property_alias": "0:0:版本:6GB+128GB;0:1:版本:8GB+128GB;0:2:版本:8GB+256GB;0:3:版本:12GB+256GB;1:0:颜色:钛空银;1:1:颜色:幻夜黑;1:2:颜色:魅海蓝;1:3:颜色:晨曦金;1:4:颜色:钛空银星环版;1:4:钛空银星环版;",
            "props": [],
            "total_sold": "",
            "skus": {
                "sku": [
                    {
                        "price": "1969.00",
                        "orginal_price": "100000.00",
                        "properties": "0:2;1:4",
                        "properties_name": "0:2:版本:8GB+256GB;1:4:颜色:钛空银星环版",
                        "quantity": "99",
                        "sku_id": "100030541668",
                        "sku_url": "http://item.jd.com/100030541668.html"
                    },
                    {
                        "price": "2269.00",
                        "orginal_price": "100000.00",
                        "properties": "0:3;1:3",
                        "properties_name": "0:3:版本:12GB+256GB;1:3:颜色:晨曦金",
                        "quantity": "99",
                        "sku_id": "100030541666",
                        "sku_url": "http://item.jd.com/100030541666.html"
                    },
                    {
                        "price": "1569.00",
                        "orginal_price": "100000.00",
                        "properties": "0:1;1:4",
                        "properties_name": "0:1:版本:8GB+128GB;1:4:颜色:钛空银星环版",
                        "quantity": "99",
                        "sku_id": "100030541664",
                        "sku_url": "http://item.jd.com/100030541664.html"
                    },
                    {
                        "price": "1369.00",
                        "orginal_price": "100000.00",
                        "properties": "0:0;1:3",
                        "properties_name": "0:0:版本:6GB+128GB;1:3:颜色:晨曦金",
                        "quantity": "99",
                        "sku_id": "100030541662",
                        "sku_url": "http://item.jd.com/100030541662.html"
                    },
                    {
                        "price": "2269.00",
                        "orginal_price": "100000.00",
                        "properties": "0:3;1:0",
                        "properties_name": "0:3:版本:12GB+256GB;1:0:颜色:钛空银",
                        "quantity": "99",
                        "sku_id": "100030541650",
                        "sku_url": "http://item.jd.com/100030541650.html"
                    },
                    {
                        "price": "1369.00",
                        "orginal_price": "100000.00",
                        "properties": "0:0;1:1",
                        "properties_name": "0:0:版本:6GB+128GB;1:1:颜色:幻夜黑",
                        "quantity": "99",
                        "sku_id": "100030541648",
                        "sku_url": "http://item.jd.com/100030541648.html"
                    },
                    {
                        "price": "1969.00",
                        "orginal_price": "100000.00",
                        "properties": "0:2;1:3",
                        "properties_name": "0:2:版本:8GB+256GB;1:3:颜色:晨曦金",
                        "quantity": "99",
                        "sku_id": "100030541646",
                        "sku_url": "http://item.jd.com/100030541646.html"
                    },
                    {
                        "price": "2269.00",
                        "orginal_price": "100000.00",
                        "properties": "0:3;1:4",
                        "properties_name": "0:3:版本:12GB+256GB;1:4:颜色:钛空银星环版",
                        "quantity": "99",
                        "sku_id": "100030541620",
                        "sku_url": "http://item.jd.com/100030541620.html"
                    },
                    {
                        "price": "1569.00",
                        "orginal_price": "100000.00",
                        "properties": "0:1;1:1",
                        "properties_name": "0:1:版本:8GB+128GB;1:1:颜色:幻夜黑",
                        "quantity": "99",
                        "sku_id": "100030541600",
                        "sku_url": "http://item.jd.com/100030541600.html"
                    },
                    {
                        "price": "1568.00",
                        "orginal_price": "100000.00",
                        "properties": "0:0;1:0",
                        "properties_name": "0:0:版本:6GB+128GB;1:0:颜色:钛空银",
                        "quantity": "99",
                        "sku_id": "100024697391",
                        "sku_url": "http://item.jd.com/100024697391.html"
                    },
                    {
                        "price": "1568.00",
                        "orginal_price": "100000.00",
                        "properties": "0:0;1:1",
                        "properties_name": "0:0:版本:6GB+128GB;1:1:颜色:幻夜黑",
                        "quantity": "99",
                        "sku_id": "100024697337",
                        "sku_url": "http://item.jd.com/100024697337.html"
                    },
                    {
                        "price": "1969.00",
                        "orginal_price": "100000.00",
                        "properties": "0:2;1:1",
                        "properties_name": "0:2:版本:8GB+256GB;1:1:颜色:幻夜黑",
                        "quantity": "99",
                        "sku_id": "100016931043",
                        "sku_url": "http://item.jd.com/100016931043.html"
                    },
                    {
                        "price": "2269.00",
                        "orginal_price": "100000.00",
                        "properties": "0:3;1:1",
                        "properties_name": "0:3:版本:12GB+256GB;1:1:颜色:幻夜黑",
                        "quantity": "99",
                        "sku_id": "100016931029",
                        "sku_url": "http://item.jd.com/100016931029.html"
                    },
                    {
                        "price": "1969.00",
                        "orginal_price": "100000.00",
                        "properties": "0:2;1:0",
                        "properties_name": "0:2:版本:8GB+256GB;1:0:颜色:钛空银",
                        "quantity": "99",
                        "sku_id": "100016931027",
                        "sku_url": "http://item.jd.com/100016931027.html"
                    },
                    {
                        "price": "1969.00",
                        "orginal_price": "100000.00",
                        "properties": "0:2;1:2",
                        "properties_name": "0:2:版本:8GB+256GB;1:2:颜色:魅海蓝",
                        "quantity": "99",
                        "sku_id": "100016931025",
                        "sku_url": "http://item.jd.com/100016931025.html"
                    },
                    {
                        "price": "1569.00",
                        "orginal_price": "100000.00",
                        "properties": "0:1;1:0",
                        "properties_name": "0:1:版本:8GB+128GB;1:0:颜色:钛空银",
                        "quantity": "99",
                        "sku_id": "100016931023",
                        "sku_url": "http://item.jd.com/100016931023.html"
                    },
                    {
                        "price": "1569.00",
                        "orginal_price": "100000.00",
                        "properties": "0:1;1:2",
                        "properties_name": "0:1:版本:8GB+128GB;1:2:颜色:魅海蓝",
                        "quantity": "99",
                        "sku_id": "100016931021",
                        "sku_url": "http://item.jd.com/100016931021.html"
                    },
                    {
                        "price": "2269.00",
                        "orginal_price": "100000.00",
                        "properties": "0:3;1:2",
                        "properties_name": "0:3:版本:12GB+256GB;1:2:颜色:魅海蓝",
                        "quantity": "99",
                        "sku_id": "100016931019",
                        "sku_url": "http://item.jd.com/100016931019.html"
                    },
                    {
                        "price": "1369.00",
                        "orginal_price": "100000.00",
                        "properties": "0:0;1:2",
                        "properties_name": "0:0:版本:6GB+128GB;1:2:颜色:魅海蓝",
                        "quantity": "99",
                        "sku_id": "100016931017",
                        "sku_url": "http://item.jd.com/100016931017.html"
                    },
                    {
                        "price": "1369.00",
                        "orginal_price": "100000.00",
                        "properties": "0:0;1:0",
                        "properties_name": "0:0:版本:6GB+128GB;1:0:颜色:钛空银",
                        "quantity": "99",
                        "sku_id": "100016931015",
                        "sku_url": "http://item.jd.com/100016931015.html"
                    },
                    {
                        "price": "1569.00",
                        "orginal_price": "100000.00",
                        "properties": "0:1;1:3",
                        "properties_name": "0:1:版本:8GB+128GB;1:3:颜色:晨曦金",
                        "quantity": "99",
                        "sku_id": "100016931001",
                        "sku_url": "http://item.jd.com/100016931001.html"
                    }
                ]
            },
            "seller_id": "",
            "sales": "",
            "shop_id": null,
            "props_list": {
                "0:0": "版本:6GB+128GB",
                "0:1": "版本:8GB+128GB",
                "0:2": "版本:8GB+256GB",
                "0:3": "版本:12GB+256GB",
                "1:0": "颜色:钛空银",
                "1:1": "颜色:幻夜黑",
                "1:2": "颜色:魅海蓝",
                "1:3": "颜色:晨曦金",
                "1:4": "颜色:钛空银星环版"
            },
            "seller_info": {
                "level": "",
                "shop_type": "",
                "user_num_id": null,
                "cid": "",
                "delivery_score": "",
                "item_score": "",
                "score_p": "",
                "zhuy": null,
                "search_id": "",
                "nick": null,
                "shop_name": null,
                "title": null
            },
            "tmall": false,
            "error": "",
            "warning": "",
            "url_log": [],
            "coupon_activity": "",
            "stuff_status": "",
            "shopinfo": [],
            "shopid": null,
            "method": "",
            "promo_type": "",
            "props_img": [],
            "data_from": "jdapp",
            "shop_item": [],
            "relate_items": []
        },
        "secache": "8c98d30373d3812e5a9c1af976ce3192",
        "secache_time": 1660006383,
        "secache_date": "2022-08-09 08:53:03",
        "translate_status": "",
        "translate_time": 0,
        "language": {
            "default_lang": "cn",
            "current_lang": "cn"
        },
        "error": "",
        "reason": "",
        "error_code": "0000",
        "cache": 0,
        "api_info": "today:9 max:10100 all[50=9+19+22];expires:2030-12-31",
        "execution_time": "3.071",
        "server_time": "Beijing/2022-08-09 08:53:03",
        "client_ip": "106.6.32.227",
        "call_args": [
            "100016931023"
        ],
        "api_type": "jd",
        "translate_language": "zh-CN",
        "translate_engine": "baidu_api",
        "server_memory": "3.53MB",
        "request_id": "gw-3.62f1afec792a9",
        "last_id": "1139039739"
    }

  • 相关阅读:
    Zookeeper
    极智编程 | 谈谈 C++ 中容器 map 和 unordered_map 的区别
    问题排查---应用程序不在接收新请求
    单调递增的数字【贪心算法】
    lombok注解介绍
    从城市吉祥物进化到虚拟人IP需要哪些步骤?
    Linux之gdb安装和升级
    python-web开发[15]之初识Django
    微信小程序,下载流文件并打开预览
    基于STM32的花卉温室控温系统设计
  • 原文地址:https://blog.csdn.net/ocean_hhn/article/details/126240143