# 如何批量导出抖音视频评论

用 3 个接口：抖音视频搜索 → 抖音视频评论 → 抖音评论回复。下面的示例一共 12 次调用，合计 $0.0420；失败的调用不收费。

更新于 2026-11-06

按关键词搜出一批抖音视频，把每条视频下的评论一页页取下来，再展开回复多的评论。最后得到一张评论表：正文、评论者、点赞数、回复数、发布时间。

## 一步一步做

### 第 1 步：抖音视频搜索

按搜索词取一页视频。`sort` 可以按最新或最多点赞排，`published_within` 可以只要最近一天、一周或半年的。每条的 `id` 是视频编号，下一步要的就是它；`metrics.comments` 是评论数，可以先挑评论多的。（[抖音视频搜索](https://onefeedapi.com/zh/apis/douyin/videos/search/)，$0.0200 / 一次）

cURL

```bash
curl -G "https://onefeedapi.com/v1/douyin/videos/search" \
  --data-urlencode "query=露营" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.douyin.videos.search(query="露营")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.douyin.videos.search({ query: "露营" });
console.log(result.data.items);
```

命令行

```bash
onefeedapi call douyin.videos.search 'query=露营'
```

录制的返回：取自 2026-10-12 19:01 UTC 录下的真实返回。名字、正文和编号是示例，链接也是，都不是录到的原文（页面不展示任何人的个人信息）；数字是原样。长列表做了截断。请求号、游标和余额是示意。

```jsonc
{
  "code": "ok",
  "request_id": "c4c779e7-8730-415a-ab8b-2439d70fb51a",
  "data": {
    "items": [
      {
        "id": "7732320280216651754",
        "url": "https://www.douyin.com/video/7732320280216651754",
        "type": "video",
        "title": null,
        "text": "周末的露营日常，随手记录一下",
        "lang": "zh",
        "published_at": "2026-09-11T01:32:11.000Z",
        "author": {
          "id": "MS4wLjABAAAAWo9vAvyTzp3sb2-krZmkriyZuGbWt-p4togQvkClUpj",
          "username": "weekend_lin",
          "name": "小林的周末",
          "avatar_url": "https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_ec931a72ca043f30fa7e.jpeg",
          "followers": 2525
        },
        "metrics": {
          "likes": 96505,
          "comments": 2219,
          "shares": 60467,
          "favorites": 7038
        },
        "images": null,
        "hashtags": ["户外生活", "好物分享"]
      },
      // … 另有 6 条
    ]
  },
  "page": {
    "next_cursor": "c1.ts-YHxldZuVXCxH6Gev5iQGlxtlGILU8V8n9tjjp",
    "cursor_expires_at": "2026-10-12T20:01:55.000Z",
    "has_more": true,
    "returned": 7
  },
  "warnings": [],
  "meta": {
    "capability": "douyin.videos.search",
    "result_status": "complete",
    "fetched_at": "2026-10-12T19:01:55.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "metrics.views": "capability",
      "metrics.reposts": "platform",
      "author.verified": "capability",
      "mentions": "capability",
      "post_id": "platform",
      "parent_id": "platform",
      "root_id": "platform",
      "is_pinned": "capability"
    },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

### 第 2 步：抖音视频评论

把视频编号放进 `id`，一页最多 20 条评论。要下一页，就把返回的 `page.next_cursor` 作为 `cursor` 再调一次。每条评论的 `id` 和 `post_id`，加上回复数 `metrics.comments`，下一步用。（[抖音视频评论](https://onefeedapi.com/zh/apis/douyin/videos/comments/list/)，$0.0020 / 一次）

cURL

```bash
curl -G "https://onefeedapi.com/v1/douyin/videos/comments/list" \
  --data-urlencode "id=7694940173372575014" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.douyin.videos.comments.list(id="7694940173372575014")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.douyin.videos.comments.list({ id: "7694940173372575014" });
console.log(result.data.items);
```

命令行

```bash
onefeedapi call douyin.videos.comments.list id=7694940173372575014
```

录制的返回：取自 2026-10-16 18:31 UTC 录下的真实返回。名字、正文和编号是示例，链接也是，都不是录到的原文（页面不展示任何人的个人信息）；数字是原样。长列表做了截断。请求号、游标和余额是示意。

```jsonc
{
  "code": "ok",
  "request_id": "d42da88d-b7ed-4b0d-9190-4b171bfc73ad",
  "data": {
    "items": [
      {
        "id": "7544703737319021316",
        "text": "拍得好舒服，看了好几遍",
        "published_at": "2026-10-10T07:45:43.000Z",
        "author": {
          "id": "MS4wLjABAAAASYaIbhAX0MPyFQ_-aWJ7QWUFF8a5fMOppwdnFl0eOFd",
          "username": "nanfeng_0721",
          "name": "南边的风",
          "avatar_url": "https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_ec3a5fcd08ca5afb5397.jpeg"
        },
        "metrics": { "likes": 11209, "comments": 1 },
        "post_id": "7654977487690830406",
        "parent_id": null,
        "root_id": null
      },
      // … 另有 19 条
    ]
  },
  "page": {
    "next_cursor": "c1.WJBi7NXZjb_3e9vNCUTP2jkcLJBy9Nk7njwbaUrK",
    "cursor_expires_at": "2026-10-16T19:31:05.000Z",
    "has_more": true,
    "returned": 20
  },
  "warnings": [],
  "meta": {
    "capability": "douyin.videos.comments.list",
    "result_status": "complete",
    "fetched_at": "2026-10-16T18:31:05.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": { "url": "platform" },
    "billing": {
      "amount": "0.002",
      "currency": "USD",
      "balance_after": "9.998"
    }
  }
}
```

### 第 3 步：抖音评论回复

挑回复多的评论，把它的 `id` 放进 `id`、`post_id` 放进 `post_id`，取这条评论下的回复，一页最多 20 条，翻页方法和评论一样。（[抖音评论回复](https://onefeedapi.com/zh/apis/douyin/comments/replies/list/)，$0.0020 / 一次）

cURL

```bash
curl -G "https://onefeedapi.com/v1/douyin/comments/replies/list" \
  --data-urlencode "id=7655660369926603557" \
  --data-urlencode "post_id=7655283400210664719" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.douyin.comments.replies.list(id="7655660369926603557", post_id="7655283400210664719")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.douyin.comments.replies.list({ id: "7655660369926603557", post_id: "7655283400210664719" });
console.log(result.data.items);
```

命令行

```bash
onefeedapi call douyin.comments.replies.list id=7655660369926603557 post_id=7655283400210664719
```

录制的返回：取自 2026-10-12 18:59 UTC 录下的真实返回。名字、正文和编号是示例，链接也是，都不是录到的原文（页面不展示任何人的个人信息）；数字是原样。长列表做了截断。请求号、游标和余额是示意。

```jsonc
{
  "code": "ok",
  "request_id": "c6f871dc-f926-49f9-b383-d8541be44b5f",
  "data": {
    "items": [
      {
        "id": "7281542808761380598",
        "text": "第三个建议太实用了！",
        "published_at": "2026-06-26T11:50:22.000Z",
        "author": {
          "id": "MS4wLjABAAAA_p_ZcarAlfQSUXheWfou6Urggj6nSw5RWztBuPbTGeE",
          "username": "nanfeng_0721",
          "name": "南边的风",
          "avatar_url": "https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_40a6ed26a1d5485803fe.jpeg"
        },
        "metrics": { "likes": 2308 },
        "post_id": "7235042234252823683",
        "parent_id": "7808984148800124107",
        "root_id": "7288185174927937448"
      },
      // … 另有 19 条
    ]
  },
  "page": {
    "next_cursor": "c1.p2cQ0s_d9x_R4AqMMpd5I1gJ1SR4-Ep_ZmuWuU3t",
    "cursor_expires_at": "2026-10-12T19:59:36.000Z",
    "has_more": true,
    "returned": 20
  },
  "warnings": [],
  "meta": {
    "capability": "douyin.comments.replies.list",
    "result_status": "complete",
    "fetched_at": "2026-10-12T18:59:36.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": { "url": "platform", "metrics.comments": "platform" },
    "billing": {
      "amount": "0.002",
      "currency": "USD",
      "balance_after": "9.998"
    }
  }
}
```

## 示例花多少钱

一页搜索结果（8 条视频），每条视频取第一页评论，再展开其中 3 条评论的回复

| 接口 | 调用次数 | 单价 | 小计 |
| --- | --- | --- | --- |
| [抖音视频搜索](https://onefeedapi.com/zh/apis/douyin/videos/search/) | 1 | $0.0200 | $0.0200 |
| [抖音视频评论](https://onefeedapi.com/zh/apis/douyin/videos/comments/list/) | 8 | $0.0020 | $0.0160 |
| [抖音评论回复](https://onefeedapi.com/zh/apis/douyin/comments/replies/list/) | 3 | $0.0020 | $0.0060 |
| 合计 | 12 |  | $0.0420 |

价格是生成本页时的现行价格。失败的调用不收费。

## 在 AI 里做（MCP）

把 OneFeedAPI 接进你的 AI 客户端，只要接一次。之后直接说要什么，代理自己找到这些接口、看好价格，用你的余额调用。

这样说：在抖音搜“露营”，取前 8 条视频下面的第一页评论，再把回复最多的 3 条评论的回复也取出来，整理成一张表。

代理发给 call 工具的参数：

```json
{
  "capability": "douyin.videos.search",
  "query": "露营",
  "idempotency_key": "<a new UUID>"
}
```

[了解 MCP 服务](https://onefeedapi.com/zh/mcp/)

## 用 Skill 做

“评论与口碑”这个 Skill 把这件事做成了现成的任务，带花费上限。 “用户在这条内容下面夸什么、骂什么？” 它的示例运行：3 次调用，最多 $0.0060。 [评论与口碑](https://onefeedapi.com/zh/skills/comments/)

## 为什么用 OneFeedAPI

- 稳定：近 30 天接口可用 99.9%，状态页公开，可以自己核对。
- 快：近 7 天付费调用的中位耗时 2.2 秒（2026-11-06 统计）。
- 省 token：抖音的 36 个接口各取一份录制的真实返回，平台原始 JSON 合计 237.7 万 token，AI 通过 OneFeedAPI 的 MCP 读到的只有 7.2 万 token，少 97%；直接调接口拿到的 JSON 也少 96%（2026-11-06 统计）。所有平台同一种格式：作者在 `author`，互动数在 `metrics`，翻页用 `page.next_cursor`，换平台不用重写解析。
- 先看再用：每个接口的页面上都有一份录制的真实返回，字段一目了然。
- 花钱可控：失败不收费；每把 Key 能设金额上限，`X-Max-Price` 限定一次最多花多少，同一个 `Idempotency-Key` 24 小时内不重复扣费。
- 接 AI 方便：远程 MCP 服务已在 MCP 官方登记处登记（`com.onefeedapi/mcp`），Claude、Cursor、ChatGPT 都能直接用。
- 免费试用，最多 333 次，不用绑卡。

## 要知道的

- 评论和回复一页最多 20 条。`page.next_cursor` 一小时内有效，要接着翻就在这之内用。
- 搜索结果里没有播放数（`metrics.views`），评论没有单独的链接（`url`），这些字段会写在 `meta.unavailable` 里。要评论者的 IP 属地，加 `view=full`，在 `ext.ip_location` 里。

## 用到的接口

- [抖音视频搜索](https://onefeedapi.com/zh/apis/douyin/videos/search/)
- [抖音视频评论](https://onefeedapi.com/zh/apis/douyin/videos/comments/list/)
- [抖音评论回复](https://onefeedapi.com/zh/apis/douyin/comments/replies/list/)

## 抖音的更多内容

- [抖音 API](https://onefeedapi.com/zh/apis/douyin/)
- [如何批量获取抖音关键词热度趋势](https://onefeedapi.com/zh/guides/douyin-keyword-trends/)
- [如何查询抖音星图达人报价](https://onefeedapi.com/zh/guides/douyin-xingtu-creator-rates/)
- [抖音有 API 吗？用 Python 拉取视频和评论（2026）](https://onefeedapi.com/zh/guides/douyin-api-python/)
- [抖音数据怎么导出？](https://onefeedapi.com/zh/answers/export-douyin-data/)
- [抖音 sec_uid 是什么？和 uid、抖音号有什么区别？](https://onefeedapi.com/zh/answers/douyin-sec-uid/)
- [抖音 aweme_id、modal_id 是什么？v.douyin.com 短链接怎么用？](https://onefeedapi.com/zh/answers/douyin-aweme-id-modal-id/)
- [抖音搜索指数等于搜索次数吗？](https://onefeedapi.com/zh/answers/douyin-search-index-vs-search-count/)
- [巨量算数关键词指数是什么、能拿到什么？](https://onefeedapi.com/zh/answers/what-is-douyin-keyword-index-ocean-engine/)
- [抖音星图是什么？通过 API 能拿到哪些达人数据？](https://onefeedapi.com/zh/answers/what-is-douyin-xingtu/)
- [抖音数据接口有哪些？第三方接口和开放平台的区别，能取什么（2026）](https://onefeedapi.com/zh/answers/douyin-third-party-data-apis/)
- [抖音视频的播放地址（下载链接）怎么用 API 拿到？（2026）](https://onefeedapi.com/zh/answers/douyin-video-play-url-api/)
- [哪个社媒数据接口最适合接给 AI？看一次返回占多少 token（2026）](https://onefeedapi.com/zh/answers/social-media-api-for-ai-agents/)

---

目录修订号 dc959672dd18e2d0。 [网页版](https://onefeedapi.com/zh/guides/douyin-video-comments/)
