API文档中心

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

达人视角商品详情批量查询-简要版

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

【特别公告】

抖音精选联盟官方平台于3月13日关闭,请参考 https://www.veapi.cn/gonggao/detail_84.html


做为平替,将由穿山甲接口替代,佣金直接在本站会员中心结算。

详情见穿山甲API说明https://www.veapi.cn/apidoc/douyindouke/369


本接口用于查询达人视角下某个/批商品的详情,需获取 达人授权、抖客授权


和抖客精选联盟的商品详情批量查询(简要版)接口相近,但本接口更适合达人,和简要版接口相对比,本接口多返回

kol_cos_ratio达人佣金比例和kol_cos_fee 达人佣金金额两个字段

调用说明

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

接口请求地址

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

请求方式:GETPOST

请求参数

参数名称 参数类型 必填 示例值 描述
vekey String V123M56 公共参数,接口秘钥,请在会员中心获取
product_ids List 912374674527677,3592142357828600716 商品 id ,或商品URL,或抖口令。支持批量
fields String base_info,promotion_info,参考返回值一级字段名 需要返回的字段,多个用英文逗号隔开。不传只返回商品基础信息,如果您需要全部商品字段,则请用传入fields=all。,强烈建议按需获取数据,字段越少效率越高。

请求示例

  • HTTP
  • PHP
  • JAVA
  • PYTHON
GET/POST  http://api.veapi.cn/douke/kol_ProductsDetail?vekey=xxx&with_share_status=true&product_ids=3592142357828600716 
【例子】【例子】批量查询,商品ID或URL或抖口令商品混合查询
【例子】http://api.veapi.cn/douke/kol_ProductsDetail?vekey=xxx&product_ids=3590471656293989864,3:/%20长按?墆此条消息,达恺ɖȌƱɏɪǸ搜琐,查看商品详情ΦΦv7ettdyQX16B8ÊÊ
使用curl函数,curl不是php原生库,需要安装才能使用

$api="http://api.veapi.cn/douke/kol_ProductsDetail?vekey=xxx&with_share_status=true&product_ids=3592142357828600716";

$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/douke/kol_ProductsDetail?vekey=xxx&with_share_status=true&product_ids=3592142357828600716";
        // 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/douke/kol_ProductsDetail?vekey=xxx&with_share_status=true&product_ids=3592142357828600716"

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

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

返回值(JSON)

参数名称 参数类型 示例值 描述
base_info Struct - 基础信息
 └─ product_id Int64 3461984765147123 商品 id
 └─ title String 商品名称 商品名称
 └─ price Int64 100 商品售价(单位为分)
 └─ first_cid Int64 11 商品一级类目
 └─ second_cid Int64 2011 商品二级类目
 └─ third_cid Int64 3040 商品三级类目
 └─ in_stock Bool true 是否有库存
 └─ sales Int64 100 销量
 └─ cover String https://sf1-ttcdn-tos.pstatp.com/img/temai/Fpt8famR3twTGYz09e25nz5PbTRuwww800-800~1125x1125_q50.webp 商品主图
 └─ imgs List [轮播图] 商品轮播图
 └─ detail_url String https://haohuo.jinritemai.com/views/product/item2?id=3400312511185213726 商品链接
 └─ category_name String 玩具乐器 行业类目名称
 └─ category_id Int64 2 行业类目 id
 └─ success Bool true 获取数据是否成功
promotion_info Struct - 推广数据
 └─ cos_ratio Double 10 佣金比例(10%返回10)
 └─ cos_fee Int64 100 普通佣金金额(单位为分)
 └─ success Bool true 获取数据是否成功
comment_info Struct - 评价信息
 └─ comment_score Double 2 商品评分(5分制,保留一位)
 └─ comment_num Int64 2321 商品评价数目
 └─ success Bool true 获取数据是否成功
month_sale_data Struct - 月售信息
 └─ order_num Int64 1000 近30天商品总销量
 └─ view_num Int64 1000 近30天商品总浏览量
 └─ kol_num Int64 1000 近30天推广总达人数
 └─ daily_statistics List - 近30天推广达人数、浏览量、和订单量明细
    └─ date String 20210101 日期
    └─ order_num Int64 1000 单日商品销量
    └─ view_num Int64 100 单日商品浏览量
    └─ kol_num Int64 100 单日推广达人数
 └─ success Bool true 获取数据是否成功
share_info Struct - 分销信息
 └─ sharable Bool true 能否分销(true:可分销)
 └─ success Bool true 获取数据是否成功
brand_info Struct - 品牌信息
 └─ brand_id Int64 237461 品牌ID
 └─ brand_name_cn String 品牌名 品牌名
 └─ brand_name_en String brand_name 品牌英文名
 └─ success Bool true 获取数据是否成功
tags Struct - 商品标签
 └─ has_douin_goods_tag Bool true 是否有【抖in好物】标签
 └─ has_shop_brand_tag Bool true 是否有品牌旗舰店标签([品牌]黑标)
 └─ success Bool true 获取数据是否成功
