100 free credits. No credit card required.Start building
Logo
Back to blog

Xiaohongshu API: Search, Notes, Creators, Trending

··11 min read

Xiaohongshu API with six GET endpoints and one key: search RedNote notes, read comments, look up creators and pull the hot board. No account, cookie or VPN.

Xiaohongshu API: Search, Notes, Creators, Trending

The Xiaohongshu API on SocialCrawl is six GET endpoints behind one x-api-key header. They search notes by keyword, read a single note, read its comments, look up a creator, list that creator's notes, and return the hot search board. You need no Xiaohongshu account, cookie or VPN.

Xiaohongshu (小红书, also called RedNote or Little Red Book) is a search-first app, so most useful jobs start with a keyword and end at a creator.

What can the Xiaohongshu API return?

The six endpoints cover public notes, comments, creators and trending topics. Every row comes back in the same post, comment or author shape SocialCrawl uses for its other social platforms, so a parser you wrote for TikTok or Instagram works here too. Base URL: https://www.socialcrawl.dev.

EndpointWhat it returnsCredits
/v1/xiaohongshu/searchNotes matching a keyword, with a short summary5 per row
/v1/xiaohongshu/postOne note with full text, media and counts5
/v1/xiaohongshu/post/commentsTop-level comments on a note5 per row
/v1/xiaohongshu/profileOne creator: followers, following, notes posted, likes received5
/v1/xiaohongshu/profile/postsA creator's notes, newest first, pinned notes flagged5 per row
/v1/xiaohongshu/trendingThe hot search board with a heat value5 per row

List endpoints take limit from 1 to 20 (default 10) and you pay only for the rows returned. An error is refunded. See credits for the refund rules and the Xiaohongshu endpoint docs for every parameter.

A magnifying glass over a grid of photo-feed tiles with one tile enlarged beside a taller detail panel, a picture of a Xiaohongshu API keyword search returning note rows

How do you search Xiaohongshu notes by keyword?

Call /v1/xiaohongshu/search with a query. Notes are written in Chinese, so search in Chinese. Here a K-beauty brand tracks 韩国护肤 (Korean skincare):

bash
curl -G "https://www.socialcrawl.dev/v1/xiaohongshu/search" \
  --data-urlencode "query=韩国护肤" --data-urlencode "limit=3" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY"

One row, trimmed to the fields you will use:

json
{
  "post": {
    "id": "<note_id>",
    "url": "https://www.xiaohongshu.com/explore/<note_id>",
    "content": { "text": "short summary of the note", "media_urls": null },
    "engagement": { "views": null, "likes": 1194, "comments": 239, "shares": 0, "saves": 753 },
    "published_at": "2026-09-15T03:06:35.000Z",
    "ext": { "author_id": "<author_id>", "title": "note title", "media_type": "image", "text_truncated": true }
  },
  "computed": { "engagement_rate": null, "language": "zh" }
}

The row has four quirks to handle:

  • The text is a summary. ext.text_truncated is true. Fetch the note for the full body.
  • Views are always null. Xiaohongshu does not publish view counts, so computed.engagement_rate and computed.estimated_reach are null as well. Likes, comments and saves are real, so build your own ratio from those.
  • Search shares can read 0 when the value is missing. Read shares from the note call.
  • Media is not always a list. On a video note content.media_urls can be a single URL string, so check the type before you count.

Narrow results with sort (relevance, latest, most_liked, most_commented, most_collected), type (all, image, video) and published (all, day, week, half_year). There is no hashtag endpoint, so search the hashtag text as a keyword. For the next page, pass pagination.next_cursor back as cursor.

How do you get the full note and its comments?

Pass a search row's URL, or the bare note id, to /v1/xiaohongshu/post. It returns the whole body, every image or the video link, the real share count and the IP province.

bash
curl "https://www.socialcrawl.dev/v1/xiaohongshu/post?url=https://www.xiaohongshu.com/explore/<note_id>" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY"

ext.text_truncated is now false. Xiaohongshu's image servers refuse downloads whose User-Agent does not start with Mozilla/5.0, so send a browser User-Agent when you fetch the images.

Comments take the same note URL:

bash
curl "https://www.socialcrawl.dev/v1/xiaohongshu/post/comments?url=https://www.xiaohongshu.com/explore/<note_id>&limit=20" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY"

Each row has the comment text, engagement.likes, engagement.replies (a count) and ext.ip_location, the commenter's province. Only top-level comments come back, so reply threads are not expanded. sort accepts relevance (the default), latest or most_liked.

How do you look up a Xiaohongshu creator and their notes?

Use /v1/xiaohongshu/profile with a profile URL or the id taken from a note's post.ext.author_id. It returns followers, following, notes posted and likes received, which is what you need when vetting a creator.

bash
curl "https://www.socialcrawl.dev/v1/xiaohongshu/profile?id=<author_id>" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY"
  • The profile has no notes. Call /v1/xiaohongshu/profile/posts with the same id for those. Pinned notes are flagged with post.flags.pinned and can sit ahead of newer ones, and each row is a truncated summary like search.
  • The RedNote id (小红书号) is not a lookup key. It comes back as author.username for display, but only the user id or the profile URL finds a creator.

