# How can an AI agent outside China read Xiaohongshu instead of being sent to RedNote?

> Overseas IPs get redirected to RedNote and signing up wants a Chinese phone number. Give an agent abroad Xiaohongshu search, notes and hot topics with one API key.

Canonical page: https://okdata.online/answers/xiaohongshu-data-for-agents-outside-china/

**Short answer: **Have the agent call Xiaohongshu through an API that does the reading for it: okdata returns public Xiaohongshu notes to callers in any country, with no Xiaohongshu account and no Chinese phone number. A keyword search costs $0.02 for about 20 notes, and the hot topics list $0.02.

A brand team in Singapore wants its research agent to answer one question every week: what are Chinese women saying about sunscreen on Xiaohongshu right now? The agent runs on a server in Virginia. Browser-based Xiaohongshu tools get redirected to RedNote from an overseas IP, and signing up for an account usually asks for a mainland phone number. The way around both is to stop browsing. The agent calls an API, the API reads public Xiaohongshu pages, and the agent gets JSON wherever it runs.

## The three endpoints that cover most research

- [Xiaohongshu note search](/apis/xiaohongshu/notes/search/): notes for a keyword, sorted by relevance, newest or most popular.
- [Xiaohongshu note detail](/apis/xiaohongshu/notes/get/): the full text and every image of one note, with likes, saves and comment count.
- [Xiaohongshu hot topics](/apis/xiaohongshu/trends/list/): what Xiaohongshu is suggesting to creators right now, with heat.

Search in Chinese. Most notes are written in Chinese, so 防晒霜 finds far more than sunscreen. Let the model translate the query on the way in and summarize in English on the way out.

## A weekly scan, priced

| Task | Calls | Cost |
|---|---|---|
| 10 Chinese keywords, 2 pages each | 20 | $0.40 |
| Hot topics, once a day for a week | 7 | $0.14 |
| Full text of the 30 most-liked notes | 30 | $0.60 |
| The whole weekly scan | 57 | $1.14 |

Prices are in US dollars. The balance is prepaid by card, Alipay or WeChat Pay, and a new key comes with $0.10 to try it.

## Code

```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), "notes; hand them to the model with: summarize in English, quote the original Chinese")
```

## Things that trip people up

- Xiaohongshu never shows view counts, so `metrics.views` is null. Likes, saves and comments are the signals to rank by.
- Each page is billed on its own. Two pages per keyword is usually enough for a weekly read.
- Only public notes come back; nothing behind a login, no private messages.
- The data is read live when you call. `meta.fetched_at` tells the agent how fresh it is.

## Other routes

A Chinese colleague with a Xiaohongshu account can search by hand, and for a one-off question that is often enough. Chinese analytics dashboards such as 千瓜 or 新红 suit teams that want charts and creator rankings rather than raw data, though they are built for Chinese-speaking users and priced by the month. For the agent setup, see the [MCP page](/mcp/); for the kind of questions this answers, the [trend research page](/solutions/trend-research/).

## Endpoints used

- [Xiaohongshu note search](https://okdata.online/apis/xiaohongshu/notes/search/) `xiaohongshu.notes.search`: $0.02 per call · about 20 notes per page
- [Xiaohongshu note detail](https://okdata.online/apis/xiaohongshu/notes/get/) `xiaohongshu.notes.get`: $0.02 per call
- [Xiaohongshu hot topics](https://okdata.online/apis/xiaohongshu/trends/list/) `xiaohongshu.trends.list`: $0.02 per call · about 20 board entries per page

Updated 2026-11-12
