接口说明

TikTok Home API 获取 TikTok 主页资料及首屏作品数据。

使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。

请求URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/tiktok-home

请求头

参数名参数值类型说明
Content-Typeapplication/jsonstring数据格式
AuthorizationBearer xxxstring认证凭证

采集最长约75秒,客户端超时建议设为90秒。

请求参数

参数必填类型说明
targetYesstring主页链接; 也可直接传用户名 (可带 @)

仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。

附带首屏作品;更多作品请使用对应作品接口(如提供)。

响应值

返回值类型说明
codeinteger状态码,0 表示成功
messagestring响应信息,成功时为 ok
pointCostnumber本次请求实际消耗的积点
dataobject返回数据,结构见下表
metaobject请求标识及耗时(毫秒)
billingobject计费条数、单价及规则版本

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“home”]
profileobjectProfile
worksobject[]主页 SSR 里带的作品; 匿名访问常为空, 作品请用 tiktok-works

data.profile 字段说明

返回值类型说明
accountIdstring | null用户 id (没有时用 secUid)
userIdstring | null用户 id
secUidstring | nullsecUid
usernamestring用户名 (@ 后面那段)
handlestring@用户名
nicknamestring | null昵称
namestring昵称, 没有时用用户名
profileUrlstring主页链接
avatarstring | null头像 (最大尺寸)
avatar_urlstring | null头像 (同 avatar, 兼容旧键)
profile_pic_urlstring | null头像大图 (兼容旧键)
avatarThumbstring | null头像缩略图
verifiedboolean是否认证
isVerifiedboolean是否认证 (同 verified)
is_verifiedboolean是否认证 (兼容旧键)
isPrivateboolean是否私密账号
is_privateboolean是否私密账号 (兼容旧键)
regionstring | null地区代码; 匿名通常为 null
countrystring | null地区代码 (同 region)
biostring | null简介
biographystring | null简介 (同 bio)
descriptionstring | null简介 (同 bio)
signaturestring | null简介 (同 bio)
contactEmailstring | null从简介里提取的邮箱
externalLinksstring[]从简介里提取的链接
externalUrlsstring[]同 externalLinks
languagestring | null账号语言
registerTimeobject | null注册时间
createdAtstring | null注册时间 ISO
createdTimenumber | null注册时间秒级时间戳
followersCountnumber | null粉丝数
follower_countnumber | null粉丝数 (兼容旧键)
followerCountnumber | null粉丝数 (兼容旧键)
followingCountnumber | null关注数
following_countnumber | null关注数 (兼容旧键)
likesCountnumber | null获赞数
heartCountnumber | null获赞数 (同 likesCount)
videosCountnumber | null作品数
videoCountnumber | null作品数 (同 videosCount)
diggCountnumber | null点赞过的作品数
friendCountnumber | null互关好友数
bioLinksobject[]简介里的外链
isOrganizationboolean是否机构账号
ttSellerboolean是否 TikTok 卖家
commerceCategorystring | null商业账号类目
openFavoriteboolean是否公开收藏
followingVisibilitynumber | null关注列表可见性 (平台枚举)
commentSettingnumber | null评论权限 (平台枚举)
duetSettingnumber | null合拍权限 (平台枚举)
stitchSettingnumber | null拼接权限 (平台枚举)
downloadSettingnumber | null下载权限 (平台枚举)
roomIdstring | null正在直播的直播间 id; 没在直播为 null
nickNameModifyTimenumber | null昵称修改时间 (秒级时间戳)
uniqueIdModifyTimenumber | null用户名修改时间 (秒级时间戳)
shareTitlestring | null分享卡片标题
shareDescstring | null分享卡片描述
targetUrlstring请求的链接

data.profile.registerTime 字段说明

返回值类型说明
timestampnumber秒级时间戳
isostring | nullISO 时间

data.profile.bioLinks[] 字段说明

返回值类型说明
linkstring链接
risknumber | null平台风险等级

data.works[] 字段说明

