首页 > 其他分享 >淘宝/天猫按分类搜索直播接口 API 返回值说明

淘宝/天猫按分类搜索直播接口 API 返回值说明

时间:2023-04-13 15:24:25浏览次数:47  
标签:num img url 天猫 API alicdn 返回值 com id

前言

自从2016年直播行业的爆发以来,直播平台、观众数量都呈井喷式发展,我国网络直播行业呈现井喷式发展。网络直播利用互联网实现了信息的实时共享,开启了全新的社交网络交互方式,被称之为拥有千亿市场的新兴产业。同时在国家文化的政策支持下,网络基础设施和移动宽带的加速普及、视频技术的日趋成熟、资本的助推等利好因素推动下,网络直播行业呈高速发展。 今天小编就向大家展示下直播接口API的具体操作及说明:

item_videolist-按分类搜索淘宝直播接口

公共参数

名称 类型 必须 描述
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版本

请求参数测试

请求参数:channelId=0&page=1

参数说明:channelId:视频分类ID
page页数


响应参数

Version: Date:

名称 类型 必须 示例值 描述
title

String 0 年货盛宴 心意之选 商品标题
num_iid

Bigint 0 294846800380 宝贝ID
view_count

Int 0 890 观看人数
pic_url

String 0 https://gw.alicdn.com/tfscom/i1/O1CN019WuTCM1WkoKlZhTPU_!!0-dgshop.jpg 宝贝图片
detail_url

String 0 //h5.m.taobao.com/taolive/video.html?id=294846800380 宝贝链接
seller_info

Mix 0 {"user_num_id": 2064892827, "head_img": "//img.alicdn.com/imgextra/i4/2064892827/O1CN01FQoRJd1WkoJuNhJOw_!!2064892827-0-beehive-scenes.jpg", "seller_nick": "雅诗兰黛旗舰店"} 卖家信息
请求示例

#include<iostream>
#include<string>
#include<curl/curl.h>

using namespace std;

static size_t Data(void *ptr, size_t size, size_t nmemb, string *stream)
{
std::size_t realSize = size *nmemb;
auto *realPtr = reinterpret_cast<char *>(ptr);

for (std::size_t i=0;i<realSize;++i) {
*(stream) += *(realPtr + i);
}

return realSize;
}

int main(){

CURL *curl;
CURLcode result;
string readBuffer;
curl = curl_easy_init();

if(curl) {

curl_easy_setopt(curl, CURLOPT_URL, "https:/v-x-;18870288846/key=<您自己的apiKey>&secret=<您自己的apiSecret>&channelId=0&page=1");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, Data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);

result = curl_easy_perform(curl);

if(result == CURLE_OK) {
cout<<readBuffer<<endl;
}else{
cerr<<"curl_easy error:"<<curl_easy_strerror(result)<<endl;
}

curl_easy_cleanup(curl);
}
return 0;
}

响应示例

