快手根据关键词取商品列表 API 返回值说明
阅读原文时间:2023年09月01日阅读:10

公共参数

名称

类型

必须

描述

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版本

请求参数

请求参数:q=衣服

参数说明:q:关键词,

响应参数

Version: Date:2023-05-29

名称

类型

必须

示例值

描述

items

items[]

0

 

按关键字搜索商品

page

Int

0

1

页码

real_total_results

Int

0

1900

宝贝数量

total_results

Int

0

1900

宝贝数量

page_size

Int

0

20

接口返回数量

pagecount

Int

0

120

总页数

data_from

String

0

 

 

item

item[]

0

 

宝贝详情数据

请求示例

-- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api-gw.onebound.cn/ks/item_search/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&q=衣服"

响应示例

"item": [
{
"title": "男女同款休闲百搭【AB面 小恶魔】纯棉短袖T恤",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/item-407236546-96263f11e2cc4b228247db39d0191c77.jpg",
"promotion_price": "19.9",
"price": "19.9",
"num_iid": "4310335500546",
"seller_id": 407236546,
"shop_name": "达人丽丽教搭配个体店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=4310335500546"
},
{
"title": "高品质棉2023新款夏季男士短袖t恤韩版上衣潮流休闲纯棉半袖体恤",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/ITEM_IMAGE-3036128838-ac48e9d3481745a4bc0f84671c96ea5e.jpg",
"promotion_price": "19.9",
"price": "19.9",
"num_iid": "20049457603838",
"seller_id": 3036128838,
"shop_name": "而潮虎门专卖店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=20049457603838"
},
{
"title": "【小china】重磅纯棉短袖T恤男士夏季新款半袖上衣潮流体恤衫彩T",
"pic_url": "https://u1-203.ecukwai.com/ufile/adsocial/203aed36-0c3b-478a-8f0f-617ba1fecb5d.jpg",
"promotion_price": "19.8",
"price": "19.8",
"num_iid": "200031700580",
"seller_id": 509571580,
"shop_name": "伟足仕南宫市朋专卖店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=200031700580"
},
{
"title": "若态美式复古潮男t恤2023新款夏季白色短袖简约百搭五分袖ins港风",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/ITEM_IMAGE-1310750239-14e420b41e3c4d2b906808b75032437a.jpg",
"promotion_price": "18.99",
"price": "18.99",
"num_iid": "20063004618239",
"seller_id": 1310750239,
"shop_name": "若态鞋靴旗舰店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=20063004618239"
},
{
"title": "夏季冰丝t恤男圆领速干衣短袖薄款透气半袖大码上衣男运动宽松潮",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/item-464975201-c1ca097d86634cf1917fd3e3d7b80344.jpg",
"promotion_price": "19.9",
"price": "19.9",
"num_iid": "4375767480201",
"seller_id": 464975201,
"shop_name": "胖嘟嘟潮童一号店个人店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=4375767480201"
},
{
"title": "夏季纯棉短袖男士t恤2023新款半袖男生上衣潮流全棉体恤衫男装",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/item-509571580-f72337c541e24652b1d01779e5a5f28b.jpg",
"promotion_price": "19.8",
"price": "19.8",
"num_iid": "1370998092580",
"seller_id": 509571580,
"shop_name": "伟足仕南宫市朋专卖店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=1370998092580"
},
{
"title": "冰丝短袖t恤男士夏季宽松大码男装休闲百搭体恤衫韩版潮流衣服男T",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/9793074d-df89-414d-84ff-9c7a454c9af7-i1657555655137.jpg",
"promotion_price": "38.9",
"price": "38.9",
"num_iid": "4679125958756",
"seller_id": 1851271756,
"shop_name": "小萧工厂个体店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=4679125958756"
},
{
"title": "短袖t恤男夏季ins韩版宽松男士半袖男体恤上衣2023新款潮流T恤衫",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/item-2923325328-90c85e0ecfba44208a123812183ecafe.jpg",
"promotion_price": "15.9",
"price": "15.9",
"num_iid": "20204628342328",
"seller_id": 2923325328,
"shop_name": "棉小仔工厂店个体店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=20204628342328"
},
{
"title": "夏季洋气纯棉短袖 男女同款T恤-BOBU熊",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/ITEM_IMAGE-2258939776-55a34afc4a3d423e8abc9b42f6396b3b.jpg",
"promotion_price": "16.9",
"price": "16.9",
"num_iid": "20004949183776",
"seller_id": 2258939776,
"shop_name": "静水服装店个体店",
"detail_url": "https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=20004949183776"
},
{
"title": "567【厂家直发】冰丝男士短袖t恤透气潮流",
"pic_url": "https://u1-203.ecukwai.com/bs2/image-kwaishop-product/ITEM_IMAGE-1462676857-ed3b66c482d04f1b978a342b812b9cfd.jpg",
"promotion_price": "18.8",
"price": "18.8",
"num_iid": "20277721274857",
"seller_id": 1462676857,
"shop_name": "闲生的小店个体店","detail_url":"https://app.kwaixiaodian.com/page/kwaishop-goods-detail-h5-vue/detail?id=20277721274857"}]},"error":"","translate_status":"","translate_time":0,"language":{"default_lang":"cn","current_lang":"cn"},"reason":"","error_code":"0000","cache":0,"api_info":"today:5 max:30000 all[7=5+0+2];expires:2024-05-20","execution_time":"0.579","server_time":"Beijing/2023-05-29 11:21:26","client_ip":"106.6.37.94","call_args":{"num_iid":"20046611202546"},"api_type":"ks","translate_language":"zh-CN","translate_engine":"baidu","server_memory":"3.08MB","request_id":"1.64741a35a4d99","last_id":"1770033004"}

异常示例

{
"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": "ks",
"request_id": "20046611202546"}

相关资料

错误码解释

状态代码(error_code)

状态信息

详细描述

是否收费

0000

success

接口调用成功并返回相关数据

2000

Search success but no result

接口访问成功,但是搜索没有结果

4000

Server internal error

服务器内部错误

4001

Network error

网络错误

4002

Target server error

目标服务器错误

4003

Param error

用户输入参数错误

忽略

4004

Account not found

用户帐号不存在

忽略

4005

Invalid authentication credentials

授权失败

忽略

4006

API stopped

您的当前API已停用

忽略

4007

Account stopped

您的账户已停用

忽略

4008

API rate limit exceeded

并发已达上限

忽略

4009

API maintenance

API维护中

忽略

4010

API not found with these values

API不存在

忽略

4012

Please add api first

请先添加api

忽略

4013

Number of calls exceeded

调用次数超限

忽略

4014

Missing url param

参数缺失

忽略

4015

Wrong pageToken

参数pageToken有误

忽略

4016

Insufficient balance

余额不足

忽略

4017

timeout error

请求超时

5000

unknown error

未知错误