# 人在海外，怎麼讓 AI 讀到國內版小紅書的資料？

> 海外 IP 開啟小紅書會被跳到 RedNote，註冊又要國內手機號。用一個 API key，讓海外伺服器上的 AI 智慧體搜小紅書筆記、讀全文、看熱點。

網頁版：https://okdata.online/zh-hant/answers/xiaohongshu-data-for-agents-outside-china/

**簡短回答：**別讓智慧體自己開網頁，改成通過介面讀小紅書：okdata 在任何國家都能返回小紅書公開筆記，不需要小紅書帳號，也不需要國內手機號。按關鍵詞搜一次 $0.035，約 20 篇；熱點話題榜每次 $0.03。

一個在新加坡的品牌團隊，想讓調研智慧體每週回答一個問題：國內女生最近在小紅書上怎麼聊防曬。智慧體跑在美國維吉尼亞的伺服器上。基於瀏覽器的小紅書工具從海外 IP 開啟會被跳轉到 RedNote，註冊帳號一般又要國內手機號。兩個問題一起繞開的辦法，是別再讓智慧體開網頁：它調介面，介面去讀小紅書公開頁面，智慧體不管跑在哪兒都拿到同樣的 JSON。

## 大部分調研靠這三個介面

- [小紅書筆記搜尋](/zh/apis/xiaohongshu/notes/search/)：按關鍵詞搜筆記，可按綜合、最新、最熱排序。
- [小紅書筆記詳情](/zh/apis/xiaohongshu/notes/get/)：一篇筆記的全文和全部圖片，帶點贊、收藏、評論數。
- [小紅書熱點話題](/zh/apis/xiaohongshu/trends/list/)：小紅書當下推薦給創作者的話題，帶熱度。

一定用中文搜。筆記絕大多數是中文寫的，搜防曬霜得到的結果比搜 sunscreen 多得多。可以讓模型在進來時把英文需求翻成中文關鍵詞，出去時再用英文寫總結，並附上中文原句。

## 每週掃一次，花多少

| 任務 | 呼叫次數 | 費用 |
|---|---|---|
| 10 箇中文關鍵詞，各翻 2 頁 | 20 | $0.70 |
| 熱點話題，一週每天看一次 | 7 | $0.21 |
| 點贊最高的 30 篇讀全文 | 30 | $1.05 |
| 整個周度掃描 | 57 | $1.96 |

價格以美元計。餘額預充值，海外團隊用銀行卡就行，支付寶、微信支付也可以；新 key 自帶 $0.20 試用額度。

## 程式碼

```python
import os, requests

API = "https://api.okdata.online"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}

def notes(query, pages=2):
    cursor, out = None, []
    for _ in range(pages):
        params = {"query": query, "sort": "popular",
                  "fields": "id,url,title,text,metrics.likes,metrics.favorites,published_at"}
        if cursor:
            params["cursor"] = cursor
        body = requests.get(API + "/v1/xiaohongshu/notes/search", headers=H, params=params, timeout=60).json()
        if body["code"] != "ok":
            raise RuntimeError(f"{body['code']}: {body['message']}")
        out += body["data"]["items"]
        if not body["page"]["has_more"]:
            break
        cursor = body["page"]["next_cursor"]
    return out

batch = notes("防曬霜 推薦")
print(len(batch), "篇，交給模型：用英文總結，引用中文原文")
```

## 容易卡住的地方

- 小紅書不顯示瀏覽量，`metrics.views` 是 null。排序看點贊、收藏和評論就夠了。
- 每翻一頁單獨計費。周度閱讀的話，每個關鍵詞兩頁通常夠用。
- 只返回公開筆記，登入後才能看的內容和私信都拿不到。
- 資料在你呼叫時即時讀取，`meta.fetched_at` 會告訴智慧體資料有多新。

## 其他路子

請國內同事用自己的帳號手動搜，對一次性的問題往往就夠了。國內的會員制資料平台適合想看圖表和博主榜單、不想碰原始資料的團隊，不過介面是中文的，而且按月付費。不用智慧體、只想每天留一份記錄的話，可以用開源指令碼 [xiaohongshu-keyword-monitor](https://github.com/okdataapi/xiaohongshu-keyword-monitor)：定時記錄關鍵詞和品牌號的筆記，報告新筆記和互動漲得最快的筆記。智慧體的接入方式見 [MCP 頁](/zh/mcp/)，這類問題的更多玩法見[熱點與趨勢方案](/zh/solutions/trend-research/)。

## 用到的介面

- [小紅書筆記搜尋](https://okdata.online/zh/apis/xiaohongshu/notes/search/) `xiaohongshu.notes.search`：$0.035/次 · 每頁約 20 篇筆記
- [小紅書筆記詳情](https://okdata.online/zh/apis/xiaohongshu/notes/get/) `xiaohongshu.notes.get`：$0.035/次
- [小紅書熱點話題](https://okdata.online/zh/apis/xiaohongshu/trends/list/) `xiaohongshu.trends.list`：$0.03/次 · 每頁約 20 條榜單

## 更多小紅書內容

- [小紅書 API](https://okdata.online/zh/apis/xiaohongshu/)
- [小紅書 API Python 教程：筆記、博主和評論（2026）](https://okdata.online/zh/guides/xiaohongshu-api-python/)
- [怎麼按關鍵詞批次匯出小紅書評論](https://okdata.online/zh/guides/xiaohongshu-note-comments/)
- [怎麼在小紅書蒲公英按報價和閱讀量篩達人](https://okdata.online/zh/guides/xiaohongshu-pgy-creator-rates/)
- [怎麼搜尋小紅書筆記並匯出成 CSV 表格](https://okdata.online/zh/guides/xiaohongshu-search-export-notes/)
- [人在海外，怎麼讓 AI 讀到國內版小紅書的資料？](https://okdata.online/zh/answers/xiaohongshu-data-for-agents-outside-china/)
- [怎麼搭一個小紅書爆款筆記庫，用來找選題、拆爆文？](https://okdata.online/zh/answers/xiaohongshu-viral-notes-library/)
- [海外品牌怎麼監控小紅書上的品牌討論？](https://okdata.online/zh/answers/monitor-rednote-brand-mentions-outside-china/)
- [人在海外，怎麼按行業拿到小紅書的熱點話題和熱門筆記資料？](https://okdata.online/zh/answers/xiaohongshu-trending-topics-by-category/)
- [千問裡怎麼拿到抖音、小紅書、公眾號的資料？](https://okdata.online/zh/answers/qwen-douyin-xiaohongshu-data/)
- [騰訊元寶能讀抖音、小紅書的資料嗎？](https://okdata.online/zh/answers/yuanbao-douyin-xiaohongshu-data/)
- [自己爬還是按次呼叫資料介面：成本、維護和風險](https://okdata.online/zh/compare/scraping-vs-data-api/)
- [怎麼選社交媒體資料 API（2026）](https://okdata.online/zh/compare/social-media-data-apis/)
- [社媒資料 MCP 伺服器：自己部署還是用託管的](https://okdata.online/zh/compare/social-media-data-mcp-servers/)

## 資料來源

這個問題出現過的地方（讀取於 2026-11-12）：

- https://github.com/xpzouying/xiaohongshu-mcp/pull/906
- https://github.com/xpzouying/xiaohongshu-mcp/issues/609
- https://github.com/xpzouying/xiaohongshu-mcp/issues/699

更新於 2026-11-20
