# 怎样采集小红书公开笔记与评论？

怎样采集小红书公开笔记与评论？结合小红书的接口合同、示例和可复核步骤，在本地验证输入与结果；真实调用保持关闭。

规范页面: https://datanavoapi.com/answers/how-to-collect-xiaohongshu-data/

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

## 直接回答

这个问题可从小红书笔记搜索、小红书笔记详情、小红书笔记评论的合同和本地样本开始核对。先明确 xiaohongshu.notes.search 的输入，再检查 post 对象是否提供任务所需字段。

把输入范围、抽样规则和输出用途写清楚，保留请求编号与缺失字段。接口只能提供合同中的结构化样本；研究结论需要另外核对语境与代表性。

## 对应接口与字段

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

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

| xiaohongshu.notes.search | 内容 | items | 显式逐页 |

| xiaohongshu.notes.get | 内容 | item | 无游标 |

| xiaohongshu.notes.comments.list | 评论 | items | 显式逐页 |

- [小红书笔记搜索](https://datanavoapi.com/apis/xiaohongshu/notes/search/)
- [小红书笔记详情](https://datanavoapi.com/apis/xiaohongshu/notes/get/)
- [小红书笔记评论](https://datanavoapi.com/apis/xiaohongshu/notes/comments/list/)

## 输入合同

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

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

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

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

| GET | query | string | 必填 | Search terms | — | "咖啡" |

| GET | sort | string | 可选/条件 | Sort order: relevance, newest, most liked, most commented, most saved | ["relevance","latest","popular","most_comments","most_favorites"] | — |

| GET | type | string | 可选/条件 | Video notes only (video) or image notes only (image); both when left out | ["video","image"] | — |

| GET | published_within | string | 可选/条件 | Only those published in the last day, week or half year | ["day","week","half_year"] | — |

| 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": "xiaohongshu.notes.search",
  "method": "GET",
  "params": {
    "query": "咖啡"
  }
}
```

## 相关页面

- [小红书笔记搜索](https://datanavoapi.com/apis/xiaohongshu/notes/search/)
- [小红书笔记详情](https://datanavoapi.com/apis/xiaohongshu/notes/get/)
- [小红书笔记评论](https://datanavoapi.com/apis/xiaohongshu/notes/comments/list/)
- [小红书接口](https://datanavoapi.com/apis/xiaohongshu/)
- [小红书 MCP](https://datanavoapi.com/mcp/xiaohongshu/)
- [内容字段](https://datanavoapi.com/docs/objects/post/)
- [用 Python 读取小红书笔记](https://datanavoapi.com/guides/xiaohongshu-api-python/)
- [整理小红书笔记评论与回复](https://datanavoapi.com/guides/xiaohongshu-note-comments/)
- [搜索小红书笔记并导出表格](https://datanavoapi.com/guides/xiaohongshu-search-export-notes/)
- [评论主题研究工作流](https://datanavoapi.com/skills/comments/)

[English](https://datanavoapi.com/en/answers/how-to-collect-xiaohongshu-data/)
