# 小红书博主全部笔记怎么导出

传用户 ID，用 `data.next` 每页 20 篇往下翻。5 页列出 100 篇笔记，5 次调用、$0.10；每篇都带标题、封面、点赞数和链接，字段和其他平台一样。

更新于 2026-11-22

## 列出博主的笔记

`id` 填用户 ID：主页链接里 `/user/profile/` 后面那 24 位字符，也可以把主页分享链接传给 `url`。下一页的游标是最后一篇笔记自己的 cursor，会放在 `data.next` 里。

[小红书用户笔记列表](https://xtikapi.com/zh/apis/xiaohongshu/notes/list): `GET /v1/xiaohongshu/notes/list`, $0.02 / 次

```bash
curl "https://xtikapi.com/v1/xiaohongshu/notes/list?id=5c2ed1530000000005009c81" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python
import requests

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

params = {"id": "5c2ed1530000000005009c81"}
items = []
for _ in range(5):  # 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/xiaohongshu/notes/list";
const HEADERS = { Authorization: "Bearer YOUR_API_KEY" };

let params = {"id":"5c2ed1530000000005009c81"};
const items = [];
for (let page = 0; page < 5; 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": "9xxx68x6963074187x992x85",
        "text": "Example text",
        "author": {
          "id": "8x9xx9059630741857962x55",
          "name": "Example name",
          "avatar": "https://example.com/image.jpg"
        },
        "createdAt": "2026-11-16T00:40:20.000Z",
        "likeCount": 124,
        "commentCount": 75,
        "shareCount": 268,
        "cover": "https://example.com/image.jpg",
        "url": "https://example.com/link"
      },
      {
        "id": "9xx95183963074187x994509",
        "text": "Example text",
        "author": {
          "id": "8x9xx9059630741857962x55",
          "name": "Example name",
          "avatar": "https://example.com/image.jpg"
        },
        "createdAt": "2026-11-12T04:40:17.000Z",
        "likeCount": 82,
        "commentCount": 28,
        "shareCount": 52,
        "cover": "https://example.com/image.jpg",
        "url": "https://example.com/link"
      }
    ],
    "has_more": true,
    "next": {
      "cursor": "6acc2f76000000001c02c4e7"
    }
  },
  "meta": {
    "request_id": "example",
    "endpoint": "xiaohongshu.notes.list",
    "normalized": true,
    "unavailable": [
      "viewCount"
    ],
    "billing": {
      "charged": true,
      "amount": 0.02,
      "balance": 4.98
    }
  }
}
```

## 这个例子花多少钱

| 步骤 | 调用次数 | 单价 | 小计 |
| --- | --- | --- | --- |
| 笔记，5 页、每页 20 篇 | 5 | $0.02 | $0.1 |
| 合计 | 5 | | $0.10 |

## 要注意的地方

- 2026-11-22 实测每页 20 篇，第二页和第一页没有重复。
- 每篇都带点赞、评论、分享数；小红书不公开浏览量，所以 `meta.unavailable` 里会写 `viewCount`。
- 私密和已删除的笔记不在列表里。
- 用 Python 的 csv 模块或 pandas 写成表格，每条的字段都一样。

## 用到的接口

- [小红书用户笔记列表](https://xtikapi.com/zh/apis/xiaohongshu/notes/list): $0.02 / 次

## 小红书的更多内容

- [小红书笔记评论怎么批量获取](https://xtikapi.com/zh/guides/xiaohongshu-note-comments)
- [小红书提示检测到 AI 操作或自动化行为，还能怎么采集数据](https://xtikapi.com/zh/answers/xiaohongshu-ai-operation-detected)
- [小红书博主主页笔记能断点续爬吗](https://xtikapi.com/zh/answers/xiaohongshu-creator-notes-resume)

## 常见问题

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

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

### 能导出成 Excel 吗？

能。把每页的 data.items 收集起来，用 pandas（DataFrame(items).to_excel）或 csv 模块保存，Excel 都能打开。

---

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