API文档中心

热门接口:产品ID找同款全量维权查询万能转链字符串ID转换 (有API需求可联系本站)

京东联盟实时热销榜商品接口

调用权限:核心接口会员卡调用
接口使用场景等说明:

查询京东联盟实时热销榜商品接口,支持榜单Id和排序类型查询榜单商品列表

调用说明

本接口需要您在会员中心授权(如果多用户可传入sessionkey参数)

接口请求地址

环境 http 地址 https 地址
正式环境 http://api.veapi.cn/jd/jdHotRank 暂无

请求方式:GETPOST

请求参数

参数名称 参数类型 必填 示例值 描述
vekey String V123M56 公共参数,接口秘钥,请在会员中心获取
rankId Number 200001 榜单ID(200000 全部-默认,200001 食品酒水,200002 家庭清洁,200003 个护美妆,200004 医药保健,200005 生鲜,200006 数码家电,200007 家居日用,200008 时尚生活)
sortType Number 2 排序类型( 1:2小时-默认,2:高佣,3:24小时)
pageIndex Number 1 页码
pageSize Number 10 每页数量,单页数最大20,默认10

请求示例

  • HTTP
  • PHP
  • JAVA
  • PYTHON
GET/POST  http://api.veapi.cn/jd/jdHotRank?vekey=xxx&rankId=200001 

使用curl函数,curl不是php原生库,需要安装才能使用

$api="http://api.veapi.cn/jd/jdHotRank?vekey=xxx&rankId=200001";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api);
//curl_setopt($ch, CURLOPT_POST, true);  //POST方式时启用
//curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );  //POST方式时传参

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  //如果使用https请启用
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);  //如果使用https请启用
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );   //返回数据流,不直接输出
curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); //使用gzip压缩传输让访问更快
curl_setopt($ch, CURLOPT_TIMEOUT, 6);  //允许执行的最长秒数。这里设定6S
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);

$result = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

echo $result; //返回值
使用okhttp3/httpclient/jsoup/hutool,以hutool为例:

import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpRequest;

public class testGetParam {

    public static void main(String[] args) {
        // API网址
        String url = "http://api.veapi.cn/jd/jdHotRank?vekey=xxx&rankId=200001";
        // JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权
        //System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");

        // 发送请求
        String result = HttpRequest.get(url)
                .timeout(10000)//设置超时,毫秒
                .execute().body();
        System.out.println(result);
    }
}
推荐使用 requests,支持访问http,https网页:

import requests
		
# 要访问的API网页
target_url = "http://api.veapi.cn/jd/jdHotRank?vekey=xxx&rankId=200001"

# 发送请求
response = requests.get(target_url)

# 获取页面内容
if response.status_code == 200:
	print response.text

返回值(JSON)

参数名称 参数类型 是否必选 示例值 描述
itemId String Q9Z2ZdyMsa9g7jpsfgQNVA0R_3SD7M7ISbsR0zCKPoF 联盟商品ID
skuId Number 26898778009 商品skuId
skuName String 笔记本 商品名称
imageUrl String https://img14.360buyimg.com/pop/...69ca.png 商品主图
imgList String[] ['https://img14.360buyimg.com/pop...5a.png'] 商品图片列表
wlprice Number 100 基准价
commissionShare Number 5 佣金比例
comments Number 30 评论总数
goodComments Number 15 好评数
goodCommentsShare Number 99 好评率
skuTagList Skutaginfo[] 联盟标签明细
 └─ type Number 3 标签类型
 └─ index Number 1 优先级顺序(越小越优先)
 └─ name String 7天无理由退货 标签名称
purchasePrice Number 95 到手价
promotionLabelInfoList Rankpromotionlabelinfo[] 促销标签集
 └─ promotionLabelId String 5000125161 促销id
 └─ labelName String 满折 促销名称
couponList Rankcoupon[] 优惠券集合
 └─ link String http://coupon.jd.com/...action?XXXXXXX 券链接
 └─ discount Number 30 券面额
 └─ quota Number 39 券消费限额
 └─ remainCnt Number 1000 券剩余数量
 └─ couponStyle Number 0 优惠券分类 0:满减券,3:满折券,28: 每满减券
 └─ couponStatus Number -1 领取状态。0: 正常可领, -1 :不可领取, 1: 已领取
timeCouponInfoList Timecouponinfo[] 时段券信息集合
 └─ timeCouponBegin String 00:00:00 时段券领取开始时间
 └─ timeCouponEnd String 08:59:59 时段券领取结束时间

返回示例

【提示】推广链接通常有时效性,示例中的链接为创建文档时生成,仅用于展示返回结果使用,有可能已失效。
{ "error": "0", "msg": "查询成功!", "data": [ { "comments": "500", "commission": "0.04", "commissionShare": "1.0", "goodComments": "100", "goodCommentsShare": "100", "imageUrl": "https://img14.360buyimg.com/pop/jfs/t20270107/384578/21/7381/423891/695df073Fea613746/091932032000b099.png", "imgList": [ "https://img14.360buyimg.com/pop/jfs/t20270107/384578/21/7381/423891/695df073Fea613746/091932032000b099.png", "https://img14.360buyimg.com/pop/jfs/t1/379335/26/22703/93342/695e0680F526fa29c/5d41e05e4cf387c3.jpg" ], "itemId": "uq516EXNBPkVDZtMRMzsQ6PI_3fgGndMTDB3SBFMz7X", "purchasePriceInfo": { "purchasePrice": "3.90" }, "skuName": "福字灯春节过年投影灯恭喜发财红扥笼喜庆发光氛围灯福灯工厂金色 七彩自动变色福字灯(裸灯) (高品质检测出货)", "skuTagList": [ { "index": "1", "name": "京喜自营", "type": "17" }, { "index": "1", "name": "京喜", "type": "5" }, { "index": "3", "name": "7天无理由退货", "type": "12" }, { "index": "4", "name": "同款高转化", "type": "14" } ], "wlprice": "3.90" } ], "totalCount": "100", "request_id": "RHpH1wY" }

错误码

如果error不为0时,请点此查看错误码表格

在线
客服

会员请加QQ群交流:

微信
咨询

加微信咨询
顶部