接口使用场景等说明:【特别公告】
抖音精选联盟官方平台于3月13日关闭,请参考 https://www.veapi.cn/gonggao/detail_84.html
做为平替,将由穿山甲接口替代,佣金直接在本站会员中心结算。
详情见穿山甲API说明https://www.veapi.cn/apidoc/douyindouke/369
本接口用于查询达人视角下某个/批商品的详情,需获取 达人授权、抖客授权
和抖客精选联盟的商品详情批量查询(简要版)接口相近,但本接口更适合达人,和简要版接口相对比,本接口多返回
kol_cos_ratio达人佣金比例和kol_cos_fee 达人佣金金额两个字段
| 环境 | http 地址 | https 地址 |
|---|---|---|
| 正式环境 | http://api.veapi.cn/douke/kol_ProductsDetail | 暂无 |
| 参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
| product_ids | List | 是 | 912374674527677,3592142357828600716 | 商品 id ,或商品URL,或抖口令。支持批量 |
| fields | String | 否 | base_info,promotion_info,参考返回值一级字段名 | 需要返回的字段,多个用英文逗号隔开。不传只返回商品基础信息,如果您需要全部商品字段,则请用传入fields=all。,强烈建议按需获取数据,字段越少效率越高。 |
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ÊÊ
$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; //返回值
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);
}
}
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
| 参数名称 | 参数类型 | 示例值 | 描述 |
|---|---|---|---|
| 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 | 获取数据是否成功 |