根据关键词调用淘宝相关商品API接口(基于大淘客) 1,不用说了先下载他们的SDK包 2,以帝国CMS为例,代码如下: [ol]setAppKey($appkey);$client->setAppSecret($appsecret);$client->setVersion('v3.0.0');$method = 'get'; $url="https://openapi.dataoke.com/api/goods/list-super-goods";// 根据关键词匹配淘宝商品$params = ['type' => 0,'pageId' => 1,'pageSize' => 10,'keyWords' => $keyWords,];$result = $client->doRequest($method, $url, $params);$resultt=json_decode($result);$resu=$resultt->data;$array = (array)$resu;$shop = $array['list'];if(empty($shop)){$url = "https://openapi.dataoke.com/api/goods/super-discount-goods"; // API的URL,返回最新的折上再折的商品合集$params = ['pageId' =>1,'pageSize' => 10,];$result = $client->doRequest($method, $url, $params); $resultt=json_decode($result);$resu=$resultt->data;$array = (array)$resu;$shop =$array['list'];}$json = json_encode($shop);echo $json;[/ol]复制代码至于发起AJAX请求请自行脑补。 淘宝, 关键词