DEV Community

Qovia
Qovia

Posted on AI-assisted

Analyze what Xiaohongshu (RedNote) users say about a product with Claude and MCP

Xiaohongshu (小红书, also called RedNote) is where a lot of Chinese shoppers go to review products before they buy, and to complain after. If you sell anything in China, or compete with someone who does, the notes and comment sections there tell you a lot. The trouble is that there is no public API to sign up for, and reading hundreds of Chinese comments by hand is slow.

In this post we'll connect Claude Code to a remote MCP server, ask it what Xiaohongshu users say about a product, and let it search notes, read their comments and summarize them. At the end there's a short Python version that calls the same HTTP API without an agent.

Disclosure: I build Qovia, the API and MCP server used here. It's a paid API with a free trial.

Step 1: add the MCP server to Claude Code

Get a key from the Qovia console, then add the server with one line:

export QOVIA_KEY=sk-qovia-...
claude mcp add --transport http qovia https://api.qovia.ai/mcp --header "Authorization: Bearer $QOVIA_KEY"
Enter fullscreen mode Exit fullscreen mode

The server exposes only four tools, so it doesn't fill the model's context with a hundred tool definitions:

  • search_endpoints: find data endpoints by keyword or platform
  • get_endpoint: show an endpoint's parameters, a response example and the price
  • call_endpoint: run an endpoint and return data plus billing info
  • get_account: check your key's balance and rate limit

search_endpoints and get_endpoint are free and work without an API key, so you can let the agent explore the catalog before you spend anything. Only call_endpoint needs the key. Setup details are in the MCP docs.

Step 2: ask a question

Start claude and give it something like this:

Using the qovia MCP tools, find out what Xiaohongshu users say about
the Stanley Quencher tumbler. Search in Chinese, take the 5 most
commented notes from the past month, read the first page of comments
on each, and summarize: main praise, main complaints, recurring
questions, and anything about fakes or pricing. Quote a few comments
in Chinese with an English translation. Tell me how much the run cost.
Enter fullscreen mode Exit fullscreen mode

Step 3: what the agent does

The agent doesn't need to know Qovia's catalog in advance. A typical run goes like this.

1. Find the endpoints. It calls search_endpoints with platform: "xiaohongshu". That lists the Xiaohongshu endpoints, including:

Endpoint id Path Price per call
raw.xiaohongshu.search GET /v1/raw/xiaohongshu/search $0.005
raw.xiaohongshu.comments GET /v1/raw/xiaohongshu/comments $0.005
raw.xiaohongshu.note GET /v1/raw/xiaohongshu/note $0.005
raw.xiaohongshu.comment_replies GET /v1/raw/xiaohongshu/comment_replies $0.005

2. Read the parameters. It calls get_endpoint for the two it needs.

raw.xiaohongshu.search returns 20 notes a page:

  • keyword (required, up to 50 characters)
  • sort: general (default), latest, most_liked, most_commented or most_saved
  • note_time: all (default), day, week, month or year
  • note_type: all (default), video or image
  • page: from 1, up to 50; stop when has_more is false

