获取抖音店铺所有商品详情

发布于:2022-08-06 ⋅ 阅读:(435) ⋅ 点赞:(0)

“抖音门店,也叫做抖店,是抖音app针对中小客户推出的一款区域营销产品,能够满足线上开店诉求,主力线上种草和线下转化, 基于地理位置发布视频优先推荐给本地用户,店铺可在线上持续曝光,且精准促进本地品牌升级。通过营销组件,获取店铺信息,配合优惠活动,加速用户线下消费决策,满足客户抖音开店,打造抖音专属店铺。”

一、首先准备准备环节

1)开发者注册一个账号

2)然后为每个 应用注册一个应用程序键(App Key) 。

3)下载 API的SDK并掌握基本的API基础知识和调用

4)利用SDK接口和对象,传入AppKey或者必要的时候获取并传入SessionKey来进行程序开发。

5)利用平台的文档中心和API测试工具,对接口进行测试。从而了解返回信息,方便程序获取。

以上是一般 API应用开发的关键流程,其中通过文档中心和API测试工具,进行概念了解和接口信息查询很重要。因为这些数据就是我们需要在逐步显示出来的。的API很多,不过都分为了好几个领域,慢慢就会了解深入了。

二、测试环节

1.公共参数

请求地址: https://api-gw.onebound.cn/douyin/item_search_shop

名称 类型 必须 描述
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.请求参数

请求参数:shopid=sXahcZg&page=1

参数说明:shopid:店铺id,page:页数

3.响应参数

Version: Date:

名称 类型 必须 示例值 描述

items

items[] 0 店铺的所有商品

num_iid

Bigint 0 3551692711612573245 宝贝ID

title

String 0 【古蒂歌品牌】夏季薄款衬衫女短袖衬衣高级感半袖气质缎面上衣 商品标题

pic_url

String 0 https://p6-item.ecombdimg.com/img/ecom-shop-material/v1_sXahcZg_71031197380750871080996_58104209179cbded65114ed90bd9caeb_sx_87529_www754-754~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg 宝贝图片

price

Float 0 69 价格

detail_url

String 0 https://haohuo.jinritemai.com/views/product/item2?id=3551692711612573245 商品链接

4.请求示例

	
-- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api-gw.onebound.cn/douyin/item_search_shop/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&shopid=sXahcZg&page=1"

5.响应示例

{
user: null,
items: {
item: [
{
num_iid: "3551692711612573245",
pic_url: "https://p6-item.ecombdimg.com/img/ecom-shop-material/v1_sXahcZg_71031197380750871080996_58104209179cbded65114ed90bd9caeb_sx_87529_www754-754~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "【古蒂歌品牌】夏季薄款衬衫女短袖衬衣高级感半袖气质缎面上衣",
promotion_price: 69,
price: 69,
sales: "4000+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3551692711612573245"
},
{
num_iid: "3541684909523510402",
pic_url: "https://p3-item.ecombdimg.com/img/ecom-shop-material/v1_sXahcZg_70833697967162002260996_2b8cf0a041a00123b6b1066d613793a3_sx_419574_www800-800~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "2022夏季缎面衬衫女宽松短袖气质垂直感衬衣金属扣时尚显瘦上衣",
promotion_price: 75,
price: 75,
sales: "1000+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3541684909523510402"
},
{
num_iid: "3485664239757227007",
pic_url: "https://p26-item.ecombdimg.com/img/temai/2af8694d50f1f2cd121491564159ac53www750-750~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "【古蒂歌品牌】2022夏季新款印花吊带裙碎花长裙洋气百搭连衣裙",
promotion_price: 79,
price: 79,
sales: "1.7万+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3485664239757227007"
},
{
num_iid: "3553995462547743236",
pic_url: "https://p3-item.ecombdimg.com/img/ecom-shop-material/v1_sXahcZg_70849829944104389150996_526f33c2ea00caf2cd381ab3eac68919_sx_101246_www722-722~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "[丽公主专属] GD006法式圆领套头灯笼袖衬衫女夏新款设计感上衣",
promotion_price: 75,
price: 75,
sales: "1000+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3553995462547743236"
},
{
num_iid: "3423488863560176006",
pic_url: "https://p9-item.ecombdimg.com/img/temai/28c8ee77ae54ee0b800089c66d00c5da09a58164www800-800~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "高端缎面A字大摆裙气质复古弹力半身裙2022夏新款女装长裙",
promotion_price: 69,
price: 69,
sales: "5000+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3423488863560176006"
},
{
num_iid: "3479353912593628564",
pic_url: "https://p6-item.ecombdimg.com/img/temai/ba43ddac57777569ec2aae692ab8d1551dc66404www1200-1200~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "打底内搭上衣 无袖外搭配小西装的气质背心",
promotion_price: 39,
price: 39,
sales: "2000+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3479353912593628564"
},
{
num_iid: "3418554027556921923",
pic_url: "https://p26-item.ecombdimg.com/img/temai/fa0d4fe6ec01b78cadea014ae6338130www800-800~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "【古蒂歌品牌】高档缎面阔腿直筒裤女夏季新款气质长裤",
promotion_price: 79,
price: 79,
sales: "9000+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3418554027556921923"
},
{
num_iid: "3466926714179963316",
pic_url: "https://p26-item.ecombdimg.com/img/ecom-shop-material/v1_sXahcZg_70875363876033170040996_e7ef95b35d104ef042024ede3465f421_sx_122249_www750-750~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "【古蒂歌品牌】高档缎面V领衬衫 刺绣拼接轻奢女装",
promotion_price: 69,
price: 69,
sales: "5000+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3466926714179963316"
},
{
num_iid: "3551776394772091872",
pic_url: "https://p6-item.ecombdimg.com/img/ecom-shop-material/v1_sXahcZg_71035527190932196190996_80deae6fedac505429a6a444468b1e82_sx_412724_www800-800~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "【古蒂歌品牌】洋气衬衣女长袖缎面宽松设计感衬衫",
promotion_price: 69,
price: 69,
sales: "100+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3551776394772091872"
},
{
num_iid: "3551148899957885269",
pic_url: "https://p26-item.ecombdimg.com/img/ecom-shop-material/v1_sXahcZg_71022977585984637590996_cf96b61cb4150e5f5be1f090796cdaf7_sx_65783_www800-800~tplv-5mmsx3fupr-re_cp:332:332:q100.jpeg",
title: "设计感女衬衫小众2022夏季新款v领雪纺小衫上衣职业宽松短袖",
promotion_price: 79,
price: 79,
sales: "100+",
detail_url: "https://haohuo.jinritemai.com/views/product/item2?id=3551148899957885269"
}
],
total_results: 100,
page_size: null,
pagecount: 100,
page: null,
url: null
},
error: "",
secache: "370f93a323de230f1b0eec77522d1340",
secache_time: 1656058512,
secache_date: "2022-06-24 16:15:12",
translate_status: "",
translate_time: 0,
language: {
default_lang: "cn",
current_lang: "cn"
},
reason: "",
error_code: "0000",
cache: 1,
api_info: "today:- max:101000 all[=++];expires:2030-12-31",
execution_time: "0.153",
server_time: "Beijing/2022-06-24 17:10:29",
client_ip: "127.0.0.1",
call_args: {
seller_nick: "sXahcZg",
start_price: "1"
},
api_type: "douyin",
server_memory: "3.02MB",
last_id: false
}

6.异常示例

{
  "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": "douyin",
  "request_id": "15ee0ffc041242"}

7.错误码解释

状态代码(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 未知错误


 

本文含有隐藏内容,请 开通VIP 后查看