# 抖音视频评论怎么全部导出

传视频的 aweme_id，用 `data.next` 每页约 20 条往下翻。翻 10 页是 10 次调用、$0.02，你这边不用登录抖音，也不用处理 cookie 和 a_bogus 签名。

更新于 2026-11-22

## 翻完全部评论

`id` 填 aweme_id：douyin.com 链接里 `/video/` 后面那串长数字。v.douyin.com 短链要先打开一次才看得到，或者用 `douyin.videos.id_from_url` 换。循环把 `data.next` 加到参数里，直到它为 null。

[抖音视频评论](https://xtikapi.com/zh/apis/douyin/comments/list): `GET /v1/douyin/comments/list`, $0.002 / 次

```bash
curl "https://xtikapi.com/v1/douyin/comments/list?id=7553178216526073134" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python
import requests

URL = "https://xtikapi.com/v1/douyin/comments/list"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

params = {"id": "7553178216526073134"}
items = []
for _ in range(10):  # one call per page
    for attempt in range(3):  # 5xx errors are not charged: retry
        response = requests.get(URL, params=params, headers=HEADERS, timeout=60)
        if response.status_code < 500:
            break
    response.raise_for_status()
    data = response.json()["data"]
    items += data["items"]
    if not data.get("next"):  # null on the last page
        break
    params.update(data["next"])

print(len(items), "items")
```

```javascript
const URL = "https://xtikapi.com/v1/douyin/comments/list";
const HEADERS = { Authorization: "Bearer YOUR_API_KEY" };

let params = {"id":"7553178216526073134"};
const items = [];
for (let page = 0; page < 10; page++) {
  let response;
  for (let attempt = 0; attempt < 3; attempt++) {
    // 5xx errors are not charged: retry
    response = await fetch(`${URL}?${new URLSearchParams(params)}`, { headers: HEADERS });
    if (response.status < 500) break;
  }
  if (!response.ok) throw new Error(`HTTP ${response.status}`);
  const { data } = await response.json();
  items.push(...data.items);
  if (!data.next) break; // null on the last page
  params = { ...params, ...data.next };
}
console.log(items.length, "items");
```

录制的真实返回（列表只保留前两条）：

```json
{
  "data": {
    "items": [
      {
        "id": "0619016826427378324",
        "text": "Example text",
        "author": {
          "id": "xx1xxxxxxxxxxxxxxxxxxxx4xx9xxxx8xxxxxxx_xxxxxxxxxx5xxx1",
          "username": "example_user",
          "name": "Example name",
          "avatar": "https://example.com/image.jpg"
        },
        "createdAt": "2026-05-31T05:59:43.000Z",
        "likeCount": 131,
        "replyCount": 7
      },
      {
        "id": "0527354275490991931",
        "text": "Example text",
        "author": {
          "id": "xx1xxxxxxxxxxxx_5xxxxxxx7xxxxx3xxxxx0xxxxxx2622xxxxxxxx",
          "username": "example_user",
          "name": "Example name",
          "avatar": "https://example.com/image.jpg"
        },
        "createdAt": "2025-09-23T13:40:33.000Z",
        "likeCount": 1,
        "replyCount": 6
      }
    ],
    "has_more": true,
    "next": {
      "cursor": 20
    }
  },
  "meta": {
    "request_id": "example",
    "endpoint": "douyin.comments.list",
    "normalized": true,
    "unavailable": [],
    "billing": {
      "charged": true,
      "amount": 0.002,
      "balance": 4.98
    }
  }
}
```

## 这个例子花多少钱

| 步骤 | 调用次数 | 单价 | 小计 |
| --- | --- | --- | --- |
| 评论，10 页、每页约 20 条 | 10 | $0.002 | $0.02 |
| 合计 | 10 | | $0.02 |

## 要注意的地方

- 2026-11-22 实测每页 20 条评论。
- 页与页会重叠：实测第二页 20 条里有 12 条第一页出现过，因为抖音按热度排评论，两次调用之间顺序会变。按 `id` 去重。
- 回复要单独取：`douyin.comment_replies.list`，传视频 `id`，评论的 `id` 作为 `comment_id`。
- 抖音不公开播放量，视频类接口的 `meta.unavailable` 里会写 `viewCount`。

## 用到的接口

- [抖音视频评论](https://xtikapi.com/zh/apis/douyin/comments/list): $0.002 / 次

## 抖音的更多内容

- [抖音博主全部视频怎么获取](https://xtikapi.com/zh/guides/douyin-user-videos)
- [抖音爬虫一直返回 CODE 429 有什么办法](https://xtikapi.com/zh/answers/douyin-crawler-code-429)
- [MediaCrawler 常见报错排查（Verifytype、抖音 page 1 empty、小红书 406、快手）与托管替代](https://xtikapi.com/zh/answers/mediacrawler-errors-and-alternatives)
- [抖音爬虫 Cookie 多久要换一次，请求频率多少合适](https://xtikapi.com/zh/answers/douyin-cookie-rotation-frequency)
- [抖音二级评论（回复）怎么抓](https://xtikapi.com/zh/answers/douyin-comment-replies-api)
- [抖音视频评论怎么导出 Excel](https://xtikapi.com/zh/answers/douyin-comments-export-excel)
- [抖音分享链接怎么提取视频 ID](https://xtikapi.com/zh/answers/douyin-share-link-to-video-id)

## 常见问题

### 用 XTikAPI 做这件事要花多少钱？

按本文的例子是 10 次调用，共 $0.02。失败和超时不收费；验证过邮箱的新账号送 $0.50 试用额度。

### 为什么同一条评论出现了两次？

抖音在两次调用之间按热度重新排序，评论可能从第一页挪到第二页。记下已经拿到的评论 ID，重复的跳过。

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/zh/guides/douyin-video-comments) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
