# 如何导出 B站评论并保留回复关系？

如何导出 B站评论并保留回复关系？结合B站的接口合同、示例和可复核步骤，在本地验证输入与结果；真实调用保持关闭。

规范页面: https://datanavoapi.com/answers/export-bilibili-comments/

当前为本地模拟模式；样本由程序生成，不代表平台实时数据，也不证明真实供应商的可用性。

## 直接回答

这个问题可从B站视频评论、B站评论回复的合同和本地样本开始核对。先明确 bilibili.videos.comments.list 的输入，再检查 comment 对象是否提供任务所需字段。

先在本地得到结构化结果，再把字段映射到表格列或文档段落。以平台和内容 ID 组成去重键，保留来源与采样时间；下载文件与写入外部应用是两个独立步骤，本地演练不会发送数据到外部。

## 对应接口与字段

| 能力 | 对象 | 返回形状 | 分页 |

| --- | --- | --- | --- |

| bilibili.videos.comments.list | 评论 | items | 显式逐页 |

| bilibili.comments.replies.list | 评论 | items | 显式逐页 |

- [B站视频评论](https://datanavoapi.com/apis/bilibili/videos/comments/list/)
- [B站评论回复](https://datanavoapi.com/apis/bilibili/comments/replies/list/)

## 输入合同

按所选方法查看参数含义、示例和条件规则；view 与 fields 控制返回内容，不改变 TEST 单价。

- 只传本方法定义的参数；未知字段在执行前拒绝。

| 方法 | 字段 | 类型 | 要求 | 含义 | 枚举或边界 | 示例 |

| --- | --- | --- | --- | --- | --- | --- |

| GET | id | string | 必填 | The video's BV number: 12 characters starting with BV1 | — | "BV1ECeJ65EZS" |

| GET | sort | string | 可选/条件 | Top comments first, or by time posted (newest first; fewer a page that way, 7 to 9 recorded) | ["popular","latest"] | — |

| GET | cursor | string | 可选/条件 | The `next_cursor` of the previous page. A new page is a new call. | — | — |

| GET | view | string | 可选/条件 | How much of each item: compact (the most used fields, long text cut short), standard, or full (adds `ext`). | ["compact","standard","full"] | — |

| GET | fields | array | 可选/条件 | Return only these fields of each item, by path (`author.name`). | maxItems: 64 | — |

## 怎样完成一次核验

先用页面列出的能力运行一条本地演示，核对对象结构；再按问题定义筛选、分类或导出。若需要真实平台结论，本地样本不能替代相应证据。

```json
{
  "capability": "bilibili.videos.comments.list",
  "method": "GET",
  "params": {
    "id": "BV1ECeJ65EZS"
  }
}
```

## 相关页面

- [B站视频评论](https://datanavoapi.com/apis/bilibili/videos/comments/list/)
- [B站评论回复](https://datanavoapi.com/apis/bilibili/comments/replies/list/)
- [B站接口](https://datanavoapi.com/apis/bilibili/)
- [B站 MCP](https://datanavoapi.com/mcp/bilibili/)
- [评论字段](https://datanavoapi.com/docs/objects/comment/)
- [用 Python 读取 B站视频与评论](https://datanavoapi.com/guides/bilibili-api-python/)
- [AI Agent 如何调用 B站数据接口？](https://datanavoapi.com/answers/bilibili-api-for-ai-agents/)
- [如何按时间整理 B站评论？](https://datanavoapi.com/answers/bilibili-comments-newest-first/)
- [B站内容、账号和评论有哪些接口？](https://datanavoapi.com/answers/bilibili-data-apis/)

[English](https://datanavoapi.com/en/answers/export-bilibili-comments/)
