API文档中心

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

穿山甲-抖客商品详情接口

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

可批量获取指定商品的详情。一次可以获取20个以内的商品详情。


【特别提示】由于穿山甲和抖客有限制频率,因此穿山甲接口只接收有订单转化浓度5%以上的用户订单,纯采集请不要调用,否则会冻结帐户。

接口请求地址

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

请求方式:GETPOST

请求参数

参数名称 参数类型 必填 示例值 描述
vekey String V123M56 公共参数,接口秘钥,请在会员中心获取
product_ids Ints 1234,5678 商品id列表,一次可以传10个,多个用英文逗号相连。

请求示例

  • HTTP
  • PHP
  • JAVA
  • PYTHON
GET/POST  http://api.veapi.cn/douke/csj_prodetail?vekey=xxx 
【例子】批量查询,支持商品ID、淘口令、链接多形式
http://api.veapi.cn/douke/csj_prodetail?vekey=xxx&product_ids=3622901944550583125,%E2%9E%9DJbF7qg1wVs9L8%E2%9E%9D,https://v.buydouke.com/iYdbVXVy/
使用curl函数,curl不是php原生库,需要安装才能使用

$api="http://api.veapi.cn/douke/csj_prodetail?vekey=xxx";

$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/csj_prodetail?vekey=xxx";
        // 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/csj_prodetail?vekey=xxx"

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

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

返回值(JSON)

参数名称 参数类型 示例值 描述
total Int 100 商品总数
product_id Long 123456 商品id
title String 测试商品 商品名称
is_kol_product Bool true, false 在穿山甲上是否有达人特殊佣金
price Long 100 商品价格,单位分
cos_ratio Int 100 分佣比例,百分比乘以 100,比如 1% 返回 1*100 = 100
cos_fee Int 10000 佣金金额,单位分
first_cid Int 1 商品一级类目, 可从商品类目接口获得
second_cid Int 2 商品二级类目,可从商品类目接口获得
third_cid Int 3 商品三级类目,可从商品类目接口获得
in_stock Bool true, false 是否有库存
sales Int 100 商品历史销量
cover String   商品主图
imgs String array ["商品轮播图"] 商品轮播图
detail_url String   商品链接
shop_id Int   商铺id
shop_name String   商铺名称
comment_score Float   商品评分
comment_num Int   商品评价数目
order_num Int   近30天商品总订单量
view_num Int   近30天商品总浏览量
kol_num Int   近30天推广总达人数
daily_statistics Object array   近30天推广达人数、浏览量、和订单量明细
 └─ date String 20240326 日期
 └─ order_num Int 10000 当日商品订单量明细
 └─ view_num Int 3000 当日商品浏览量明细
 └─ kol_num Int 2000 当日推广达人数明细
logistics_info String   商品物流说明
has_sxt Bool   是否具有短视频随心推资质
shop_total_score Object   商家DSR评分
 └─ shop_score Object   商家体验分
 └─ product_score Object   商品体验分
 └─ logistics_score Object   物流体验分
 └─ service_score Object   商家服务分
coupon_price Long   券后价格,单位分(0或者没传则为原价)

返回示例