返回值类型说明
workIdstring视频 id
parentIdstring作者 id
typestring作品类型
可用值: [“video”]
videoIdstring视频 id (同 workId)
urlstring视频链接
descstring | null正文
contentstring | null正文 (同 desc)
createTimenumber | null发布时间秒级时间戳
createdISOstring | null发布时间 ISO
publishedAtnumber | null发布时间毫秒时间戳
coverstring | null封面
playUrlstring | null播放地址 (有时效)
durationnumber | null时长 (秒)
widthnumber | null宽
heightnumber | null高
statsobject计数
isPinnedboolean是否置顶
isAdboolean是否广告
hashtagsstring[]话题名 (不含 #)
musicobject | null背景音乐

data.works[].stats 字段说明

返回值类型说明
diggCountnumber | null点赞数
shareCountnumber | null分享数
commentCountnumber | null评论数
playCountnumber | null播放数
collectCountnumber | null收藏数
repostCountnumber | null转发数

data.works[].music 字段说明

返回值类型说明
idstring音乐 id
titlestring | null音乐名
authorNamestring | null音乐作者

请求示例

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/tiktok-home \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://www.tiktok.com/@scout2015"
}'

返回示例

下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "home",
    "profile": {
      "accountId": "53279706535428096",
      "userId": "53279706535428096",
      "secUid": "MS4wLjABAAAAPZWNdkF_cmVSPCvV0Y6MCsH29mlAOlMOX3ikzGvlfMm3K6OMZv-JrRImpEHxdIMI",
      "username": "scout2015",
      "handle": "@scout2015",
      "nickname": "Scout, Suki & Stella",
      "name": "Scout, Suki & Stella",
      "profileUrl": "https://www.tiktok.com/@scout2015",
      "avatar": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/4cbe05e194623e3f19aef975d9fdf26c~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=8e9c...",
      "avatar_url": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/4cbe05e194623e3f19aef975d9fdf26c~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=8e9c...",
      "profile_pic_url": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/4cbe05e194623e3f19aef975d9fdf26c~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=8e9c...",
      "avatarThumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/4cbe05e194623e3f19aef975d9fdf26c~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=3518ba...",
      "verified": true,
      "isVerified": true,
      "is_verified": true,
      "isPrivate": false,
      "is_private": false,
      "region": null,
      "country": null,
      "bio": "🐾Click follow to join the PAWsitive Pack🐾\nMore👇💞",
      "biography": "🐾Click follow to join the PAWsitive Pack🐾\nMore👇💞",
      "description": "🐾Click follow to join the PAWsitive Pack🐾\nMore👇💞",
      "signature": "🐾Click follow to join the PAWsitive Pack🐾\nMore👇💞",
      "contactEmail": null,
      "externalLinks": [],
      "externalUrls": [],
      "language": "en",
      "registerTime": {
        "timestamp": 1453074387,
        "iso": "2016-01-17T23:46:27.000Z"
      },
      "createdAt": "2016-01-17T23:46:27.000Z",
      "createdTime": 1453074387,
      "followersCount": 9025921,
      "follower_count": 9025921,
      "followerCount": 9025921,
      "followingCount": 1174,
      "following_count": 1174,
      "likesCount": 108347824,
      "heartCount": 108347824,
      "videosCount": 3086,
      "videoCount": 3086,
      "diggCount": 0,
      "friendCount": 672,
      "bioLinks": [
        {
          "link": "Scout2015.com",
          "risk": 3
        }
      ],
      "isOrganization": false,
      "ttSeller": false,
      "commerceCategory": null,
      "openFavorite": false,
      "followingVisibility": 2,
      "commentSetting": 0,
      "duetSetting": 0,
      "stitchSetting": 0,
      "downloadSetting": 3,
      "roomId": null,
      "nickNameModifyTime": 1630843696,
      "uniqueIdModifyTime": null,
      "shareTitle": "Scout, Suki & Stella on TikTok",
      "shareDesc": "@scout2015 9.0m Followers, 1174 Following, 108.3m Likes - Watch awesome short videos created by Scout, Suki & Stella",
      "targetUrl": "https://www.tiktok.com/@scout2015"
    },
    "works": []
  },
  "meta": {
    "requestId": "pg-audit-r1-tiktok-home-1793954349104852500",
    "durationMs": 21837
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

积点消耗说明

每份主页资料消耗 0.8 积点,附带作品免费。

空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

在线调试