Xiaohongshu (RedNote)xiaohongshu.notes.search

Xiaohongshu note search API

Notes matching keywords, newest or most popular first, with images and the author.

GEThttps://api.okdata.online/v1/xiaohongshu/notes/search

Price

One call costs $0.02 and returns one page of about 20 notes. Collecting 1,000 notes takes about 50 calls, $1.00 in total. Each page is a separate call; failed calls are not charged.

Parameters

NameTypeDescription
query *requiredstringKeywords, as a person would type them into the platform search box. e.g. 防晒霜 推荐
sortstringgenerallatestpopularResult order. default general
typestringallvideoimageNote type. default all
cursorstringOpaque cursor from page.next_cursor of the previous call. Each page is a separate call.
viewstringcompactstandardfullHow much of each object comes back. full adds platform-specific fields under ext. default standard
fieldsstringComma-separated fields to keep, to save tokens.

cursor, view and fields work the same on every endpoint: how requests work.

Returned fields

Each item is a Post.

FieldTypeDescription
idstringPost ID on the platform.
urlstringLink to the post.
typestringWhat kind of post it is.
titlestring | nullTitle, where the platform has one (videos, notes, articles).
textstringCaption, body or description as plain text; articles come as Markdown.
langstring | nullLanguage code, as reported or detected.
published_atstringWhen it was published, ISO 8601 in UTC.
authorAccountRefWho posted it.
metricsMetricsCounts at fetch time; a count the platform hides is null.
imagesstring[] | nullImage URLs for image posts and notes.
hashtagsstring[] | nullHashtags or topics, without the # sign.
extobjectPlatform-specific extras. Only returned with view=full.

Request

cURL
curl -G "https://api.okdata.online/v1/xiaohongshu/notes/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=防晒霜 推荐'
Python
import os
import requests

resp = requests.get(
    "https://api.okdata.online/v1/xiaohongshu/notes/search",
    headers={"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"},
    params={"query": "防晒霜 推荐"},
    timeout=60,
)
body = resp.json()
if body["code"] != "ok":
    raise RuntimeError(f"{body['code']}: {body['message']} (charged: {body['charged']})")

for row in body["data"]["items"]:
    print(row["id"], row["metrics"]["likes"], row["text"][:60])
print("cost: $" + body["meta"]["billing"]["amount"])
TypeScript
const url = new URL('https://api.okdata.online/v1/xiaohongshu/notes/search');
url.searchParams.set('query', "防晒霜 推荐");

const res = await fetch(url, {
  headers: {
    Authorization: `Bearer ${process.env.OKDATA_API_KEY}`,
  },
});
const body = await res.json();
if (body.code !== 'ok') throw new Error(`${body.code}: ${body.message}`);

for (const row of body.data.items) {
  console.log(row.id, row.metrics.likes, row.text.slice(0, 60));
}
console.log('cost: $' + body.meta.billing.amount);
MCPtools/call
{
  "name": "call",
  "arguments": {
    "endpoint": "xiaohongshu.notes.search",
    "params": {
      "query": "防晒霜 推荐"
    }
  }
}

Or ask an agent that has the MCP server connectedUse Xiaohongshu note search and list the five posts with the most likes, with links.

Response

200 · application/jsonmeta.billing.amount = 0.02
{
  "code": "ok",
  "request_id": "0f6c2a8e-4b1d-4e0a-9a51-3c7d2b9e1f20",
  "data": {
    "items": [
      {
        "id": "6731f0a2000000001b02c3d4",
        "url": "https://www.xiaohongshu.com/explore/6731f0a2000000001b02c3d4",
        "type": "image",
        "title": "油皮夏天防晒怎么选|实测 6 款",
        "text": "连续两周通勤实测,按清爽度和防晒力排了个序,第 3 款意外好用。",
        "lang": "zh",
        "published_at": "2026-11-02T09:30:00Z",
        "author": {
          "id": "5f1234567890abcdef123456",
          "username": null,
          "name": "通勤护肤笔记",
          "avatar_url": "https://cdn.example.com/avatar/trailkit.jpg",
          "followers": 46200,
          "verified": true
        },
        "metrics": {
          "views": null,
          "likes": 48200,
          "comments": 1312,
          "shares": 2210,
          "favorites": 9650,
          "reposts": null
        },
        "images": [
          "https://sns-img.example.com/6731f0a2/1.jpg",
          "https://sns-img.example.com/6731f0a2/2.jpg"
        ],
        "hashtags": [
          "防晒",
          "油皮"
        ]
      }
    ]
  },
  "page": {
    "next_cursor": "eyJvIjoyMH0",
    "has_more": true
  },
  "warnings": [],
  "meta": {
    "capability": "xiaohongshu.notes.search",
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    },
    "unavailable": {
      "metrics.views": "platform",
      "metrics.reposts": "platform"
    },
    "cached": false,
    "replayed": false,
    "fetched_at": "2026-11-11T08:00:00Z"
  }
}

Try it

This sends a real call to https://api.okdata.online and is billed as usual: at most $0.02. Failed calls are free. Your key goes only to that address and is never stored on this site.

Questions

How much does the Xiaohongshu note search API cost?

One call costs $0.02 and returns one page of about 20 notes. Collecting 1,000 notes takes about 50 calls, $1.00 in total. Each page is a separate call; failed calls are not charged.

How do I get the next page?

Pass page.next_cursor from the response back as the cursor parameter. When page.has_more is false there is nothing left. Every page is its own call at $0.02.

Do I need a Xiaohongshu (RedNote) account, cookies or a QR login?

No. You send only your okdata API key. The data is public data from Xiaohongshu (RedNote); nothing is fetched with your own Xiaohongshu (RedNote) account.

Am I charged when a call fails?

No. Every error response says charged: false, except a timeout, which says charged: null until the outcome is known. Resend with the same Idempotency-Key and you are never charged twice.

What if Xiaohongshu (RedNote) does not show a field?

The field is null, and meta.unavailable names it with the reason: platform (the platform never shows it) or capability (we cannot fetch it yet).

Answers that use this endpoint

All Xiaohongshu (RedNote) endpoints → · Answers