请求参数:q=连衣裙&page=1&sort=
参数说明:q:关键词,
filter:搜索类型:filter=video 搜索视频、filter=goods 搜索商品、filter=user 搜索用户,
page:页数
sort:排序(目前只视频可排序):sort=new 最新发布 sort=credit 最多点赞 sort=bid 综合排序
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
items | items[] | 0 | 按关键字搜索商品 |
点击注册key和secret
请求示例
<?php
// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/douyin/item_search/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&q=连衣裙&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": {
"page": "1",
"real_total_results": 500,
"total_results": 500,
"page_size": 20,
"pagecount": 25,
"item": [
{
"title": "【清子】显瘦小蛮腰~新款定制设计春装卫衣连衣裙L0788",
"pic_url": "https://p6-aio.ecombdimg.com/obj/ecom-shop-material/v1_cbrNegKF_70732696448192514710931_f48788ff100d9afb00d63ed437357f29_sx_920709_www2891-2891",
"promotion_price": 169,
"price": 169,
"sales": 17872,
"num_iid": 3536467110454782000,
"shop_name": "MDNW服饰",
"shop_id": 9088931,
"detail_url": "https://haohuo.jinritemai.com/views/product/item2?id=3536467110454782196&pick_source=Nvt7YLu"
},
{
"title": "【诗雨推荐】时尚气质休闲连衣裙",
"pic_url": "https://p9-aio.ecombdimg.com/obj/ecom-shop-material/v1_yjSJQYM_70770131096798824990399_b8a44fa0240e628775f3b8c4fbee085d_sx_342317_www782-782",
"promotion_price": 59.9,
"price": 59.9,
"sales": 19871,
"num_iid": 3536848