TikTok-Ads-API

获取热门视频详情/Get top contents item detail

Changed on

[中文]

用途:

  • 获取热门视频榜单中单个视频的详细数据
  • 在榜单数据基础上额外返回热门评论与作者主页信息,便于分析视频的受欢迎原因

参数:

  • item_id: 视频ID,从 /get_top_contents_list 返回的 itemInfo.itemID 获取
  • period_end_timestamp: 榜单周期结束时间戳(10位秒级),必填
    • 该参数需调用方根据目标榜单日期自行生成,并非由其他接口返回
    • 示例: 1785024000;不要传 0,否则会返回空结果
    • period_dimension 为 1 时需传周日 00:00 UTC 的时间戳,其余日期无数据
    • period_dimension 为 3 或 5 时可传任意已过去日期的时间戳
    • 若 item_id 来自 /get_top_contents_list,请沿用查询榜单时的时间戳
  • period_dimension: 榜单周期,可选 1 / 3 / 5,默认3,建议与查询榜单时保持一致
  • country_code: 该视频所属榜单的国家/地区代码,默认US
  • cookie: 自定义Cookie字符串,可选参数,可以使用自己的Cookie来获取更多数据

注意:

  • 建议传入与查询榜单时相同的 country_code,例如从 TH 榜单取到的视频传 TH,可减少一次查询耗时

返回内容说明:

  • entityInfo: 视频详情
    • itemInfo: 视频基础信息 (itemID / title / createTime / coverURL / videoURL / authorID / creatorID)
    • itemMetrics: 视频指标 (videoViews / engagementRate / sixSecondsVTR 及各自的 LifeTime 累计值)
    • itemAuthorInfo: 作者信息 (nickName / handlerName / avatarURI / bio / storeRegion)
    • itemAuthorMetrics: 作者指标 (followers 粉丝数)
    • contentTags: 内容分类标签
    • commentInfos: 热门评论 (text / likeCnt / createTime / userName / userAvatarLink)

[English]

Purpose:

  • Get detailed data of a single video from the Top Contents ranking
  • Returns top comments and author profile on top of the ranking data

Parameters:

  • item_id: Video ID, obtained from itemInfo.itemID of /get_top_contents_list
  • period_end_timestamp: Period end timestamp in seconds, required
    • Generate this value from the target ranking date; it is not returned by another endpoint
    • Example: 1785024000; do not pass 0, which returns an empty result
    • For period_dimension 1, pass a Sunday 00:00 UTC timestamp; other dates return no data
    • For period_dimension 3 or 5, any past date works
    • If item_id comes from /get_top_contents_list, reuse that ranking query's timestamp
  • period_dimension: Period, one of 1 / 3 / 5, default 3, recommended to match the ranking query
  • country_code: Country code of the ranking the video belongs to, default US
  • cookie: Custom Cookie string, optional parameter, you can use your own Cookie to get more data

Note:

  • Prefer passing the same country_code used for the ranking query, e.g. TH for a video taken from the TH ranking, to avoid an extra lookup

Return Description:

  • entityInfo: Video detail (itemInfo / itemMetrics / itemAuthorInfo / itemAuthorMetrics / contentTags / commentInfos)
post/api/v1/tiktok/ads/get_top_contents_item_detail

Request

  • Base URL
    https://api.tikhub.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

item_idstring required

视频ID/Video item ID

period_end_timestampinteger required

调用方需根据目标榜单日期自行生成结束时间戳(10位 Unix 秒级),例如 1785024000;请勿传 0,否则会返回空结果/The caller must generate this 10-digit Unix timestamp in seconds from the target ranking date, for example 1785024000; do not pass 0 because it returns an empty result

period_dimensioninteger

榜单周期:1/3/5 /Period dimension

country_codestring

该视频所属榜单的国家/地区代码,需与榜单查询一致/Country code of the ranking

cookiestring

自定义Cookie字符串(可选)/Custom Cookie string (optional)

Example request

{
  "period_end_timestamp": 1785024000,
  "period_dimension": 1
}

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes