• 暂无结果
API 市场 / 拼多多商品详情
 

拼多多商品详情
吐槽建议
应用场景:
当用户点击某个拼多多商品时,调用该接口。获取对应商品的详细信息
接口说明:
通过拼多多商品goodsSign,获取指定商品的详细详细数据(商品价格,优惠券信息,详情图,主图……)
使用人数: 134000+
拼多多商品详情 免费接入 接口测试 SDK下载
展示效果: https://openapi.dataoke.com/api/dels/pdd/goods/detail 复制

请求方式:GET

公共参数:
请求参数:

注:请求参数须区分大小写

返回数据:
调用示例:
JAVA PHP GOLANG
String url = "https://openapi.dataoke.com/api/dels/pdd/goods/detail";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v2.0.0");
paraMap.put("searchId", 1);
String data = ApiClient.sendReq(url, appSecret, paraMap);
 //拼多多商品详情
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/dels/pdd/goods/detail";
    $url = $host . '?' . http_build_query($data);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;

    SDK调用示例
    $client = new GetPddProductDetails();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();

package main

import (
	"fmt"
	"gitee.com/dtk-developer/openapi-sdk-go/sdk"
)

func main() {
	// 1.初始化所需要的参数appKey, appSecret, version
	var (
		appKey = "xxxxxxxxxx"
		appSecret = "xxxxxxxxxx"
		version = "v2.0.0"
	)

	// 2.初始化开放平台api的客户端句柄
	oa := &sdk.OpenApi{}
	oa.AppKey = appKey
	oa.AppSecret = appSecret
	oa.Version = version
	client :=  oa.GetClient()

	// 3.准备请求参数
	params := map[string]string {
		"searchId": "639331017111",
	}

	// 4.业务请求,示例使用拼多多商品详情和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.GetPddGoodsDetail(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)

	// 复用client句柄
	params = map[string]string {
		// 指定接口版本
		"version": "v1.0.0",
		"content": "1👈¥fym8XiJU9Oi¥ https://s.click.taobao.com/Ys3TNlu  包邮 漫花抽纸10包4层加厚280张/包纸巾卫生纸家用实惠装面巾纸",
	}
	resp, err = client.ParseContent(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)
}
返回示例:
{
    "requestId": "d9f74bad4ed148a8a17955c751ef5e36",
    "time": 1627887882026,
    "code": 0,
    "msg": "成功",
    "data": {
        "categoryId": 13,
        "categoryName": "水果",
        "catIds": [
            "8172",
            "8174",
            "8429"
        ],
        "couponDiscount": 0,
        "couponEndTime": "1970-01-01 08:00:00",
        "couponMinOrderAmount": 0,
        "couponRemainQuantity": 0,
        "couponStartTime": "1970-01-01 08:00:00",
        "couponTotalQuantity": 0,
        "descTxt": "高",
        "goodsDesc": "【20支】和路雪千层雪棒可爱多甜筒梦龙太妃榛子多口味冰淇淋雪糕",
        "goodsGalleryUrls": [
            "https://img.pddpic.com/mms-material-img/2021-07-05/091d600b-0c1b-4ed3-bc06-e8fca5f82fbe.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-12/fe30d96a-f5be-476a-bd4c-603fa5184e4a.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-12/a4b1eb7e-38d4-44a4-8be3-c401d5a1fa91.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-12/cbdcfc12-2c5c-4c66-a256-1b052797774d.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-07-05/1fb87603-a348-4c13-8108-4eabf0baf363.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-03-31/e5dd1b99-2881-4cc8-bbe0-c59080b35ee0.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-29/2692bc29-f195-4b06-801a-17a00379d75b.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-27/2eaa3aa8-8e6b-40a6-8ea4-b7e23fb97797.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-27/4e5ad6c7-2b44-4176-af21-0f202fee0f49.jpeg"
        ],
        "goodsId": 249740748836,
        "goodsImageUrl": "https://img.pddpic.com/mms-material-img/2021-07-05/091d600b-0c1b-4ed3-bc06-e8fca5f82fbe.jpeg",
        "goodsName": "【20支】和路雪千层雪棒可爱多甜筒梦龙太妃榛子多口味冰淇淋雪糕",
        "goodsSign": "Y9n2mE_7lrBJ1VwhwfDZwJrKdU-j3Bbz_JlxtIuh1o",
        "goodsThumbnailUrl": "https://t00img.yangkeduo.com/goods/images/2021-07-05/75bbe8bcf00f40eef0d0c85031cdeaf9.jpeg",
        "hasCoupon": false,
        "hasMallCoupon": false,
        "lgstTxt": "高",
        "mallCouponDiscountPct": 0,
        "mallCouponEndTime": "1970-01-01 08:00:00",
        "mallCouponMaxDiscountAmount": 0,
        "mallCouponMinOrderAmount": 0,
        "mallCouponRemainQuantity": 0,
        "mallCouponStartTime": 0,
        "mallCouponTotalQuantity": 0,
        "mallCps": 1,
        "mallId": 574908643,
        "mallName": "和路雪官方旗舰店",
        "merchantType": 3,
        "minGroupPrice": 83,
        "minNormalPrice": 108.1,
        "onlySceneAuth": true,
        "optId": 13,
        "optIds": [
            3552,
            12402,
            10723,
            22932,
            22949,
            10696,
            22280,
            22281,
            10700,
            13,
            22926,
            3551
        ],
        "optName": "水果",
        "planType": 2,
        "predictPromotionRate": 40,
        "promotionRate": 40,
        "salesTip": "1.7万",
        "serviceTags": [
            36,
            13
        ],
        "servTxt": "高",
        "shareRate": 0,
        "unifiedTags": [
            "品质险",
            "48小时发货"
        ],
        "videoUrls": [],
        "zsDuoId": 0
    }
}
错误码列表:

