京东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": "


",

你可能感兴趣的:(京东API接口,数据挖掘,迁移学习,数据仓库,人工智能,爬虫)