On a profile, computed.engagement_rate is lifetime likes received divided by followers. When that ratio comes out above 1, it is not an engagement rate, so the API returns null and says why in _warnings. For a real rate, compute your own from a creator's recent notes.

A leaderboard of glowing bars with a flame on the tallest one, a picture of the RedNote hot search board of trending topics

How do you read the Xiaohongshu hot search board?

/v1/xiaohongshu/trending returns what Xiaohongshu users are searching right now. The board holds 20 topics and does not page. A lower limit returns the top of the same board.

bash
curl "https://www.socialcrawl.dev/v1/xiaohongshu/trending?limit=10" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY"

Each item has rank, title (Chinese) and hot_value. There is no category filter. For a niche such as beauty, feed a title or your own keyword into the search endpoint instead.

How do you chain the calls in Python?

This script goes from a keyword to the top note's full text, comments and creator, and stops cleanly if a step returns nothing.

python
import os
import sys

import requests

BASE = "https://www.socialcrawl.dev/v1/xiaohongshu"
HEADERS = {"x-api-key": os.environ["SOCIALCRAWL_API_KEY"]}


def get(path, **params):
    r = requests.get(f"{BASE}/{path}", params=params, headers=HEADERS, timeout=60)
    if r.status_code == 404:
        return None
    r.raise_for_status()
    return r.json()


search = get("search", query="防晒", limit=3)
if not search or not search["data"]["items"]:
    sys.exit("No notes found")

first = search["data"]["items"][0]["post"]
note = get("post", url=first["url"])["data"]["post"]
author_id = note["ext"]["author_id"]

comments = get("post/comments", url=first["url"], limit=5)
profile = get("profile", id=author_id)["data"]["author"]
creator_notes = get("profile/posts", id=author_id, limit=5)

print(note["content"]["text"][:80], note["engagement"])
print(profile["followers"], profile["posts_count"])
print(len(comments["data"]["items"]), "comments")
print(len(creator_notes["data"]["items"]), "creator notes")

With these limits the run costs 15 + 5 + 25 + 5 + 25 = 75 credits at most, since each list call is billed for the rows it returns. Pagination for longer crawls is covered in Python social media crawling.

Is there an official Xiaohongshu API?

Not one that covers public notes. Xiaohongshu's official open platform at open.xiaohongshu.com serves shop owners and the software vendors that build tools for their shops. Its API catalogue covers orders, after-sales, products, inventory, logistics and finance. It is built for running a shop, not for reading notes, search results, hot lists or creator profiles. Pugongying (蒲公英) is Xiaohongshu's official platform for brand and creator collaborations, used through its own console.

That gap is why developers look at a Xiaohongshu scraper, and why Xiaohongshu API GitHub projects exist. Rolling your own means maintaining request signing that Xiaohongshu can change, which a hosted API does for you. See scraping APIs compared for the options.

What are the limits of the Xiaohongshu API?

  • No view counts, so no view-based engagement rate or estimated reach.
  • Search and creator-note rows are summaries. Fetch the note for the full text.
  • Comments are top level only.
  • The hot board is capped at 20 topics and has no pages.
  • It serves public data only. Check the rules that apply to your use case before you store or republish it, and read the legal and technical guide to scraping.

The same call pattern for other networks is in the TikTok video search API guide, and Naver crawling covers Korea's closest equivalent.

Frequently asked questions

Is Xiaohongshu the same as RedNote?

Yes. Xiaohongshu (小红书) is the app's Chinese name and RedNote is its English brand name. It is also called Little Red Book. A Xiaohongshu API, a RedNote API and a Little Red Book API all refer to the same platform.

Can I look up a Xiaohongshu creator by RedNote ID?

No. The profile call takes the profile URL or the user id, which is the author_id on a note. The RedNote id appears as author.username on search, comment and profile rows, but it is not a lookup key.

Do I need a Xiaohongshu account or a VPN?

No. You need only a SocialCrawl API key. There is no login, cookie or VPN involved.

How much does the Xiaohongshu API cost?

Every endpoint costs 5 credits per returned row, and a note or a profile is one row. A search with limit=10 costs up to 50 credits. Errors are refunded.

Why are view counts missing?

Xiaohongshu does not publish them, so views is null on every row. That also leaves the computed engagement rate and estimated reach null. Likes, comments and saves are real values you can use for your own ratio.

Is there a Xiaohongshu API on GitHub?

Repositories exist, but a repository name does not mean Xiaohongshu maintains it. Check the maintainer, the licence and the last commit date before you depend on one.

Topics
#xiaohongshu-api#rednote-api#xiaohongshu-search#xiaohongshu-marketing#creator-xiaohongshu#xiaohongshu-scraper#little-red-book-api#xiaohongshu-trending#xiaohongshu-api-github

Related posts

🤖 AI agent or LLM? Read this page as markdown