# 今日头条 视频详情 API (toutiao.video)

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

今日头条视频详情按 `url` 读取一条视频：标题、时长、播放量、点赞评论分享和收藏数、展示次数 `impression_count`、发布时间，以及封面 `cover_url`、视频地址 `video_url` 和作者的头像、粉丝数、认证信息。它能回答一条视频被展示了多少次、播了多少次、多少人互动，适合给单条视频做复盘。

`url` 填 /video/、/item/、/group/ 形式的链接都行，也可以直接填其中的纯数字 ID；文章的 ID 查不到视频，会返回空结果。`video_type` 区分横版视频和竖版小视频，小视频没有 `author_id`、展示次数和作者粉丝数。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 头条视频链接（https://www.toutiao.com/video/<ID>/，/item/<ID>/、/group/<ID>/ 也行），或其中的纯数字 ID。文章的 ID 查不到视频，返回空结果。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| video_type | 视频类型（video）：video 是横版视频，short_video 是竖版小视频（小视频没有 author_id、展示次数和作者粉丝数）。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| duration_sec | platform-native meaning |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| play_count | 播放量。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| share_count | 分享/转发数。null 表示不公开，不等于 0。 |
| collect_count | 收藏数（video）。 |
| impression_count | 展示次数：这条视频在信息流里被展示了多少次（video），不是播放量。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| cover_url | platform-native meaning |
| video_url | platform-native meaning |
| author_id | 作者在原平台的唯一 ID。 |
| author_name | 作者昵称（显示名）。 |
| author_avatar_url | 作者头像图片链接（多数平台带签名、会过期）。 |
| author_follower_count | 作者粉丝数（video；小视频不给）。 |
| author_verified | 作者是否认证（comments 上是评论者）。 |
| author_auth_info | 认证信息（如「XX领域创作者」；comments 上是评论者的，如「…官方账号」）；没认证时没有，多数评论者没有。 |
| 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": "toutiao",
  "action": "video",
  "params": {
    "url": "https://www.toutiao.com/video/7702252318212817451/"
  }
}'
```

```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": "toutiao",
        "action": "video",
        "params": {
            "url": "https://www.toutiao.com/video/7702252318212817451/",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "toutiao",
  "action": "video",
  "results": {
    "id": …,
    "url": …,
    "video_type": …,
    "title": …,
    "duration_sec": …,
    "duration_seconds": …,
    "play_count": …,
    "like_count": …,
    "comment_count": …,
    "share_count": …,
    "collect_count": …,
    "impression_count": …,
    "posted_at": …,
    "cover_url": …,
    "video_url": …,
    "author_id": …,
    "author_name": …,
    "author_avatar_url": …,
    "author_follower_count": …,
    "author_verified": …,
    "author_auth_info": …,
    "platform": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 展示次数和播放量是一回事吗？

不是。`impression_count` 是这条视频在信息流里被展示了多少次，`play_count` 才是播放量。两个数相除，可以粗略看展示转成播放的比例；展示次数小视频不给，横版视频才有。

### 为什么用文章链接查视频会返回空？

视频详情只认视频。文章的 ID 查不到视频，返回的是空结果，不是出错。手里是文章链接时，用文章详情那一页；要读视频，填 /video/、/item/ 或 /group/ 形式的链接，或者其中的纯数字 ID。

### 竖版小视频的结果为什么缺字段？

`video_type` 标明是竖版小视频时，结果里没有 `author_id`、展示次数 `impression_count`，也不给作者粉丝数 `author_follower_count`。批量处理时，这几个字段要按缺失处理，别当成 0；横版视频不受这个限制。

## Also

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