大淘客,让选品更简单! |

{{item.type_name}}:

API 市场 / 热门主播力荐商品
 

热门主播力荐商品
吐槽建议
应用场景:
可用于搭建淘宝直播商品特色栏目或者社群内分发推广
接口说明:
接口返回淘宝热门主播(李佳琦,薇娅)直播推荐的商品,高热度高反响,助您提高转化
使用人数: 1000+
热门主播力荐商品 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.0.0

请求地址:https://openapi.dataoke.com/api/live/goods-list 复制

请求方式:GET

公共参数:
请求参数:

注:请求参数须区分大小写

返回数据:
调用示例:
String url = "https://openapi.dataoke.com/api/live/goods-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("anchorName", "李");
paraMap.put("pageId", "1");
paraMap.put("pageSize", 10);
String data = ApiClient.sendReq(url, appSecret, paraMap);

SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkPopularAnchorCommendRequest request = new DtkPopularAnchorCommendRequest();
request.setPageSize(20);
request.setPageId("1");
DtkApiResponse < DtkPageResponse < DtkPopularAnchorCommendResponse >> execute = client.execute(request);
 //热门主播力荐商品
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/live/goods-list";
    $url = $host . '?' . http_build_query($data);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;

    SDK调用示例
    $client = new GetLiveGoodsList();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();

package main

import (
	"fmt"
	"gitee.com/dtk-developer/openapi-sdk-go/sdk"
)

func main() {
	// 1.初始化所需要的参数appKey, appSecret, version
	var (
		appKey = "xxxxxxxxxx"
		appSecret = "xxxxxxxxxx"
		version = "v1.3.1"
	)

	// 2.初始化开放平台api的客户端句柄
	oa := &sdk.OpenApi{}
	oa.AppKey = appKey
	oa.AppSecret = appSecret
	oa.Version = version
	client :=  oa.GetClient()

	// 3.准备请求参数
	params := map[string]string {
		"pageSize": "3",
	}

	// 4.业务请求,示例使用热门主播力荐商品和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.LiveGoodsList(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)

	// 复用client句柄
	params = map[string]string {
		// 指定接口版本
		"version": "v1.0.0",
		"content": "1👈¥fym8XiJU9Oi¥ https://s.click.taobao.com/Ys3TNlu  包邮 漫花抽纸10包4层加厚280张/包纸巾卫生纸家用实惠装面巾纸",
	}
	resp, err = client.ParseContent(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)
}
返回示例:
{
    "requestId": "e1e55f49e24345168db3cdbfd5eb3c3b",
    "time": 1608090157507,
    "code": 0,
    "msg": "成功",
    "data": {
        "list": [
            {
                "id": -1,
                "goodsId": "632929601542",
                "itemLink": "https://detail.tmall.com/item.htm?id=632929601542",
                "title": "【李佳琦推荐】卡蒙百搭保暖披肩大围巾女秋冬季韩版护颈防寒围脖",
                "originalPrice": 159.00,
                "actualPrice": 159.00,
                "shopType": -1,
                "monthSales": -1,
                "twoHoursSales": -1,
                "dailySales": -1,
                "desc": "",
                "couponLink": "",
                "couponEndTime": "",
                "couponStartTime": "",
                "couponPrice": 80.00,
                "couponConditions": "",
                "createTime": "",
                "mainPic": "http://gw.alicdn.com/bao/uploaded/i1/352229690/O1CN01Q0mNAF2LS4WN8ZQqK_!!0-item_pic.jpg",
                "marketingMainPic": "",
                "video": "",
                "sellerId": "",
                "cid": -1,
                "tbcid": "",
                "discounts": -1,
                "commissionRate": 0.07,
                "couponTotalNum": -1,
                "activityStartTime": "",
                "activityEndTime": "",
                "shopLevel": -1,
                "descScore": -1,
                "dsrScore": -1,
                "dsrPercent": -1,
                "shipScore": -1,
                "shipPercent": -1,
                "serviceScore": -1,
                "servicePercent": -1,
                "brandId": -1,
                "brandName": "Kenmont/卡蒙",
                "hotPush": -1,
                "teamName": "",
                "hzQuanOver": -1,
                "yunfeixian": -1,
                "tchaoshi": -1,
                "goldSellers": -1,
                "freeshipRemoteDistrict": -1,
                "liveSales": -1,
                "userName": "李佳琦Austin",
                "livePrice": 159.00,
                "liveId": "290175012555",
                "activityType": -1,
                "brand": -1,
                "shopName": "",
                "quanMLink": 0,
                "estimateAmount": -1,
                "dtitle": "【李佳琦推荐】卡蒙百搭保暖披肩大围巾女秋冬季韩版护颈防寒围脖"
            }
        ],
        "totalNum": 149,
        "pageId": "1"
    }
}
常见错误码:
{
msg: "服务器错误",
code: -1,
time: 1554365022200
}
错误码列表: