组件详细数据
接口说明
获取小程序的留资组件配置的组件详细数据。数据内容可参考“小程序控制台-数据-数据中心-能力-线索组件-组件详细数据”页面
使用限制
- 每日 14:00 前更新前一日数据
- 只能查询昨天以前,且是近90天内的数据
基本信息
| 名称 | 描述 |
|---|---|
| HTTP URL | https://open.douyin.com/api/platform/v2/data_analysis/query_component_with_detail/ |
| HTTP Method | POST |
| 权限要求 | 服务商代调用场景下,需商家授予数据分析权限集 |
请求参数
请求头
access-token必填String
当服务商时,调用https://open.douyin.com/oauth/client_token/生成的token
当非服务商时,调用https://open.douyin.com/api/tpapp/v2/auth/get_auth_token/生成的token
当非服务商时,调用https://open.douyin.com/api/tpapp/v2/auth/get_auth_token/生成的token
content-type必填String
示例:application/json
固定值"application/json"
Body
end_time必填Int64
结束时间,必须是昨天以前的某个时间戳
is_query_live必填Bool
是否查询直播维度
is_query_video必填Bool
是否查询短视频维度
page_no必填Int64
页号
page_size必填Int64
页面大小,最大50
start_time必填Int64
开始时间,必须是昨天以前的某个时间戳
componentId_listArray<String>
组件配置id(配置的唯一标识)
请求示例
curl --location --request POST 'https://open.douyin.com/api/platform/v2/data_analysis/query_component_with_detail/' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \ --data '{"start_time":1113398621,"end_time":377200,"componentId_list":[], "is_query_live": true, "is_query_video":false, "page_no":1, "page_size": 10}'
响应参数
Body展开全部子属性
err_msg必填String
错误信息
err_no必填Int32
错误码
log_id必填String
排查错误的logId
dataStruct
展开子属性
响应示例
正常响应示例异常响应示例
{ "data": { "LiveData": { "Total": 1, "DataList": [ { "Data": { "ComponentClickPv": 9, "ComponentClickUv": 2, "ComponentId": "", "ComponentName": "", "ComponentReportPv": 1, "ComponentReportUv": 1, "ComponentShowPv": 2, "ComponentShowUv": 2 }, "RoomCreateTime": 1686131868, "RoomDuration": 4, "RoomId": 7241881205325499000, "ShortInfo": { "AccountType": 0, "Avat": "https://p3.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-i-0813_acf168dca4854fb390763275689ec289.jpeg?from=3782654143", "AwemeShortID": "huochetou655", "Nickname": "火车头🚞" } } ] }, "VideoData": { "DataList": [ { "CompletionRate": 1163, "Data": { "ComponentClickPv": 9, "ComponentClickUv": 2, "ComponentId": "", "ComponentName": "", "ComponentReportPv": 1, "ComponentReportUv": 1, "ComponentShowPv": 2, "ComponentShowUv": 2 }, "ItemAddr": "http://v5-i.douyinvod.com/79ba3e546339ea5448ca053f51ddacfd/6497be8a/video/tos/cn/tos-cn-ve-15c001-alinc2/o4UgCQGInJdSFBqzgDbUAzSzI8VenkAACYG9fA/?a=2176&ch=289&cr=0&dr=0&lr=all&cd=0%7C0%7C0%7C0&br=1074&bt=1074&cs=0&ds=3&ft=Cppx.nnrThWH6FiY0.bmo0P&mime_type=video_mp4&qs=0&rc=NTc8Njk7ZWc0NTU6aGQzN0BpanNscTk6ZjQ4bDMzNGkzM0A2LzNeL2FeXzAxLV4xMTI0YSNlNWwvcjRnNi1gLS1kLS9zcw%3D%3D&l=20230625111150D4EFD41F08830F2202F3&btag=e00008000&cdn_n80=1", "ItemCover": "https://p26-sign.douyinpic.com/tos-cn-p-0015/ogFKCenh9AAsgIyGkADEfSBAVAkgJMtEgkbjZ6~c5_300x400.jpeg?x-expires=1688871600&x-signature=D820qyRcZEBCYQ9rJhmLyNLnN5E%3D&from=3213915784_large&s=PackSourceEnum_OPENPLATFORM_SCREEN&se=false&sc=cover&biz_tag=aweme_video&l=20230625111150D4EFD41F08830F2202F3", "ItemCreateTime": 1686131868, "ItemDuration": 4, "ItemId": 7241881205325499000, "ItemTitle": "", "ItemVv": 86, "ShortInfo": { "AccountType": 0, "Avat": "https://p3.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-i-0813_acf168dca4854fb390763275689ec289.jpeg?from=3782654143", "AwemeShortID": "huochetou655", "Nickname": "火车头🚞" } } ], "Total": 1 } }, "err_msg": "success", "err_no": 0, "log_id": "20230625111150D4EFD41F08830F2202F3" }
错误码
| HTTP 状态码 | 错误码 | 错误码描述 | 排查建议 |
|---|---|---|---|
| 200 | -1 | 系统错误 | 建议重试,若多次重试失败,可向平台反馈该问题 |
| 200 | 11009 | 参数不合法或缺少参数 | 检查参数合法性,注意参数类型以及是否缺少必要参数 |
| 200 | 28001003 | access_token无效 | 请检查access_token |
| 200 | 28001007 | 必填字段缺失 | 请检查必填字段 |
| 200 | 28001008 | access_token过期 | 请刷新或重新授权access_token |
