接口说明

TikTok Post API 获取 TikTok 帖子详情及附带的作者、媒体和评论等数据。

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

请求URL

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

请求头

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

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

请求参数

参数必填类型说明
targetYesstring帖子链接 (支持短链); 也可直接传视频 id (纯数字)

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

附带评论限一页;需要继续获取评论时调用对应评论接口。

响应值

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

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“post”]
posterobject作者
postobjectPost
commentsobject[]顶层评论
paginationobject评论分页

data.poster 字段说明

返回值类型说明
nicknamestring | null昵称, 没有时用用户名
usernamestring | null用户名 (@ 后面那段)
namestring | null用户名 (同 username)
avatarstring | null头像
profileUrlstring | null主页链接
signaturestring | null简介
idstring | null用户 id
secUidstring | nullsecUid (tiktok-works 可直接传 options.secUid)
verifiedboolean是否认证
privateAccountboolean是否私密账号

data.post 字段说明

返回值类型说明
likenumber点赞数
commentCountnumber评论数
favoritenumber收藏数
sharenumber分享数
playCountnumber播放数
repostCountnumber转发数
publishedAtobject | null发布时间 (text 为 ISO)
captionTextobject正文
relatedTagsobject[]话题列表
durationSecnumber | null视频时长 (秒)
videoIdstring视频 id
urlstring视频链接
challengesobject[]话题详情
mentionsobject[]正文里的 @ 提及
hashtagsobject[]正文里的话题
videoobject视频信息
imagesobject[]图文帖的图片; 普通视频为空
musicobject | null背景音乐
poiobject | null标记的地点; 没有为 null
locationCreatedstring | null发布地区代码
textLanguagestring | null正文语言代码
categoryTypenumber | null内容分类编号 (平台内部)
diversificationLabelsstring[]内容分类标签
suggestedWordsstring[]推荐搜索词
aigcDescriptionstring | nullAI 生成内容声明
isAdboolean是否广告
isPinnedboolean是否在作者主页置顶
privateItemboolean是否私密作品
duetEnabledboolean是否允许合拍
stitchEnabledboolean是否允许拼接
shareEnabledboolean是否允许分享

data.post.publishedAt 字段说明

返回值类型说明
textstring | null上游原始时间文本
valuenumber | null解析后的毫秒时间戳; 解析失败为 null

data.post.captionText 字段说明

返回值类型说明
descstring正文

data.post.relatedTags[] 字段说明

