Answers

Xiaohongshu returns error 300011 (account abnormal). How do I keep collecting notes?

Short answer

Code 300011 means Xiaohongshu has flagged the logged-in account behind your requests as abnormal, so it stops serving that account data. Public notes can still be read through okdata, which uses no account of yours: note search is $0.02 per page of about 20 notes and a creator profile $0.02.

A scraper or an MCP tool such as xiaohongshu-mcp has been pulling notes with your account's cookie. One morning every call returns {"code": 300011, "success": false}, or the tool reports that the account is abnormal and asks you to switch accounts. The data is still public. What changed is that Xiaohongshu now treats that one account as a bot, and the code is attached to the account, not to your code. You will often see it next to 300012 and 300013, which point at the IP and the request rate. For public notes, the fix is to stop needing an account at all.

Stop depending on an account

Logging in again, or buying a fresh account, starts the same clock over. If the job is reading public notes and creator pages, an API that fetches them for you removes the account from the picture. okdata needs only an API key; Xiaohongshu never sees an account of yours, so there is nothing to flag.

Cost of a daily job

Say you watch three keywords and look at ten creators every day.

Daily task Calls Cost
3 keywords, 2 pages each 6 $0.12
10 creator profiles 10 $0.20
One day 16 {{cost:xiaohongshu.notes.search6+xiaohongshu.users.get10}}
Thirty days 480 {{cost:xiaohongshu.notes.search180+xiaohongshu.users.get300}}

Failed calls are free, and so is a retry sent with the same Idempotency-Key within 24 hours.

Python example

import os, requests

r = requests.get(
    "https://api.okdata.online/v1/xiaohongshu/users/get",
    headers={"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"},
    params={"url": "https://www.xiaohongshu.com/user/profile/5f1234567890abcdef123456"},
    timeout=60,
)
body = r.json()
print(body["data"]["item"]["followers"], body["meta"]["billing"]["amount"])

Errors come back with charged and retry fields, so your loop knows whether to wait or fix the request. The full list is on the errors page.

What you give up

  • Anything that needs a login: your own feed, private notes, messages, posting. This is read-only public data.
  • View counts. Xiaohongshu does not show them, so metrics.views is null and meta.unavailable says so.
  • Replies under comments. The comments endpoint returns top-level comments with a reply count.

If you need to post or reply from an account, keep the logged-in tool for that part and slow it right down; that is the only way 300011 stays away. For reading, the competitor monitoring page shows a daily setup built on these calls.

Updated