Answers

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

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

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 {{cost:xiaohongshu.notes.search20+xiaohongshu.trends.list7+xiaohongshu.notes.get*30}}

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

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; for the kind of questions this answers, the trend research page.

Updated