接口使用场景等说明:本接口用于查询商品的详情信息,包括:
商品标题、佣金比例、商品描述、店铺收藏券、商品历史累计售卖件数(模糊值,string类型,非数值)、优惠券金额、优惠券数量、优惠券剩余数量、优惠券门槛、优惠券有效期、商品评价分、商品评价数量、商品轮播图、最小拼团价、最小单买价等等。
【关于拼多多数字商品ID入参的说明】
由于多多进宝官方不再支持拼多多数字商品ID转链和搜索,如:https://mobile.yangkeduo.com/goods2.html?goods_id=627201602859 ,传入这类型参数时,会返回“该查询不是来自终端用户的原始链接,请使用原始链接进行查询”。
本接口支持拼多多数字商品ID入参转链(如627201602859),但需要购买专用点卡,并在接口后附加usenumid=1参数。
| 环境 | http 地址 | https 地址 |
|---|---|---|
| 正式环境 | http://api.veapi.cn/pdd/pdd_goodsdetail | 暂无 |
| 参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
| goods_sign | String | 否 | 可以传商品的goodsSign,也可以传数字商品ID(需要添加参数usenumid=1,并且购买专用点卡)。当传入数字ID时,请提供备案关联过的pid和custom_parameters参数。 | |
| pid | String | 是 | 推广位id,当您提供的goods_sign是数字ID时,必须提供已备案关联过的pid和custom_parameters. | |
| custom_parameters | String | 是 | 6688 | 自定义参数,必须是与p_id备案关联过(参备案接口),为链接打上自定义标签;参数最长限制64个字节;格式:{"uid":"11","sid":"22"},如果您只传Uid,那么也可以直接用字符串表示,如custom_parameters=11。其中 uid 必选,用户唯一标识,每个用户仅且对应一个标识; sid可选,表示上下文信息标识,例如sessionId等。该json字符串中也可以加入其他自定义的key/value对。(如果使用GET请求,请使用URLEncode处理参数) |
| goods_img_type | Integer | 否 | 1 | 商品主图类型:1-场景图,2-白底图,默认为0 |
| need_sku_info | Boolean | 否 | 【已不可用】是否获取sku信息,默认false不返回。(特殊渠道权限,该字段为白名单形式,目前不支持申请) | |
| search_id | String | 否 | 搜索id,建议填写,提高收益。来自搜索等接口 | |
| zs_duo_id | Long | 否 | 招商多多客ID | |
| usenumid | Number | 否 | 1 | 可选1或0,当您需要解析数字ID并且购买了“拼多多数字ID转字符”专用点卡后,可添加此参数。 |
GET/POST http://api.veapi.cn/pdd/pdd_goodsdetail?goods_sign=E9L2wBWAFbZEb5jlwvfbPAgcYQxjJtfM_JnfRXlWl4&vekey=xxxx&zs_duo_id=【例子】使用拼多多商品数字ID查询
http://api.veapi.cn/pdd/pdd_goodsdetail?goods_sign=423051062050&vekey=xxx&&pid=4079456_34211517&custom_parameters=6123&usenumid=1
$api="http://api.veapi.cn/pdd/pdd_goodsdetail?goods_sign=E9L2wBWAFbZEb5jlwvfbPAgcYQxjJtfM_JnfRXlWl4&vekey=xxxx&zs_duo_id="; $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/pdd/pdd_goodsdetail?goods_sign=E9L2wBWAFbZEb5jlwvfbPAgcYQxjJtfM_JnfRXlWl4&vekey=xxxx&zs_duo_id=";
// 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/pdd/pdd_goodsdetail?goods_sign=E9L2wBWAFbZEb5jlwvfbPAgcYQxjJtfM_JnfRXlWl4&vekey=xxxx&zs_duo_id=" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
| 参数名称 | 参数类型 | 示例值 | 描述 |
|---|---|---|---|
| activity_promotion_rate | Long | 活动佣金比例,千分比(特定活动期间的佣金比例) | |
| activity_tags | Integer[] | 商品活动标记数组,例:[4,7],4-秒杀 7-百亿补贴等 | |
| brand_name | String | 商品品牌词信息,如“苹果”、“阿迪达斯”、“李宁”等 | |
| cash_gift_amount | Long | 全局礼金金额,单位分 | |
| cat_id | Long | 商品类目ID,使用分类接口获取 | |
| cat_ids | Integer[] | 商品一~四级类目ID列表 | |
| clt_cpn_batch_sn | String | 店铺收藏券id | |
| clt_cpn_discount | Long | 店铺收藏券面额,单位为分 | |
| clt_cpn_end_time | Long | 店铺收藏券截止时间 | |
| clt_cpn_min_amt | Long | 店铺收藏券使用门槛价格,单位为分 | |
| clt_cpn_quantity | Long | 店铺收藏券总量 | |
| clt_cpn_remain_quantity | Long | 店铺收藏券剩余量 | |
| clt_cpn_start_time | Long | 店铺收藏券起始时间 | |
| coupon_discount | Long | 优惠券面额,单位为分 | |
| coupon_end_time | Long | 优惠券失效时间,UNIX时间戳 | |
| coupon_min_order_amount | Long | 优惠券门槛金额,单位为分 | |
| coupon_remain_quantity | Long | 优惠券剩余数量 | |
| coupon_start_time | Long | 优惠券生效时间,UNIX时间戳 | |
| coupon_total_quantity | Long | 优惠券总数量 | |
| create_at | Long | 创建时间(unix时间戳) | |
| desc_txt | String | 描述分 | |
| extra_coupon_amount | Long | 额外优惠券,单位为分 | |
| goods_desc | String | 参与多多进宝的商品描述 | |
| goods_gallery_urls | String[] | 商品轮播图 | |
| goods_image_url | String | 多多进宝商品主图 | |
| goods_name | String | 参与多多进宝的商品标题 | |
| goods_sign | String | 商品goodsSign,支持通过goodsSign查询商品。goodsSign是加密后的goodsId | |
| goods_thumbnail_url | String | 商品缩略图 | |
| has_coupon | Boolean | true | 商品是否有优惠券 true-有,false-没有 |
| has_mall_coupon | Boolean | 是否有店铺券 | |
| lgst_txt | String | 物流分 | |
| mall_coupon_discount_pct | Integer | 店铺折扣 | |
| mall_coupon_end_time | Long | 店铺券使用结束时间 | |
| mall_coupon_max_discount_amount | Integer | 最大使用金额 | |
| mall_coupon_min_order_amount | Integer | 最小使用金额 | |
| mall_coupon_remain_quantity | Long | 店铺券余量 | |
| mall_coupon_start_time | Long | 店铺券使用开始时间 | |
| mall_coupon_total_quantity | Long | 店铺券总量 | |
| mall_cps | Integer | 该商品所在店铺是否参与全店推广,0:否,1:是 | |
| mall_id | Long | 商家id | |
| mall_img_url | String | 店铺logo图 | |
| mall_name | String | 店铺名称 | |
| material_list | Object[] | 商品素材列表 | |
| └─ id | String | 素材ID | |
| └─ image_list | String[] | 图片列表 | |
| └─ text_list | String[] | 文字列表 | |
| └─ thumbnail_url | String | 视频缩略图 | |
| └─ type | Integer | 素材类型,1-图文,2-视频 | |
| └─ video_url | String | 视频url | |
| merchant_type | Integer | 1 | 店铺类型,1-个人,2-企业,3-旗舰店,4-专卖店,5-专营店,6-普通店(未传为全部) |
| min_group_price | Long | 最低价sku的拼团价,单位为分 | |
| min_normal_price | Long | 最低价sku的单买价,单位为分 | |
| only_scene_auth | Boolean | 快手专享 | |
| opt_id | Long | 商品标签ID,使用pdd.goods.opt.get接口获取 | |
| opt_ids | Integer[] | 商品标签ID | |
| opt_name | String | 商品标签名称 | |
| plan_type | Integer | 推广计划类型:1-全店推广,2-单品推广,3-定向推广,4-招商推广,5-分销推广 | |
| predict_promotion_rate | Long | 比价行为预判定佣金,需要用户备案 | |
| promotion_rate | Long | 佣金比例,千分比 | |
| sales_tip | String | 已售卖件数 | |
| serv_txt | String | 服务分 | |
| service_tags | Integer[] | 1 | 服务标签:1-全场包邮,2-七天退换,3-退货包运费,4-送货入户并安装,5-送货入户,6-电子发票,7-诚信发货,8-缺重包赔,9-坏果包赔,10-果重保证,11-闪电退款,12-24小时发货,13-48小时发货,14-免税费,15-假一罚十,16-贴心服务,17-顺丰包邮,18-只换不修,19-全国联保,20-分期付款,21-纸质发票,22-上门安装,23-爱心助农,24-极速退款,25-品质保障,26-缺重包退,27-当日发货,28-可定制化,29-预约配送,30-商品进口,31-电器城,1000001-正品发票,1000002-送货入户并安装,2000001-价格保护 |
| share_rate | Integer | 招商分成服务费比例,千分比 | |
| sku_list | Object[] | sku列表 | |
| is_onsale | Integer | 上下架状态: 1-上架, 0-下架 | |
| min_group_price | Long | 最小成团价,单位分 | |
| sku_thumb_url | String | sku预览图 | |
| spec_list | Object[] | 商品规格列表 | |
| └─ note | String | 规格备注 | |
| └─ parent_spec_id | Long | 父规格id | |
| └─ parent_spec_value | String | 父规格名称。例如:"型号"为父规格名称,"xx款"为该父规格下的子规格名称。 | |
| └─ spec_id | Long | 规格id | |
| └─ spec_value | String | 规格名称。例如:"xx款"为规格名称,"型号"为该规格的父规格名称。 | |
| subsidy_amount | Integer | 优势渠道专属商品补贴金额,单位为分。针对优质渠道的补贴活动,指定优势渠道可通过推广该商品获取相应补贴。补贴活动入口:[进宝网站-官方活动] | |
| subsidy_duo_amount_ten_million | Integer | 官方活动给渠道的收入补贴金额,不允许直接给下级代理展示,单位为分 | |
| unified_tags | String[] | 优惠标签列表,包括:"X元券","比全网低X元","服务费","精选素材","近30天低价","同款低价","同款好评","同款热销","旗舰店","一降到底","招商优选","商家优选","好价再降X元","全站销量XX","实时热销榜第X名","实时好评榜第X名","额外补X元"等 | |
| video_urls | String[] | 商品视频url | |
| zs_duo_id | Long | 招商团长id |