{
"items": {
"channel_id": 0,
"page": "5",
"page_size": 10,
"real_total_results": 1000,
"total_results": 1000,
"page_count": 100,
"data_from": "app",
"item": [
{
"title": "有温度的小石头",
"num_iid": "295999018811",
"view_count": "215",
"pic_url": "https://img.alicdn.com/imgextra/i1/6000000006651/O1CN01G4pLtF1z0CtBZSU7F_!!6000000006651-0-tblive.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=295999018811",
"seller_info": {
"user_num_id": "59632",
"head_img": "//img.alicdn.com/imgextra/i3/6000000006633/O1CN01Qb05DO1yrxklqRO7j_!!6000000006633-0-tblive.jpg",
"seller_nick": "善石柏缘"
}
},
{
"title": "小玩通的直播间",
"num_iid": "295408948484",
"view_count": "10",
"pic_url": "https://img.alicdn.com/imgextra/i2/O1CN01v5Ks0Z1wsIoMjVn0m_!!0-tbCommonAudio.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=295408948484",
"seller_info": {
"user_num_id": "254632",
"head_img": "//gdp.alicdn.com/shop-logo//11/68/TB1cQ9JLrrpK1RjSZTESuwWAVXa.jpg",
"seller_nick": "小哈香水严选"
}
},
{
"title": "新年囤好货新店大酬宾",
"num_iid": "295773049663",
"view_count": "12",
"pic_url": "https://gw.alicdn.com/tfscom/i1/O1CN010Y9BYE1al305W4aex_!!0-dgshop.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=295773049663",
"seller_info": {
"user_num_id": "403369",
"head_img": "//gdp.alicdn.com/shop-logo//45/42/TB15C2n3uL2gK0jSZFmwu37iXXa.png",
"seller_nick": "家乡好优选"
}
},
{
"title": "年货福利来啦",
"num_iid": "296049354114",
"view_count": "500",
"pic_url": "https://img.alicdn.com/imgextra/i1/O1CN01xTxskf1CfVQlLcAhd_!!0-tbCommonAudio.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=296049354114",
"seller_info": {
"user_num_id": "1148032",
"head_img": "//img.alicdn.com/imgextra/i4/1148032/TB2_2Tzzv5TBuNjSspmXXaDRVXa_!!1148032-0-beehive-scenes.jpg",
"seller_nick": "港仔先生"
}
},
{
"title": "大码女靴断码清仓处理",
"num_iid": "296024138273",
"view_count": "291",
"pic_url": "https://gw.alicdn.com/tfscom/i1/O1CN01TS0ijV1jceHIogR40_!!0-dgshop.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=296024138273",
"seller_info": {
"user_num_id": "1264569",
"head_img": "//gdp.alicdn.com/shop-logo//dc/5b/TB1Y1L7SpXXXXXHXXXXSutbFXXX.jpg",
"seller_nick": "王小妖大码女鞋"
}
},
{
"title": "各店的300-130",
"num_iid": "296254443199",
"view_count": "4228",
"pic_url": "https://gw.alicdn.com/tfscom/i1/O1CN01UZHHAP1CqUw7GNmz0_!!0-dgshop.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=296254443199",
"seller_info": {
"user_num_id": "10820132",
"head_img": "//img.alicdn.com/imgextra/i2/6000000006283/O1CN01QYWUUQ1wHf5qtd07i_!!6000000006283-0-tblive.jpg",
"seller_nick": "果爸书书"
}
},
{
"title": "库茵新品上新",
"num_iid": "295757777888",
"view_count": "9307",
"pic_url": "https://img.alicdn.com/imgextra/i3/6000000005960/O1CN01PYzift1ttjAbTeOvx_!!6000000005960-0-tblive.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=295757777888",
"seller_info": {
"user_num_id": "27763132",
"head_img": "//gw2.alicdn.com/tfscom/tuitui/TB1n0d2LXXXXXXFapXXXXXXXXXX",
"seller_nick": "叭哒女王"
}
},
{
"title": "zhyt828的直播间",
"num_iid": "295755881697",
"view_count": "430",
"pic_url": "https://img.alicdn.com/imgextra/i3/6000000003073/O1CN017gZnm51YZTkyshbyk_!!6000000003073-0-tblive.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=295755881697",
"seller_info": {
"user_num_id": "30586132",
"head_img": "//gdp.alicdn.com/shop-logo//b1/2a/TB10A9RiAyWBuNjy0FpSuussXXa.jpg",
"seller_nick": "金华佛手"
}
},
{
"title": "年终大促~T特价场",
"num_iid": "295440344582",
"view_count": "560",
"pic_url": "https://img.alicdn.com/imgextra/i1/O1CN01qnzeQP1FY7tbw0Nnm_!!0-tbCommonAudio.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=295440344582",
"seller_info": {
"user_num_id": "36239832",
"head_img": "//img.alicdn.com/imgextra/i3/36239832/O1CN01syc4oh2MV6iY6dGSv_!!36239832-0-beehive-scenes.jpg",
"seller_nick": "COSHMIR"
}
},
{
"title": "新年背新包特惠抢不停",
"num_iid": "296239047108",
"view_count": "48",
"pic_url": "https://gw.alicdn.com/tfscom/i4/O1CN01pjx0gq1YXeBPZifrk_!!0-dgshop.jpg",
"detail_url": "//h5.m.taobao.com/taolive/video.html?id=296239047108",
"seller_info": {
"user_num_id": "36453069",
"head_img": "//gdp.alicdn.com/shop-logo/https://img.alicdn.com/imgextra/i4/6000000005925/O1CN01D9n0TY1tdhKqfGOYi_!!6000000005925-0-shopmanager.jpg",
"seller_nick": "宁远包包"
}
}
]
},
"error": "",
"reason": "",
"error_code": "0000",
"cache": 0,
"api_info": "today:27 max:10000",
"execution_time": 0.637,
"server_time": "Beijing/2021-01-20 16:32:35",
"client_ip": "115.151.186.91",
"call_args": [],
"api_type": "taobao",
"translate_language": "zh-CN",
"translate_engine": "google_cn",
"server_memory": "5.34MB",
"request_id": "4.6007eaa2e0364"
}
文章内容有限,欢迎私信沟通交流。