activity_info Struct - 活动信息
 └─ activity_type Int64 1 商品参与活动类型。0:未参加活动;1: 超值购
 └─ success Bool true 获取数据是否成功
coupon_info Struct - 券信息
 └─ available_coupons List - 优惠券列表
    └─ coupon_type Int32 1 优惠券类型:1 平台券 2 店铺券 3 主播券
    └─ type_desc String 平台券 优惠券类型描述:平台券/主播券/店铺券
    └─ discount_desc String 满20减1 优惠券内容描述
    └─ apply_start_time String 2016-01-01 12:00:00 优惠券领取开始时间
    └─ apply_end_time String 2016-01-01 12:00:00 优惠券领取结束时间
    └─ validity_type Int64 1 优惠券有效期类型:1固定有效期类型,2浮动有效期类型
    └─ use_start_time String 2016-01-01 12:00:00 1固定有效期类型,优惠券使用开始时间
    └─ use_end_time String 2016-01-01 12:00:00 1固定有效期类型,优惠券使用结束时间
    └─ valid_period Int64 3600 2浮动有效期类型,领取优惠券后有效期,单位s
 └─ coupon_price Int64 100 券后价(单位:分)
 └─ success Bool true 获取数据是否成功
presell_info Struct - 预售信息
 └─ presell_type Int64 0 预售类型。0:非预售,1;全款预售,2:阶梯库存
 └─ success Bool true 获取数据是否成功
rights_info Struct - 权益信息
 └─ is_assured Bool true 是否提供安心购服务
 └─ success Bool true 获取数据是否成功
qualification_info Struct - 资质信息
 └─ has_sxt Bool true 是否具有短视频随心推资质
 └─ success Bool true 获取数据是否成功
shop_info Struct - 店铺信息
 └─ shop_id Int64 25316 店铺 id
 └─ shop_name String 店铺名称 店铺名称
 └─ shop_total_score Struct - 商家得分
    └─ shop_score Struct - 商家体验分
         └─ text String 商家体验分 文本
         └─ score String 4.95 得分
         └─ level Int16 1 等级(1:高 2:中 3:低)
    └─ product_score Struct - 商品体验分
    └─ logistics_score Struct - 物流体验分
    └─ service_score Struct - 商家服务分
 └─ success Bool true 获取数据是否成功

返回示例

【提示】推广链接通常有时效性,示例中的链接为创建文档时生成,仅用于展示返回结果使用,有可能已失效。
{ "error": "0", "msg": "查询成功!", "data": { "products": [ { "activity_info": { "activity_type": null }, "base_info": { "category_id": 9, "category_name": "美妆", "cover": "https://p9-aio.ecombdimg.com/obj/ecom-shop-material/nnHBvQXz_m_0f63b4a3b7a76ca7d6f86aa03365fdf0_sx_441461_www800-800", "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3592142357828600716&origin_type=open_platform&pick_source=AUW5SYn", "first_cid": 20085, "imgs": [ "https://p9-aio.ecombdimg.com/obj/ecom-shop-material/nnHBvQXz_m_0f63b4a3b7a76ca7d6f86aa03365fdf0_sx_441461_www800-800", "https://p6-aio.ecombdimg.com/obj/ecom-shop-material/nnHBvQXz_m_248d70556c817aa76545d6a7ec32aeef_sx_121687_www800-800", "https://p6-aio.ecombdimg.com/obj/ecom-shop-material/nnHBvQXz_m_6760c06ffea708f6a4ce36f8b331daed_sx_63685_www790-790", "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/nnHBvQXz_m_f2c42eec64ef7527c5474dc2a47c3cd6_sx_173509_www800-800", "https://p6-aio.ecombdimg.com/obj/ecom-shop-material/nnHBvQXz_m_e4c8ecb8412ad3296e2b8a4b39f3d0b1_sx_260345_www800-800" ], "in_stock": true, "price": 990, "product_id": 3592142357828600716, "sales": 13911381, "second_cid": 21328, "success": true, "third_cid": 27321, "title": "【粉丝福利】100袋冻干粉免洗睡眠面膜嫩肤补水保湿奶白提亮肤色" }, "brand_info": { "brand_id": null, "brand_name_cn": null, "brand_name_en": null }, "comment_info": { "comment_num": null, "comment_score": null }, "coupon_info": { "coupon_price": null }, "logistics_info": { "text": null }, "month_sale_data": { "kol_num": null, "order_num": null, "view_num": null }, "presell_info": { "presell_type": null }, "promotion_info": { "commission_type": null, "cos_fee": null, "cos_ratio": null, "kol_cos_fee": null, "kol_cos_ratio": null }, "qualification_info": [], "rights_info": [], "share_info": [], "shop_info": { "shop_id": null, "shop_name": null }, "tags": { "has_douin_goods_tag": null } } ] }, "request_id": "2lNLIpV" }

错误码

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

在线
客服

会员请加QQ群交流:

微信
咨询

加微信咨询
顶部