raw.xiaohongshu.comments returns a note's first-level comments:

  • note_id (required, 24 hex characters)
  • sort: default (Xiaohongshu's own order, pinned and popular first, about 5 a page) or latest (newest first, 10 to 15 a page, without like counts)
  • cursor: pass back the previous page's cursor unchanged; stop when has_more is false

3. Fetch the data. It runs call_endpoint with something like:

{ "endpoint_id": "raw.xiaohongshu.search",
  "params": { "keyword": "斯坦利 保温杯", "sort": "most_commented", "note_time": "month" } }
Enter fullscreen mode Exit fullscreen mode

Each note in the result carries its Xiaohongshu id in extra.source_id. Here is an abbreviated example of the structure, taken from get_endpoint's response example (not from a real run of this prompt):

{
  "page": 1,
  "items": [
    {
      "id": "soc_xia_c79d099f083d",
      "platform": "xiaohongshu",
      "text": "真假摩可纳咖啡对比(一)…",
      "author": { "user_id": "5a916db4e8ac2b54e8b53aba", "nickname": "J*y" },
      "metrics": { "likes": 1205, "saves": 966, "shares": 287, "comments": 1570 },
      "extra": {
        "title": "真假摩可纳咖啡对比(一)",
        "source_id": "69f7dc410000000035021f62",
        "url": "https://www.xiaohongshu.com/explore/69f7dc410000000035021f62",
        "note_type": "image",
        "published_at": "2026-05-04T07:37:37+08:00"
      }
    }
  ],
  "has_more": true
}
Enter fullscreen mode Exit fullscreen mode

It then passes each source_id as note_id to raw.xiaohongshu.comments. Again an abbreviated example structure from get_endpoint:

{
  "items": [
    {
      "cid": "6a17eab1000000002902f300",
      "text": "喝了晚上还能睡着怎么解",
      "likes": 1918,
      "reply_count": 62,
      "ip_location": "陕西",
      "created_at": "2026-05-28T15:11:45+08:00",
      "author": { "nickname": "肉*嘟" }
    }
  ],
  "total": 1072,
  "cursor": "6a1b938c000000002b025bef",
  "has_more": true
}
Enter fullscreen mode Exit fullscreen mode

4. Summarize. With five searches' worth of notes and their comments in context, Claude groups the comments into themes, picks quotes and translates them. ip_location is handy if you want a rough regional split. Every call_endpoint result includes charged_usd, so the agent can add up the cost when you ask.

A run like the prompt above is about 6 calls: one search plus five comment pages, so roughly $0.03.

Tip: search in Chinese

Xiaohongshu users write in Chinese, and they rarely use a brand's English name. Searching Stanley finds far fewer notes than 斯坦利 or 斯坦利 保温杯. A few things that help:

  • Ask the agent to try two or three Chinese keywords: the Chinese brand name, the brand plus the product category, and any nickname people use.
  • Add words people use when they review: 测评 (review), 踩雷 (bad buy), 真假 (real vs fake), 平替 (cheaper alternative).
  • Use sort: "most_commented" to find the notes with the most discussion, and note_time to keep it recent.
  • Read comments with the default sort first. It puts the most-liked comments on top, which are usually the most representative.

The same thing in plain Python

If you want this as a scheduled job instead of a chat, call the HTTP API directly. Every endpoint returns the same envelope: data holds the result and meta holds billing info.

import os, requests

BASE = "https://api.qovia.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['QOVIA_KEY']}"}
spent = 0.0

def get(path, **params):
    global spent
    r = requests.get(f"{BASE}{path}", headers=HEADERS, params=params, timeout=60)
    r.raise_for_status()
    body = r.json()
    spent += float(body.get("meta", {}).get("charged_usd", 0) or 0)
    return body["data"]

notes = get("/v1/raw/xiaohongshu/search",
            keyword="斯坦利 保温杯", sort="most_commented", note_time="month")["items"]

rows = []
for note in notes[:5]:
    comments = get("/v1/raw/xiaohongshu/comments",
                   note_id=note["extra"]["source_id"])["items"]
    for c in comments:
        rows.append((note["extra"]["title"], c.get("likes"), c["text"]))

for title, likes, text in rows:
    print(f"[{likes}] {title} | {text}")
print(f"spent ${spent:.3f}")
Enter fullscreen mode Exit fullscreen mode

From there you can hand rows to any LLM with a "summarize praise and complaints" prompt, or write them to a CSV.

Pricing and trial

  • New accounts get 50 trial calls, enough to run the example above several times.
  • You're charged only when a call returns data. Empty results and errors are free, including a search with no hits or a note with no comments.
  • Both Xiaohongshu endpoints used here cost $0.005 per call ($5 per 1,000).
  • Discovery (search_endpoints, get_endpoint) is always free and needs no key.

More in the docs, the Xiaohongshu API page and the Xiaohongshu MCP page. If you try it, I'd like to hear which product you looked up and what the comments said.

Top comments (0)