API 文档

TikTok 话题详情 API

同步查询 TikTok 公开数据,空结果和失败免费。

测试 API

请求后直接返回结果,无需生成任务或轮询。

打开产品页与 API Tester

接口地址与鉴权

GET https://api.goanyapi.com/api/v1/tiktok/hashtag-detail

使用 Authorization: Bearer YOUR_API_KEY 鉴权。参数放在查询字符串中,不发送请求体。

输入参数

参数类型位置必填约束与默认值说明
AuthorizationstringHeader是Bearer YOUR_API_KEY当前账户 API Key
challenge_namestringQuery二选一^[^#\s]+$话题名称;示例:fyp。与 url 二选一,不能同时传。
urlstringQuery二选一^https://(www\.)?tiktok\.com/tag/[^/?#\s\\]+/?(?:\?[^#\s]*)?(?:#[^\s]*)?$完整 TikTok 链接;示例:https://www.tiktok.com/tag/fyp。与 challenge_name 二选一,不能同时传。允许分享参数及片段,不支持短链接;解析不额外收费。

支持完整 URL:https://www.tiktok.com/tag/fyp。url 与 challenge_name 必须二选一,不能同时提供。分享参数、片段和末尾斜杠会自动移除;暂不支持短链接。URL 格式处理不额外收费。

请求示例

GET /api/v1/tiktok/hashtag-detail?url=https%3A%2F%2Fwww.tiktok.com%2Ftag%2Ffyp
Authorization: Bearer YOUR_API_KEY

输出参数

成功返回 HTTP 200。保留返回记录中的 null、空字符串和缺失业务字段;统计值 0 是有效值。只返回下表公开字段,不包含内部执行信息。

字段类型说明
codestring成功为 ok
messagestring请求说明
data.creditsUsednumber本次扣除积分;空结果为 0
data.remainingCreditsnumber请求结算后的账户余额
data.hashtagobject | null资料对象;无结果为 null
data.statsobject | null统计字段
data.statsV2object | null字符串形式的大数统计,保留实际值
data.hashtag.idstring | number | boolean | null话题标识字段;查询话题作品可直接使用话题 URL 或 challenge_name,无需先获取此值
data.hashtag.titlestring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.descstring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.coverThumbstring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.coverMediumstring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.coverLargerstring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.profileThumbstring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.profileMediumstring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.profileLargerstring | number | boolean | null公开资料字段,允许缺失或为空
data.hashtag.isCommercestring | number | boolean | null公开资料字段,允许缺失或为空
data.stats.diggCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.shareCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.commentCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.playCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.collectCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.followerCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.followingCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.heartCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.heartnumber | string | null返回的统计值,允许缺失或为空
data.stats.videoCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.friendCountnumber | string | null返回的统计值,允许缺失或为空
data.stats.viewCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.diggCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.shareCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.commentCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.playCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.collectCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.followerCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.followingCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.heartCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.heartnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.videoCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.friendCountnumber | string | null返回的统计值,允许缺失或为空
data.statsV2.viewCountnumber | string | null返回的统计值,允许缺失或为空

真实响应示例

以下保存自实际成功响应,经过公开字段白名单处理;列表仅节选前两条,示例不包含账户余额和本次扣费字段。真实接口还会返回 creditsUsed 和 remainingCredits,金额由当前配置决定。展示示例不会请求接口或扣费。

{
  "code": "ok",
  "message": "ok",
  "data": {
    "hashtag": {
      "id": "229207",
      "title": "fyp",
      "desc": "",
      "coverThumb": "",
      "coverMedium": "",
      "coverLarger": "",
      "profileThumb": "",
      "profileMedium": "",
      "profileLarger": "",
      "isCommerce": false
    },
    "stats": {
      "videoCount": 0,
      "viewCount": 131746900000000
    },
    "statsV2": {
      "videoCount": "9519133676",
      "viewCount": "131746936474533"
    }
  }
}

计费

当前配置下,每次成功请求消耗 1 积分。

非空成功结果按管理员当前配置扣费,空结果与失败不扣费。请求前需要足够余额;并发请求结算时余额不足也会返回 402,不交付未结算的付费结果。详情为空对象或 null、列表无有效记录为无结果;已有记录但个别字段为空,不视为整次空结果。

错误响应

400:参数错误;401:鉴权失败;402:余额不足;429:请求过于频繁;502:请求失败;503:接口或价格尚未配置。错误正文包含 code 和 message,不包含内部地址或凭证。

{"code":"invalid_params","message":"Invalid parameter"}