cd /news/ai-agents/how-to-get-rednote-xiaohongshu-and-d… · home › topics › ai-agents › article
[ARTICLE · art-170463] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

How to get RedNote (Xiaohongshu) and Douyin data from outside China, in English

A developer built okdata, a paid API and hosted MCP server that returns public Xiaohongshu (RedNote) and Douyin data as JSON with English field names, without requiring an account, Chinese phone number or cookies. Endpoints cover note and video search, comments, and hot-topic boards at per-call prices from $0.002 to $0.02, and the developer advises querying in Chinese and having a model translate and summarize results.

by read4 min views4 publishedNov 16, 2026

In January 2025, millions of Americans installed RedNote, the English name of Xiaohongshu, and found out how much of China's consumer conversation happens there and on Douyin, TikTok's Chinese sibling. If you sell into China, run a cross-border shop or study Chinese consumers, those two apps are where the reviews, complaints and trends are. Getting that data into a spreadsheet or an AI agent from outside China is harder than it should be.

Disclosure: I build okdata, the API used below. It sells public social data per call and has a hosted MCP server for AI agents.

okdata reads public Xiaohongshu and Douyin pages for you and returns JSON with English field names, in the same shape as its TikTok or YouTube data. You need no Xiaohongshu or Douyin account, no Chinese phone number and no cookies, and it works from a server anywhere.

Data Endpoint Price
RedNote note search, about 20 notes a page xiaohongshu.notes.search $0.02 a call
Full text and images of one note xiaohongshu.notes.get $0.02
Comments on a note, about 10 a page xiaohongshu.notes.comments.list $0.02 a page
RedNote hot topics xiaohongshu.trends.list $0.02
Douyin video search, about 20 a page douyin.videos.search $0.02 a call
Comments on a Douyin video, about 20 a page douyin.videos.comments.list $0.002 a page
Douyin hot search board, 50 entries douyin.trends.list $0.002

A failed call costs nothing. You top up a balance by card, Alipay or WeChat Pay, and a new key comes with $0.10 to try it.

Every endpoint lists its price and page size before you call it.

The tip that matters most: search in Chinese. Most notes are written in Chinese, so 防晒霜 finds far more than "sunscreen". Let your model translate the query on the way in and summarize on the way out.

export OKDATA_API_KEY=okd_...
curl -G "https://api.okdata.online/v1/xiaohongshu/notes/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=防晒霜 推荐' \
  --data-urlencode 'sort=popular'

The docs example, trimmed:

{
  "code": "ok",
  "data": {
    "items": [
      {
        "id": "6731f0a2000000001b02c3d4",
        "title": "油皮夏天防晒怎么选|实测 6 款",
        "text": "连续两周通勤实测,按清爽度和防晒力排了个序,第 3 款意外好用。",
        "lang": "zh",
        "published_at": "2026-11-02T09:30:00Z",
        "metrics": { "likes": 48200, "comments": 1312, "favorites": 9650 },
        "hashtags": ["防晒", "油皮"]
      }
    ]
  },
  "page": { "next_cursor": "eyJvIjoyMH0", "has_more": true },
  "meta": { "billing": { "amount": "0.02", "currency": "USD" } }
}

The text stays in Chinese and the field names don't. metrics.favorites is RedNote's 收藏 (saves), which people use to bookmark things they mean to buy, so sort on it when you want the notes that sell. Pass page.next_cursor back as cursor for the next 20.

Hand the batch to your model with one instruction: summarize in English and quote the original Chinese next to each claim. You keep the translation honest and can check any line yourself.

import os, requests

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

def get(path, **params):
    r = requests.get(API + path, headers=H, params=params, timeout=60)
    body = r.json()
    if body["code"] != "ok":
        raise RuntimeError(f"{body['code']}: {body['message']}")
    return body["data"]["items"]

for t in get("/douyin/trends/list")[:10]:
    print(t["rank"], t["name"], t["heat"])

top = get("/douyin/videos/search", query="防晒霜", sort="most_liked")[0]
comments = get("/douyin/videos/comments/list", id=top["id"])
print(len(comments), "comments on", top["url"])

That script spends $0.002 + $0.02 + $0.002, about two and a half cents.

The Douyin hot search endpoint: 50 entries with heat, $0.002 a call.

The same data is behind one MCP URL, https://api.okdata.online/mcp. In Claude on the web: Customize → Connectors → Add custom connector, paste the URL, choose Sign in now and sign in. In Cursor, add it to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "okdata": {
      "url": "https://api.okdata.online/mcp",
      "headers": { "Authorization": "Bearer ${env:OKDATA_API_KEY}" }
    }
  }
}

Then ask in plain English:

Search Xiaohongshu for 防晒霜 推荐, read the five most-saved notes and their comments, and tell me in English what people with oily skin complain about. Quote the Chinese.

The server gives the model five tools instead of 200: it finds the endpoint, checks its price for free, then makes the paid call. You see what it will cost before it spends anything.

Every week Calls Cost
10 Chinese keywords on RedNote, 2 pages each 20 $0.40
Full text of the 30 most-saved notes 30 $0.60
First page of comments on those 30 notes 30 $0.60
Douyin hot search, once a day 7 $0.014
Week 87 $1.61

That is about $6.50 a month, with no subscription.

You can get a key at https://okdata.online/signup/?src=devto-rednote. Every endpoint, with its fields and price, is at https://okdata.online/apis/xiaohongshu/ and https://okdata.online/apis/douyin/.

What are you trying to learn from Chinese social media? I'm happy to answer in the comments, including whether this is the wrong tool for it.

── more in #ai-agents 4 stories · sorted by recency
── more on @okdata 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-get-rednote-x…] indexed:0 read:4min 2026-11-16 · —