1、公共参数
请求地址: https://api-gw.onebound.cn/shopee/item_search
| 名称 | 类型 | 必须 | 描述 |
|---|---|---|---|
| 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版本 |
2、请求参数
请求参数:q=dress&page=1&sort=&country=.com.my
参数说明:q:搜索关键词-country:网站后缀(.com.my;.vn;.ph),
sort:排序[bid,_bid,_sale,new]
(bid:总价,sale:销量,new:新品,加_前缀为从大到小排序)
page:页数
3、响应参数
Version: Date:
| 名称 | 类型 | 必须 | 示例值 | 描述 |
|---|---|---|---|---|
| items | item[] | 0 | 根据关键词取商品列表 | |
| title | String | 0 | Real Shot Long Dress Female Summer New Womens Waist Slimming Dress Summer Temperament Dress Popular Fake Two-Piece Dres | 商品标题 |
| pic_url | String | 0 | https://cf.shopee.com.my/file/902d7fd4f24d056d89163e4f32fcc8c2 | 宝贝图片 |
| promotion_price | Float | 0 | 82.00 | 优惠价 |
| price_range | Float | 0 | 0 | 折扣价 |
| price | Float | 0 | 82.00 | 价格 |
| sales | Int | 0 | 0 | 销量 |
| num_iid | Bigint | 0 | 334425154/8200081234 | 宝贝ID |
| shop_id | Bigint | 0 | 334425154 | 店铺ID |
| area | String | 0 | Kuala Lumpur | 店铺所在地 |
| detail_url | String | 0 | https://shopee.com.my/product/334425154/8200081234 | 宝贝链接 |
4、请求示例
<?php
// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/shopee/item_search/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&q=dress&page=1&sort=&country=.com.my";
$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));
?>
5、响应示例
{
"error": "item-not-found",
"reason": "商品没找到",
"error_code": "2000",
"success": 0,
"cache": 0,
"api_info": "today:0 max:10000",
"execution_time": 0.081,
"server_time": "Beijing/2020-06-10 23:44:00",
"call_args": [],
"api_type": "taobao",
"request_id": "15ee0ffc041242"}
最后
以上就是感性冰淇淋最近收集整理的关于根据关键词获取虾皮商品列表 API 返回值说明的全部内容,更多相关根据关键词获取虾皮商品列表内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。

发表评论 取消回复