公共参数:
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中) |
secret | String | 是 | 调用密钥 |
api_name | String | 是 | API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等] |
cache | String | 否 | [yes,no]默认yes,将调用缓存的数据,速度比较快 |
result_type | String | 否 | [json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读 |
lang | String | 否 | [cn,en,ru]翻译语言,默认cn简体中文 |
version | String | 否 | API版本 |
请求参数:
请求参数:shop_id=433655136&page=1&sort=
参数说明: shop_id:shop_id page:页码
sort:排序[new,bid,sale]
(new 新品,bid:价格,sale:销量,bid加_前缀为从大到小排序)\
响应参数:
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
num_iid | Bigint | 0 | 579813460997 | 商品ID |
pic_url | String | 0 | //img.alicdn.com/bao/uploaded/i3/478952498/O1CN011UK7q9WzgFGKQw8_!!478952498.jpg | 图片地址 |
title | String | 0 | 英伦小皮鞋女复古2020秋冬新款网红毛毛鞋女百搭外穿粗跟中跟单鞋 | 店铺标题 |
orginal_price | String | 0 | 398.00 | 优惠价 |
price | Float | 0 | 148 | 价格 |
sales | Int | 0 | 7 | 销量 |
detail_url | String | 0 | //item.taobao.com/item.htm?id=579813460997 | 宝贝链接 |
请求示例:
<?php
// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/taobao/item_search_shop/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&shop_id=433655136&page=1&sort=";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>
响应示例:
---------------------------------------
{
"items": {
"shop_id": "433655136",
"page": "1",
"has_next_page": "true",
"real_total_results": "72",
"total_results": "72",
"p