标签:num,img,url,天猫,API,alicdn,返回值,com,id
From: https://www.cnblogs.com/Cris20230328/p/17314955.html

相关文章

  • 用quasar+vue3+组合式api VueRouter实现路由嵌套(二级路由)
    前言:本项目使用的是quasar创建,vue3的组合式api语法。部分语法不同,但不影响理解,修改语法后可以在vue2/选项式api项目中运行。效果图:文件目录结构和代码如下:   文中用到的标题栏数据如下:consttitles=ref([{name:"首页",path:"home",children:[]},{......
  • 天猫数据分析软件:2023年3月防蚊防虫用品十大品牌排行榜
    随着露营、飞盘、冲浪等户外运动掀起热潮后,蚊虫叮咬成了不少户外运动玩家的心头痛。不过从市场端来看,这却是一个不可多得的商机。“户外防蚊防虫”,成为户外经济的垂类增长点。户外消费场景的持续火爆,带动了防蚊防虫产品销量的增长。根据鲸参谋电商数据显示,2023年3月份在天猫平台上,......
  • 反欺诈(羊毛盾)API 实现用户行为分析的思路分析
    简介反欺诈(羊毛盾)API是一种用于识别和防范各种欺诈行为的技术解决方案。它可集成到各种应用程序和平台中,通过手机号码、手机IP进行异常检测,达到防范恶意注册、虚假评论、虚假交易等欺诈行为的目的。本文主要介绍反欺诈(羊毛盾)API的工作原理、以及在用户行为分析技术、地理位置......
  • 拼多多按关键字搜索商品 API
    一、拼多多平台优势:1、独创拼团模式拼团拼单是拼多多独创的营销模式,其特点是基于人脉社交的裂变传播,非常具有传播性。由于本身走低价路线,加上拼单折扣,商品的分享和人群裂变效果非常明显,电商前期最难在于吸引用户,拼多多初期利用低价拼团模式,快速大量的分享曝光可以把产品知名度很快......
  • android: 平台版本对应api及占比统计(android studio 2022.1.1)
    一,查看平台版本对应的api官方文档地址:https://developer.android.google.cn/guide/topics/manifest/uses-sdk-element.html?utm_campaign=adp_series_sdkversion_010616&utm_source=medium&utm_medium=blog&hl=zh-cn#ApiLevels如图: 二,查看各版本的支持比率:启动androi......
  • 让 Spartacus 服务器端渲染引入 long API 调用超时机制的两种配置方法
    两种方法,使用config.backend.timeout={浏览器:...,服务器:...},或者可以更具体地配置,即基于Request粒度,通过将HTTP_TIMEOUT_CONFIGHttpContextToken传递给AngularHttpClient的方法来针对每个具体请求进行配置。在SSR(Node.js)中,超时处理耗时过长的外部http调用是一项尤为重......
  • Springmvc常用注解参数与返回值
    1.常用注解1.1.@RequestMapping@RequestMapping注解是一个用来处理请求地址映射的注解,可用于映射一个请求或一个方法,可以用在类或方法上。标注在方法上用于方法上,表示在类的父路径下追加方法上注解中的地址将会访问到该方法@ControllerpublicclassHelloController{......
  • 从0到1手把手教你ASP.NET Core Web API项目配置接口文档Swagger(二)
    传送门:从0到1手把手教你ASP.NETCoreWebAPI项目配置接口文档Swagger(一)一、设置Swagger页面为首页——开发环境我们虽然可以在输入/swagger后顺利的访问SwaggerUI页面,但是我们发现每次运行项目都会默认访问/weatherforecast这个接口,想要将启动页设为/swagger(或者其他......
  • API通用调用帮助类
    1//调用示例2///<summary>3///HttpPath请求4///</summary>5///<paramname="serviceUrl">请求地址</param>6///<paramname="data">发送数据</param>7......
  • Nvidia Tensor Core-WMMA API编程入门
    1WMMA(Warp-levelMatrixMultiplyAccumulate)API对于计算能力在7.0及以上的CUDA设备,可以使用CUDAC++API调用TensorCore,支持形如D=AB+C的混合精度的矩阵乘运算。template<typenameUse,intm,intn,intk,typenameT,typenameLayout=void>classfragment;......