【提示】推广链接通常有时效性,示例中的链接为创建文档时生成,仅用于展示返回结果使用,有可能已失效。
{ "error": "0", "msg": "查询成功!", "total": 1, "data": [ { "product_id": "3622901944550583125", "title": "【40片9.9】奇亚籽全麦面包吐司早餐整箱低脂零食小吃休闲食品饱腹", "is_kol_product": false, "price": 990, "cos_ratio": 1300, "cos_fee": 129, "first_cid": 20018, "second_cid": 20312, "third_cid": 34634, "in_stock": true, "sales": 100000, "imgs": [ "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/iEWEWcMM_m_9bc6e3b0a2803ec52e3500bc217dd5a0_sx_1424411_www800-800", "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/iEWEWcMM_m_a13caa18dbe11e1bef05d16e0569f7c2_sx_1058358_www800-800", "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/iEWEWcMM_m_87621d8afb4baa05d7176c83e961f7eb_sx_449827_www800-800", "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/iEWEWcMM_m_4fc5e3660f9ea062fafed7f5cc3443c7_sx_189769_www800-800" ], "cover": "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/iEWEWcMM_m_9bc6e3b0a2803ec52e3500bc217dd5a0_sx_1424411_www800-800", "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3622901944550583125&origin_type=open_platform", "shop_id": 13795501, "shop_name": "九劲食品旗舰店", "coupon_price": 0, "comment_score": 4, "comment_num": 54834, "order_num": 100000, "view_num": 1900891, "kol_num": 5181772, "daily_statistics": [ { "date": "20240302", "order_num": 10000, "view_num": 41002, "kol_num": 153306 }, { "date": "20240303", "order_num": 10000, "view_num": 46106, "kol_num": 366050 }, { "date": "20240304", "order_num": 10000, "view_num": 59748, "kol_num": 451454 }, { "date": "20240305", "order_num": 10000, "view_num": 65130, "kol_num": 477854 }, { "date": "20240306", "order_num": 10000, "view_num": 60703, "kol_num": 362548 }, { "date": "20240307", "order_num": 10000, "view_num": 52106, "kol_num": 300491 }, { "date": "20240308", "order_num": 10000, "view_num": 45504, "kol_num": 216144 }, { "date": "20240309", "order_num": 10000, "view_num": 48290, "kol_num": 240292 }, { "date": "20240310", "order_num": 10000, "view_num": 69427, "kol_num": 187843 }, { "date": "20240311", "order_num": 10000, "view_num": 61300, "kol_num": 193886 }, { "date": "20240312", "order_num": 10000, "view_num": 71674, "kol_num": 228754 }, { "date": "20240313", "order_num": 10000, "view_num": 70902, "kol_num": 254551 }, { "date": "20240314", "order_num": 10000, "view_num": 64466, "kol_num": 167736 }, { "date": "20240315", "order_num": 10000, "view_num": 57849, "kol_num": 126587 }, { "date": "20240316", "order_num": 10000, "view_num": 52962, "kol_num": 125333 }, { "date": "20240317", "order_num": 10000, "view_num": 75658, "kol_num": 113016 }, { "date": "20240318", "order_num": 10000, "view_num": 66873, "kol_num": 117023 }, { "date": "20240319", "order_num": 10000, "view_num": 63433, "kol_num": 101198 }, { "date": "20240320", "order_num": 10000, "view_num": 74173, "kol_num": 108062 }, { "date": "20240321", "order_num": 10000, "view_num": 71615, "kol_num": 108118 }, { "date": "20240322", "order_num": 10000, "view_num": 63952, "kol_num": 113381 }, { "date": "20240323", "order_num": 10000, "view_num": 76371, "kol_num": 106534 }, { "date": "20240324", "order_num": 10000, "view_num": 89240, "kol_num": 96422 }, { "date": "20240325", "order_num": 10000, "view_num": 88700, "kol_num": 95348 }, { "date": "20240326", "order_num": 10000, "view_num": 76509, "kol_num": 85246 }, { "date": "20240327", "order_num": 10000, "view_num": 78191, "kol_num": 105270 }, { "date": "20240328", "order_num": 10000, "view_num": 67230, "kol_num": 87192 }, { "date": "20240329", "order_num": 7500, "view_num": 54242, "kol_num": 79971 }, { "date": "20240330", "order_num": 5000, "view_num": 45953, "kol_num": 53534 }, { "date": "20240331", "order_num": 5000, "view_num": 41582, "kol_num": 1941 } ], "is_assured": false, "logistics_info": "48小时内从河北省发货,包邮", "has_sxt": true, "shop_total_score": { "shop_score": { "text": "商家体验分", "score": "96", "level": 1 }, "product_score": { "text": "商品体验分", "score": "89", "level": 2 }, "logistics_score": { "text": "物流体验分", "score": "97", "level": 1 }, "service_score": { "text": "商家服务分", "score": "100", "level": 1 } } } ], "logid": "20240401152030B721EF10623BFB3C7C54", "request_id": "NPfTdFK" }

错误码

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

在线
客服

会员请加QQ群交流:

微信
咨询

加微信咨询
顶部