返回值类型说明
textstring | null话题 (含 #)
hrefstring | null话题页链接

data.post.challenges[] 字段说明

返回值类型说明
idstring | null话题 id
titlestring | null话题名
descstring | null话题介绍
coverstring | null话题封面

data.post.mentions[] 字段说明

返回值类型说明
typestring类型
可用值: [“hashtag”, “mention”, “other”]
textstring | null文本 (话题名 / 被提及用户名)
hashtagIdstring | null话题 id
userIdstring | null被提及用户 id
userUniqueIdstring | null被提及用户名
startnumber | null在正文中的起始位置
endnumber | null在正文中的结束位置

data.post.hashtags[] 字段说明

返回值类型说明
typestring类型
可用值: [“hashtag”, “mention”, “other”]
textstring | null文本 (话题名 / 被提及用户名)
hashtagIdstring | null话题 id
userIdstring | null被提及用户 id
userUniqueIdstring | null被提及用户名
startnumber | null在正文中的起始位置
endnumber | null在正文中的结束位置

data.post.video 字段说明

返回值类型说明
widthnumber | null宽 (px)
heightnumber | null高 (px)
ratiostring | null清晰度, 如 540p
formatstring | null格式, 如 mp4
bitratenumber | null码率
definitionstring | null清晰度
coverstring | null封面
originCoverstring | null原始封面
dynamicCoverstring | null动态封面
playAddrstring | null播放地址 (有时效)
downloadAddrstring | null下载地址 (匿名通常为 null)

data.post.images[] 字段说明

返回值类型说明
urlstring图片链接
widthnumber | null宽
heightnumber | null高

data.post.music 字段说明

返回值类型说明
idstring | null音乐 id
titlestring | null音乐名
authorNamestring | null音乐作者
albumstring | null专辑
originalboolean是否原声
durationSecnumber | null时长 (秒)
playUrlstring | null音频地址
coverstring | null音乐封面

data.post.poi 字段说明

返回值类型说明
idstring | null地点 id
namestring | null地点名
addressstring | null地址
citystring | null城市
countrystring | null国家

data.comments[] 字段说明

返回值类型说明
timeTextobject | null评论时间 (text 为 ISO)
contentstring | null评论内容
likesnumber点赞数
avatarstring | null评论者头像
nicknamestring | null评论者昵称, 没有时用用户名
nativeIdstring评论 id; 回复模式传 options.commentId 用它
replyCountnumber回复数
profileUrlstring | null评论者主页
parentIdstring | null所属顶层评论 id; 顶层评论为 null
replyToReplyIdstring | null被回复的那条回复 id (楼中楼); 直接回复评论为 null
usernamestring | null评论者用户名 (@ 后面那段)
userIdstring | null评论者 id
secUidstring | null评论者 secUid
verifiedboolean评论者是否认证
languagestring | null评论语言代码 (un = 未识别)
isAuthorDiggedboolean作者是否点赞了这条评论
isPinnedboolean是否置顶
imagesstring[]评论图片链接
labelsany[]评论标签 (上游原样)
replysobject[]随评论附带的一级回复。

data.comments[].timeText 字段说明

返回值类型说明
textstring | null上游原始时间文本
valuenumber | null解析后的毫秒时间戳; 解析失败为 null

data.comments[].replys[] 字段说明

返回值类型说明
timeTextobject | null评论时间 (text 为 ISO)
contentstring | null评论内容
likesnumber点赞数
avatarstring | null评论者头像
nicknamestring | null评论者昵称, 没有时用用户名
nativeIdstring评论 id; 回复模式传 options.commentId 用它
replyCountnumber回复数
profileUrlstring | null评论者主页
parentIdstring | null所属顶层评论 id; 顶层评论为 null
replyToReplyIdstring | null被回复的那条回复 id (楼中楼); 直接回复评论为 null
usernamestring | null评论者用户名 (@ 后面那段)
userIdstring | null评论者 id
secUidstring | null评论者 secUid
verifiedboolean评论者是否认证
languagestring | null评论语言代码 (un = 未识别)
isAuthorDiggedboolean作者是否点赞了这条评论
isPinnedboolean是否置顶
imagesstring[]评论图片链接
labelsany[]评论标签 (上游原样)
replysany[]不再向下展开, 恒为空

data.pagination 字段说明

返回值类型说明
commentsobjectComments

data.pagination.comments 字段说明

返回值类型说明
cursorstring | null下一页游标, 传回 options.cursor 续取
hasMoreboolean是否还有更多

请求示例

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

返回示例

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

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "post",
    "poster": {
      "nickname": "Scout, Suki & Stella",
      "username": "scout2015",
      "name": "scout2015",
      "avatar": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/4cbe05e194623e3f19aef975d9fdf26c~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=9640&refresh_tok...",
      "profileUrl": "https://www.tiktok.com/@scout2015",
      "signature": "🐾Click follow to join the PAWsitive Pack🐾\nMore👇💞",
      "id": "53279706535428096",
      "secUid": "MS4wLjABAAAAPZWNdkF_cmVSPCvV0Y6MCsH29mlAOlMOX3ikzGvlfMm3K6OMZv-JrRImpEHxdIMI",
      "verified": true,
      "privateAccount": false
    },
    "post": {
      "like": 35200,
      "commentCount": 5713,
      "favorite": 651,
      "share": 1522,
      "playCount": 160000,
      "repostCount": 0,
      "publishedAt": {
        "text": "2019-07-27T13:32:38.000Z",
        "value": 1564234358000
      },
      "captionText": {
        "desc": "Scramble up ur name & I’ll try to guess it😍❤️ #foryoupage #petsoftiktok #aesthetic"
      },
      "relatedTags": [
        {
          "text": "#foryoupage",
          "href": "https://www.tiktok.com/tag/foryoupage"
        }
      ],
      "durationSec": 10,
      "videoId": "6718335390845095173",
      "url": "https://www.tiktok.com/@scout2015/video/6718335390845095173",
      "challenges": [
        {
          "id": "88764338",
          "title": "foryoupage",
          "desc": null,
          "cover": null
        }
      ],
      "mentions": [],
      "hashtags": [
        {
          "type": "hashtag",
          "text": "foryoupage",
          "hashtagId": "88764338",
          "userId": null,
          "userUniqueId": null,
          "start": 47,
          "end": 58
        }
      ],
      "video": {
        "width": 576,
        "height": 1024,
        "ratio": "540p",
        "format": "mp4",
        "bitrate": 2240963,
        "definition": "540p",
        "cover": "https://p16-common-sign.tiktokcdn-us.com/tos-maliva-p-0068/2367c7d45cf54a1397abd0e72bf22eac~tplv-tiktokx-origin.image?dr=9636&x-expires=1794124800&x-signatur...",
        "originCover": "https://p16-common-sign.tiktokcdn-us.com/tos-maliva-p-0068/8ac0190d8ad54535bf823ed5f3202b6b~tplv-tiktokx-origin.image?dr=9636&x-expires=1794124800&x-signatur...",
        "dynamicCover": "https://p16-common-sign.tiktokcdn-us.com/tos-maliva-p-0068/dc1c2b319b174c7eabd57ba4b191cc93~tplv-tiktokx-origin.image?dr=9636&x-expires=1794124800&x-signatur...",
        "playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast5/tos-useast5-pve-0068-tx/a9d18e19b850455597ce9421ea84a228/?a=1988&bti=ODszNWYuMDE6&&bt=2188&ft=4KJMyM...",
        "downloadAddr": null
      },
      "images": [],
      "music": {
        "id": "6689804660171082501",
        "title": "original sound",
        "authorName": "tiff",
        "album": null,
        "original": true,
        "durationSec": 10,
        "playUrl": "https://v16m.tiktokcdn-us.com/6fa261a4e8c63dba2f4616ed2ea374b5/6aede682/video/tos/useast5/tos-useast5-v-27dcd7-tx/fdec9588d6684e7d97da29739b9d0abf/?a=1233&bt...",
        "cover": "https://p19-common-sign.tiktokcdn-us.com/tos-maliva-avt-0068/62c59c8c91226b51c36d2338519eb63e~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=9640&refresh_token=35..."
      },
      "poi": null,
      "locationCreated": null,
      "textLanguage": "en",
      "categoryType": 120,
      "diversificationLabels": [],
      "suggestedWords": [
        "name"
      ],
      "aigcDescription": null,
      "isAd": false,
      "isPinned": false,
      "privateItem": false,
      "duetEnabled": true,
      "stitchEnabled": true,
      "shareEnabled": true
    },
    "comments": [
      {
        "timeText": {
          "text": "2019-07-27T13:35:22.000Z",
          "value": 1564234522000
        },
        "content": "Well it’s pretty easy...and obvious 😂 hlysa",
        "likes": 340,
        "avatar": "https://p16-common-sign.tiktokcdn-eu.com/tos-maliva-avt-0068/7328085019259748357~tplv-tiktokx-cropcenter:100:100.jpg?dr=10399&refresh_token=c6869378&x-expire...",
        "nickname": "Quit",
        "nativeId": "6718336105873702917",
        "replyCount": 50,
        "profileUrl": "https://www.tiktok.com/@pretzelsticks0",
        "replys": [],
        "parentId": null,
        "replyToReplyId": null,
        "username": "pretzelsticks0",
        "userId": "6627564337508761605",
        "secUid": "MS4wLjABAAAABCmZv8sEMzxVXCLVjoVUMYM465WA0BMplKB9c7y5WWXDpV0OykgbTV3qOf0Jbleg",
        "verified": false,
        "language": "un",
        "isAuthorDigged": true,
        "isPinned": false,
        "images": [],
        "labels": [
          "Liked by creator"
        ]
      }
    ],
    "pagination": {
      "comments": {
        "cursor": "0",
        "hasMore": true
      }
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-tiktok-post-1793954324984942600",
    "durationMs": 6417
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

积点消耗说明

每条帖子、视频或商家主体消耗 0.8 积点,附带评论、回复和作者资料免费。

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

在线调试