拼多多高级API - 拼多多商品搜索接口 拼多多商品接口 拼多多优惠券接口 拼多多查券接口 拼多多接口

关键词/商品ID查询优惠券列表接口,拼多多超级搜索接口

1、注册订单侠开放平台账号

注册地址: https://www.dingdanxia.com/user/register/index.html  

2、获取接口秘钥apikey

登录个人中心 - 系统设置 - 接口管理 找到接秘钥apikey,apikey 接口秘钥是调用接口的唯一凭证,请妥善保管! 

3、PHP代码调用示例

<?php
// +----------------------------------------------------------------------
// | 订单侠开放平台 www.dingdanxia.com  [ 专为淘客开发者提供一站式API解决方案 ] 
// +----------------------------------------------------------------------
//接口秘钥
$apikey = '这里填写你的apikey';
//拼多多搜索接口
$apiurl = "http://api.tbk.dingdanxia.com/pdd/goods_search";
 
 
//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
	    
));
 
 
//打印结果
print_r($result);
 
/**
 * post请求
 * @param string $url
 * @param array $params
 * @param int $timeout
 */
function curl_post($url, $params, $timeout = 3) {
    try {
        foreach ($params as $key => $val) {
            $post[] = "{$key}={$val}";
        }
        $post_data  = implode('&', $post);
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
        return curl_exec($ch);
    }
    catch (Exception $e) {
        return false;
    }
}

4、接口返回结果

{
	"code": 200,
	"msg": "请求成功【success】",
	"total_results": 172351,
	"data": [{
		"category_name": "汽车",
		"clt_cpn_end_time": null,
		"clt_cpn_min_amt": null,
		"coupon_remain_quantity": 900,
		"clt_cpn_remain_quantity": null,
		"promotion_rate": 100,
		"service_tags": [24, 13],
		"mall_id": 823809424,
		"mall_name": "亨的利车饰",
		"mall_coupon_end_time": 0,
		"clt_cpn_batch_sn": null,
		"lgst_txt": "低",
		"goods_name": "四大桶汽车玻璃水防冻型四季通用雨刮水车用雨刮精清洗液汽车用品",
		"clt_cpn_discount": null,
		"goods_id": 58467466235,
		"goods_gallery_urls": null,
		"goods_desc": "切记:【0度玻璃水为标准型,不防冻】冬季零下地区建议购买-15度至-40度,玻璃水1瓶1.35L,四季通用,冬季防冻玻璃水,分为四种规格:夏季专用【0度】,冬天选用【-15度】【-25度】【-40度】,有效去除鸟屎,虫胶,油膜,灰尘等污渍,冬季使用防冻玻璃水有防冻,化冰,融雪,化霜,(仅限防冻玻璃水),配方:去离子水,润滑剂,乙二醇聚合物,防腐剂,软化剂,防蚀阻垢剂,防油防锈剂多种混合物组成。本款为新研发,比市面上1.8升玻璃水增加多种功效,默认快递为邮政快递!",
		"opt_name": "汽车",
		"opt_ids": [2048, 10305, 20996, 2053, 10696, 19977, 6475, 21003, 12, 12621, 10702, 12691, 19926, 11671, 12696, 19866, 223, 16223, 19871, 6242, 10339, 19875, 12581, 294, 10729, 12586, 16172, 11632, 20720, 16112, 16117, 2105, 16121, 21050, 12731, 10301],
		"goods_image_url": "https://t00img.yangkeduo.com/goods/images/2019-11-07/b1467b5f-c1c6-4901-9575-cb1f177baa62.jpg",
		"has_mall_coupon": false,
		"min_group_price": 650,
		"coupon_start_time": 1574265600,
		"coupon_discount": 300,
		"coupon_end_time": 1574524799,
		"zs_duo_id": 0,
		"mall_coupon_remain_quantity": 0,
		"plan_type": 2,
		"clt_cpn_quantity": null,
		"crt_rf_ordr_rto1m": 0.031199742682535,
		"cps_sign": null,
		"cat_ids": [7639, 7641, 7853, 8064],
		"coupon_min_order_amount": 300,
		"category_id": 2048,
		"mall_coupon_discount_pct": 0,
		"activity_type": null,
		"cat_id": null,
		"coupon_total_quantity": 1000,
		"mall_coupon_min_order_amount": 0,
		"merchant_type": 1,
		"clt_cpn_start_time": null,
		"sales_tip": "2566",
		"only_scene_auth": true,
		"mall_coupon_id": 0,
		"desc_txt": "高",
		"goods_thumbnail_url": "https://t00img.yangkeduo.com/goods/images/2019-11-07/b0e44cb5475d0b8f2d9eb90b96991d15.jpeg",
		"opt_id": 2048,
		"min_normal_price": 750,
		"has_coupon": true,
		"mall_coupon_start_time": 0,
		"serv_txt": "低",
		"mall_rate": 10,
		"mall_coupon_total_quantity": 0,
		"create_at": null,
		"mall_coupon_max_discount_amount": 0,
		"mall_cps": 1
	}]
}

接口文档:https://www.dingdanxia.com/doc/114/86

在线测试:https://www.dingdanxia.com/apitest/114/86

 

实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值