请求地址:https://openapi.dataoke.com/api/dels/pdd/goods/detail 复制

请求方式:GET

公共参数:
请求参数:

注:请求参数须区分大小写

返回数据:
调用示例:
JAVA PHP
String url = "https://openapi.dataoke.com/api/dels/pdd/goods/detail";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("searchId", 1);
String data = ApiClient.sendReq(url, appSecret, paraMap);
 //拼多多商品详情
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/dels/pdd/goods/detail";
    $url = $host . '?' . http_build_query($data);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;

    SDK调用示例
    $client = new GetPddProductDetails();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();

返回示例:
{
    "requestId": "d9f74bad4ed148a8a17955c751ef5e36",
    "time": 1627887882026,
    "code": 0,
    "msg": "成功",
    "data": {
        "categoryId": 13,
        "categoryName": "水果",
        "catIds": [
            "8172",
            "8174",
            "8429"
        ],
        "couponDiscount": 0,
        "couponEndTime": "1970-01-01 08:00:00",
        "couponMinOrderAmount": 0,
        "couponRemainQuantity": 0,
        "couponStartTime": "1970-01-01 08:00:00",
        "couponTotalQuantity": 0,
        "descTxt": "高",
        "goodsDesc": "【20支】和路雪千层雪棒可爱多甜筒梦龙太妃榛子多口味冰淇淋雪糕",
        "goodsGalleryUrls": [
            "https://img.pddpic.com/mms-material-img/2021-07-05/091d600b-0c1b-4ed3-bc06-e8fca5f82fbe.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-12/fe30d96a-f5be-476a-bd4c-603fa5184e4a.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-12/a4b1eb7e-38d4-44a4-8be3-c401d5a1fa91.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-12/cbdcfc12-2c5c-4c66-a256-1b052797774d.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-07-05/1fb87603-a348-4c13-8108-4eabf0baf363.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-03-31/e5dd1b99-2881-4cc8-bbe0-c59080b35ee0.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-29/2692bc29-f195-4b06-801a-17a00379d75b.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-27/2eaa3aa8-8e6b-40a6-8ea4-b7e23fb97797.jpeg",
            "https://img.pddpic.com/mms-material-img/2021-04-27/4e5ad6c7-2b44-4176-af21-0f202fee0f49.jpeg"
        ],
        "goodsId": 249740748836,
        "goodsImageUrl": "https://img.pddpic.com/mms-material-img/2021-07-05/091d600b-0c1b-4ed3-bc06-e8fca5f82fbe.jpeg",
        "goodsName": "【20支】和路雪千层雪棒可爱多甜筒梦龙太妃榛子多口味冰淇淋雪糕",
        "goodsSign": "Y9n2mE_7lrBJ1VwhwfDZwJrKdU-j3Bbz_JlxtIuh1o",
        "goodsThumbnailUrl": "https://t00img.yangkeduo.com/goods/images/2021-07-05/75bbe8bcf00f40eef0d0c85031cdeaf9.jpeg",
        "hasCoupon": false,
        "hasMallCoupon": false,
        "lgstTxt": "高",
        "mallCouponDiscountPct": 0,
        "mallCouponEndTime": "1970-01-01 08:00:00",
        "mallCouponMaxDiscountAmount": 0,
        "mallCouponMinOrderAmount": 0,
        "mallCouponRemainQuantity": 0,
        "mallCouponStartTime": 0,
        "mallCouponTotalQuantity": 0,
        "mallCps": 1,
        "mallId": 574908643,
        "mallName": "和路雪官方旗舰店",
        "merchantType": 3,
        "minGroupPrice": 83,
        "minNormalPrice": 108.1,
        "onlySceneAuth": true,
        "optId": 13,
        "optIds": [
            3552,
            12402,
            10723,
            22932,
            22949,
            10696,
            22280,
            22281,
            10700,
            13,
            22926,
            3551
        ],
        "optName": "水果",
        "planType": 2,
        "predictPromotionRate": 40,
        "promotionRate": 40,
        "salesTip": "1.7万",
        "serviceTags": [
            36,
            13
        ],
        "servTxt": "高",
        "shareRate": 0,
        "unifiedTags": [
            "品质险",
            "48小时发货"
        ],
        "videoUrls": [],
        "zsDuoId": 0
    }
}
错误码列表: