淘宝商品详情api接口 淘宝全网商品详情api接口 淘宝商品sku价格api接口

获取淘宝详情、商品原价、促销价、实时销量、库存、视频地址、商品主图、sku价格信息等等..

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

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

2、获取接口秘钥apikey

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

3、PHP代码调用示例

<?php
// +----------------------------------------------------------------------
// | 订单侠开放平台 www.dingdanxia.com  [ 专为淘客开发者提供一站式API解决方案 ] 
// +----------------------------------------------------------------------
//接口秘钥
$apikey = '这里填写你的apikey';
//淘宝全网商品详情api接口
$apiurl = "http://api.tbk.dingdanxia.com/shop/good_info";


//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
	//商品id
	"id"        => "572096814881",
        //数据格式, part :返回部分数据 ,all:返回全部数据,如需更多数据请传all
        "info"      => "all"
));


//打印结果
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】",
    "data": {
        "title": "行车记录仪前后双录镜头无线高清夜视汽车载电子狗一体机全景",
        "categoryId": "50023120",
        "sellCount": "5891",
        "reserve_price": "268-458",
        "zk_final_price": "188-328",
        "video": "https://cloud.video.taobao.com/play/u/2096615956/p/2/e/6/t/1/50176166419.mp4?appKey=38829",
        "rate": {
            "totalCount": "41378",
            "keywords": [
                {
                    "attribute": "620-11",
                    "word": "质量很好",
                    "count": "1407",
                    "type": "1"
                },
                {
                    "attribute": "731-11",
                    "word": "功能正面",
                    "count": "834",
                    "type": "1"
                },
                {
                    "attribute": "10120-11",
                    "word": "服务态度好",
                    "count": "613",
                    "type": "1"
                },
                {
                    "attribute": "520-11",
                    "word": "便宜",
                    "count": "587",
                    "type": "1"
                },
                {
                    "attribute": "20520-11",
                    "word": "性价比高",
                    "count": "371",
                    "type": "1"
                },
                {
                    "attribute": "20420-13",
                    "word": "快递服务差",
                    "count": "392",
                    "type": "-1"
                }
            ]
        },
        "seller": {
            "shopName": "裕创意旗舰店",
            "shopIcon": "//img.alicdn.com/imgextra//fa/4c/TB1rd_aGFXXXXbbXXXXSutbFXXX.jpg",
            "taoShopUrl": "//shop.m.taobao.com/shop/shop_index.htm?user_id=2096615956&item_id=562554411711",
            "evaluates": [
                {
                    "title": "宝贝描述",
                    "score": "4.8 ",
                    "levelText": "4.8 "
                },
                {
                    "title": "卖家服务",
                    "score": "4.7 ",
                    "levelText": "4.7 "
                },
                {
                    "title": "物流服务",
                    "score": "4.7 ",
                    "levelText": "4.7 "
                }
            ]
        }
    }
}

接口文档:https://www.dingdanxia.com/doc/89/14

在线测试:https://www.dingdanxia.com/apitest/89/14

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

抵扣说明:

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

余额充值