TikTok
TikTok Home API
获取 TikTok 主页资料及首屏作品数据。
接口说明
TikTok Home API 获取 TikTok 主页资料及首屏作品数据。
使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。
请求URL
请求头
| 参数名 | 参数值 | 类型 | 说明 |
|---|---|---|---|
| Content-Type | application/json | string | 数据格式 |
| Authorization | Bearer xxx | string | 认证凭证 |
采集最长约75秒,客户端超时建议设为90秒。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| target | Yes | string | 主页链接; 也可直接传用户名 (可带 @) |
仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。
附带首屏作品;更多作品请使用对应作品接口(如提供)。
响应值
| 返回值 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,0 表示成功 |
| message | string | 响应信息,成功时为 ok |
| pointCost | number | 本次请求实际消耗的积点 |
| data | object | 返回数据,结构见下表 |
| meta | object | 请求标识及耗时(毫秒) |
| billing | object | 计费条数、单价及规则版本 |
返回参数 data 说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| type | string | Type 可用值: [“home”] |
| profile | object | Profile |
| works | object[] | 主页 SSR 里带的作品; 匿名访问常为空, 作品请用 tiktok-works |
data.profile 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| accountId | string | null | 用户 id (没有时用 secUid) |
| userId | string | null | 用户 id |
| secUid | string | null | secUid |
| username | string | 用户名 (@ 后面那段) |
| handle | string | @用户名 |
| nickname | string | null | 昵称 |
| name | string | 昵称, 没有时用用户名 |
| profileUrl | string | 主页链接 |
| avatar | string | null | 头像 (最大尺寸) |
| avatar_url | string | null | 头像 (同 avatar, 兼容旧键) |
| profile_pic_url | string | null | 头像大图 (兼容旧键) |
| avatarThumb | string | null | 头像缩略图 |
| verified | boolean | 是否认证 |
| isVerified | boolean | 是否认证 (同 verified) |
| is_verified | boolean | 是否认证 (兼容旧键) |
| isPrivate | boolean | 是否私密账号 |
| is_private | boolean | 是否私密账号 (兼容旧键) |
| region | string | null | 地区代码; 匿名通常为 null |
| country | string | null | 地区代码 (同 region) |
| bio | string | null | 简介 |
| biography | string | null | 简介 (同 bio) |
| description | string | null | 简介 (同 bio) |
| signature | string | null | 简介 (同 bio) |
| contactEmail | string | null | 从简介里提取的邮箱 |
| externalLinks | string[] | 从简介里提取的链接 |
| externalUrls | string[] | 同 externalLinks |
| language | string | null | 账号语言 |
| registerTime | object | null | 注册时间 |
| createdAt | string | null | 注册时间 ISO |
| createdTime | number | null | 注册时间秒级时间戳 |
| followersCount | number | null | 粉丝数 |
| follower_count | number | null | 粉丝数 (兼容旧键) |
| followerCount | number | null | 粉丝数 (兼容旧键) |
| followingCount | number | null | 关注数 |
| following_count | number | null | 关注数 (兼容旧键) |
| likesCount | number | null | 获赞数 |
| heartCount | number | null | 获赞数 (同 likesCount) |
| videosCount | number | null | 作品数 |
| videoCount | number | null | 作品数 (同 videosCount) |
| diggCount | number | null | 点赞过的作品数 |
| friendCount | number | null | 互关好友数 |
| bioLinks | object[] | 简介里的外链 |
| isOrganization | boolean | 是否机构账号 |
| ttSeller | boolean | 是否 TikTok 卖家 |
| commerceCategory | string | null | 商业账号类目 |
| openFavorite | boolean | 是否公开收藏 |
| followingVisibility | number | null | 关注列表可见性 (平台枚举) |
| commentSetting | number | null | 评论权限 (平台枚举) |
| duetSetting | number | null | 合拍权限 (平台枚举) |
| stitchSetting | number | null | 拼接权限 (平台枚举) |
| downloadSetting | number | null | 下载权限 (平台枚举) |
| roomId | string | null | 正在直播的直播间 id; 没在直播为 null |
| nickNameModifyTime | number | null | 昵称修改时间 (秒级时间戳) |
| uniqueIdModifyTime | number | null | 用户名修改时间 (秒级时间戳) |
| shareTitle | string | null | 分享卡片标题 |
| shareDesc | string | null | 分享卡片描述 |
| targetUrl | string | 请求的链接 |
data.profile.registerTime 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| timestamp | number | 秒级时间戳 |
| iso | string | null | ISO 时间 |
data.profile.bioLinks[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| link | string | 链接 |
| risk | number | null | 平台风险等级 |
data.works[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| workId | string | 视频 id |
| parentId | string | 作者 id |
| type | string | 作品类型 可用值: [“video”] |
| videoId | string | 视频 id (同 workId) |
| url | string | 视频链接 |
| desc | string | null | 正文 |
| content | string | null | 正文 (同 desc) |
| createTime | number | null | 发布时间秒级时间戳 |
| createdISO | string | null | 发布时间 ISO |
| publishedAt | number | null | 发布时间毫秒时间戳 |
| cover | string | null | 封面 |
| playUrl | string | null | 播放地址 (有时效) |
| duration | number | null | 时长 (秒) |
| width | number | null | 宽 |
| height | number | null | 高 |
| stats | object | 计数 |
| isPinned | boolean | 是否置顶 |
| isAd | boolean | 是否广告 |
| hashtags | string[] | 话题名 (不含 #) |
| music | object | null | 背景音乐 |
data.works[].stats 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| diggCount | number | null | 点赞数 |
| shareCount | number | null | 分享数 |
| commentCount | number | null | 评论数 |
| playCount | number | null | 播放数 |
| collectCount | number | null | 收藏数 |
| repostCount | number | null | 转发数 |
data.works[].music 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | 音乐 id |
| title | string | null | 音乐名 |
| authorName | string | null | 音乐作者 |
请求示例
返回示例
下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。
积点消耗说明
每份主页资料消耗 0.8 积点,附带作品免费。
空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

