# TikTok 视频详情 API (tiktok.video)

- Canonical page: https://everyinfra.com/tiktok-api/video
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "tiktok", "action": "video", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

TikTok 视频详情按视频 `url` 读取一条公开视频的文案和发布时间、作者的昵称与 @用户名，以及点赞、评论、分享、播放四项计数。它回答「这条视频讲了什么、传播得怎么样」，适合出海品牌核对达人交付的推广视频、拆解一条视频为什么能传开，或者给手里零散的视频链接补齐互动数据。一次返回单个对象，不是列表。

`text` 是视频文案全文，不含视频里的口播，`posted_at` 按 UTC 给出。各项计数对应读取的那一刻，想看增长就定期读同一个链接并按日期存档；计数为 null 表示这次没有公开，不能当成 0。`author_username` 是作者的 @用户名，可以接着交给 TikTok 的用户视频能力，看这位作者的其他作品。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=tiktok&action=video

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | video / comments / transcript 的具体 TikTok 视频链接；comments 按视频取评论，每条顶层评论最多附带两条回复，不保证完整对话树。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| author_name | 评价人名字（shop_product_reviews），平台已打码，如 n**h。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| share_count | 分享/转发数。null 表示不公开，不等于 0。 |
| view_count | 浏览/播放数。null 表示不公开，不等于 0。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| collect_count | 收藏数。null 表示不公开，不等于 0。 |
| repost_count | 转发数。 |
| duration_sec | platform-native meaning |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| cover_image_url | 视频封面图链接（带签名，会过期）。 |
| language | 内容语言代码（如 zh、en），由平台判定，可能不准。 |
| country | 国家或地区。可能是全称也可能是 ISO 代码，取决于平台，未归一。 |
| hashtags | 正文里的话题标签数组，按出现顺序；没有时不出现这个字段。 |
| music | 背景音乐：id、title（曲名）、author、is_original（是否原声）、play_url（音频地址，会过期）、cover_url。 |
| is_ad | 是否广告视频。 |
| is_pinned | 是否在作者主页置顶。 |
| is_sponsored | 是否含赞助内容。 |
| is_slideshow | 是否图文轮播（不是视频）。 |
| has_shop_product | 视频是否挂了 TikTok Shop 商品；没有这个键表示无法判定。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_url | 作者在原平台的主页链接。 |
| author_avatar_url | 作者头像图片链接（多数平台带签名、会过期）。 |
| author_bio | platform-native meaning |
| author_is_verified | platform-native meaning |
| author_is_private | 作者是否私密账号。 |
| author_is_seller | 作者是否 TikTok Shop 卖家。 |
| author_follower_count | 作者粉丝数。null 表示不公开。 |
| author_following_count | platform-native meaning |
| author_like_count | platform-native meaning |
| author_video_count | platform-native meaning |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "tiktok",
  "action": "video",
  "params": {
    "url": "https://www.tiktok.com/@stoolpresidente/video/7488736374602927402"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "tiktok",
        "action": "video",
        "params": {
            "url": "https://www.tiktok.com/@stoolpresidente/video/7488736374602927402",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "tiktok",
  "action": "video",
  "results": {
    "id": "7488736374602927402",
    "url": "https://www.tiktok.com/@stoolpresidente/video/7488736374602927402",
    "text": "Oh shit there goes Pres breaking tik tok again. #bagelstomakehimdance ",
    "author_name": "•••",
    "author_username": "stoolpresidente",
    "like_count": 45200,
    "comment_count": 889,
    "share_count": 4969,
    "view_count": 1200000,
    "posted_at": "2025-04-02T15:22:04+00:00",
    "platform": "tiktok"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `url` 应该是哪种 TikTok 链接？

要用 TikTok 单条视频的地址，形如 https://www.tiktok.com/@<用户名>/video/<视频ID>，也就是用浏览器打开这条视频时地址栏显示的链接。账号主页链接读不到视频详情；抖音的视频链接也不能用在这里，抖音视频请交给抖音视频详情。每次读一条，没有 `limit` 或翻页。要批量读一个话题下的视频，用话题内容那一页，单次最多 30 条。视频 ID 是链接末尾的那串数字，链接里的 @用户名 和视频 ID 要完整。示例填的就是这种形式的链接。

### 播放数会像抖音那样拿不到吗？

不会。拿不到是抖音的情况，因为抖音不公开播放量，抖音结果里的播放数不代表真实播放。TikTok 视频详情的 `view_count` 是这条视频的播放数，可以和点赞、分享一起衡量传播；它为 null 时表示这次没有公开，不等于 0。`collect_count` 和 `repost_count` 也在结果里，`collect_count` 为 null 同样表示不公开。比较两条视频时，要用同一时间读出的计数，隔了几天再读的数字，要标上读取日期。

### 视频的口播文字和评论区在哪里读？

这个能力只返回文案和互动数据。同一个视频链接交给 TikTok 视频文稿，可以拿到口播文字；交给 TikTok 评论，可以读评论区。结果里还有几项标记：`is_slideshow` 为真表示这条是图文轮播而不是视频，`duration_seconds` 对非视频、音频内容为 null；`has_shop_product` 标出是否挂了 TikTok Shop 商品，没有这个键表示无法判定；`cover_image_url` 带签名、会过期，要长期留存请自己转存。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=tiktok
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
