# Xiaohongshu (RedNote) Scraper — Notes, Users & Search (`sian.agency/xiaohongshu-rednote-scraper`) Actor

Xiaohongshu + RedNote (Little Red Book) scraper — note details, user profiles, full note catalogs, comments, search across notes and users. KOL discovery, engagement metrics, lifestyle trend mining for China market research. Six operations, one clean dataset per run. No API key.

- **URL**: https://apify.com/sian.agency/xiaohongshu-rednote-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Social media, E-commerce, Automation
- **Stats:** 689 total users, 81 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $37.50 / 1,000 note details

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Xiaohongshu (RedNote) Scraper — Notes, KOLs, Comments & Search 📕

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Taobao & Tmall](https://img.shields.io/badge/Store-Taobao%20%26%20Tmall-FF4F00)](https://apify.com/sian.agency/taobao-tmall-product-scraper?fpr=sian) [![Kwai & Kuaishou](https://img.shields.io/badge/Store-Kwai%20%26%20Kuaishou-FF4906)](https://apify.com/sian.agency/kwai-kuaishou-scraper?fpr=sian) [![Douyin](https://img.shields.io/badge/Store-Douyin-161823)](https://apify.com/sian.agency/douyin-scraper?fpr=sian)

#### 🎉 Six scrapers in one — extract Xiaohongshu / RedNote (Little Red Book / 小红书 / XHS) notes, profiles, comments & search results

##### Built for KOL agencies, China-market researchers, brand teams, and lifestyle / beauty / fashion / food strategists who need clean structured RedNote data — no API key, no setup, no scraping headaches

***

### 🔎 What is the Xiaohongshu (RedNote) Scraper — and when should you use it?

The **Xiaohongshu (RedNote) Scraper** turns public Xiaohongshu notes, creator profiles, comments and keyword searches into clean, structured rows you can filter, export and feed straight into a spreadsheet, database or AI agent. No account, no portal API key, no browser automation to maintain.

**Use it when you need:** note details with title, description, cover and image URLs, note type, and like, save, comment and share counts. Creator profiles carry fan count, follow count, notes posted, RedID, bio, verification, level and location. Comments arrive with author, IP location, like count and a sample of the replies underneath them. Keyword search runs over notes or over creators, in Chinese, English or a mix of both, and pages through roughly twenty rows at a time.

**Use something else when:** you need the brand-side creator marketplace rather than the public app. Use [Xiaohongshu KOL Analytics](https://apify.com/sian.agency/xiaohongshu-kol-analytics?fpr=sian) for Pugongying marketplace records — what a creator charges per note, audience age and gender splits, and cost-effectiveness benchmarks. This actor reads what Xiaohongshu shows the public, so booking rates and audience demographics sit outside it.

### 🤖 Use with AI agents

Already connected to the [Apify MCP server](https://mcp.apify.com)? Just ask for this Actor by name: sian.agency/xiaohongshu-rednote-scraper

**Your agent can pay for its own runs.** This Actor is eligible for [agentic payments](https://docs.apify.com/platform/actors/publishing/monetize), so an agent can discover it, run it and settle the bill over [x402](https://www.x402.org/) (USDC on Base) or [Skyfire](https://www.skyfire.xyz/) — without an Apify account or API token of its own. Billing is the same either way: per successful row, never for errors.

Otherwise copy this prompt into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

```text
I want Xiaohongshu / RedNote note, creator and comment data using the Apify Actor `sian.agency/xiaohongshu-rednote-scraper`.

Use it when I need: note details with title, description, cover and image URLs, note type, and like, save, comment and share counts. Creator profiles carry fan count, follow count, notes posted, RedID, bio, verification, level and location. Comments arrive with author, IP location, like count and a sample of the replies underneath them. Keyword search runs over notes or over creators, in Chinese, English or a mix of both, and pages through roughly twenty rows at a time.

Don't use it when: you need the brand-side creator marketplace rather than the public app — use xiaohongshu-kol-analytics instead.

How to call it: pick one `operation` per run. `searchNote` and `searchUser` take a `keyword` plus `maxPages`. `noteDetail` and `noteComments` take a 24-character hex `noteId`, with an optional `xsecToken`; `noteComments` also paginates via `maxPages`. `userDetail` and `userNotes` take a 24-character hex `userId`, and `userNotes` paginates via `maxPages`. Every ID you need for a detail call is already in the rows a search returns.

Start with this input:
{
  "operation": "searchNote",
  "keyword": "美食",
  "maxPages": 3
}

Ask me which keyword, note ID or creator ID to look up, and how many pages to fetch, then run the Actor and summarise the results as a table.
```

**Things you can ask your agent for:**

- *Find the twenty most-saved RedNote posts about skincare this week and tell me which creators published them.*
- *Pull the comments on this Xiaohongshu note and summarise what people liked and disliked about the product.*
- *Give me the full note history of this creator with likes and saves per post, so I can see what works for them.*

Machine-readable API, MCP config and OpenAPI definition for this Actor are published at [apify.com/sian.agency/xiaohongshu-rednote-scraper.md](https://apify.com/sian.agency/xiaohongshu-rednote-scraper.md).

### 📋 Overview

**Tired of brittle DIY scrapers that break every time Xiaohongshu / RedNote ships a UI tweak?** This actor delivers reliable, flat structured datasets from China's #1 lifestyle-discovery platform (300M+ MAU) — one clean run per task, one tidy dataset out.

Whether you call it **Xiaohongshu**, **RedNote**, **Little Red Book**, **小红书**, or **XHS**, this scraper has you covered. The actor unifies six Xiaohongshu / RedNote scraping operations under one Apify actor — pick the operation, paste the input, run.

**What you get with SIÁN for Xiaohongshu / RedNote data:**

- ✅ **Six operations, one actor**: note detail · user profile · user note catalog · comments · search notes · search users
- ⚡ **~20 results per page** on search & user feeds — paginate to 50 pages in a single run
- 🎯 **Production-ready data shape**: curated camelCase aliases (`noteId`, `likedCount`, `collectedCount`, `userName`, `redId`, `noteTitle`, `notePageUrl`…) PLUS every raw field exactly as Xiaohongshu returns it, for power users
- 💰 **Pay-per-result pricing** — only charged for successful extractions, never for empty pages or errors
- 💎 **No API key, no setup, no proxies** — paste a note ID, user ID, or keyword and run
- ✨ **Retry-resilient**: a blip on Xiaohongshu's side is retried with backoff, so it never reaches your dataset as a broken row
- 🌐 **Chinese AND English keyword search** — every other RedNote scraper documents one or the other; we handle both natively

***

### ✨ Features

- 📕 **Note Detail**: title, description, images, like/save/share/comment counts, creator info, timestamps, video info (for video notes)
- 👤 **User Profile**: fan count, follow count, note count, bio, verification badge, level, location, full avatar set, collected-content stats
- 📰 **User Notes**: full creator note catalog with engagement metrics, paginated ~20 notes/page
- 💬 **Note Comments**: top + reply comments with author, IP location, like count, plus a top-5 reply sample per thread
- 🔍 **Search Notes**: keyword search supporting Chinese, English, and mixed queries — ~20 results/page
- 🔎 **Search Users**: discover creators by keyword with handle, RedID, verification, bio — ~20 results/page
- 🖼️ **HTTPS-normalized URLs**: every cover, avatar, and image URL ready to embed
- 🔐 **xsec_token passthrough**: surfaces the per-note signed token so subsequent detail / comment calls have higher reliability on geo-sensitive notes
- 📄 **Cursor-based pagination**: stream through up to 50 pages per run with one input parameter
- 📊 **HTML run report**: saved automatically to key-value store with success rate, errors, duration, inputs

***

### 🎬 Quick Start

Paste a Xiaohongshu / RedNote keyword and run — no RedNote API or Xiaohongshu account required.

```bash
curl -X POST https://api.apify.com/v2/acts/sian.agency~xiaohongshu-rednote-scraper/runs?token=YOUR_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"operation":"searchNote","keyword":"美食","maxPages":3}'
```

***

### 🚀 Getting Started (3 Simple Steps)

#### 1. Pick your operation

| Operation | Input | Output rows / page | Best for |
|---|---|---|---|
| 📕 `noteDetail` | `noteId` (24-char hex) | 1 | Deep scrape of a single note |
| 👤 `userDetail` | `userId` (24-char hex) | 1 | Full creator profile + counters |
| 📰 `userNotes` | `userId` + `maxPages` | ~20 | Creator's full note catalog |
| 💬 `noteComments` | `noteId` + `maxPages` | ~10 | Comment mining + sentiment |
| 🔍 `searchNote` | `keyword` + `maxPages` | ~20 | Discover notes in a niche |
| 🔎 `searchUser` | `keyword` + `maxPages` | ~20 | Discover creators in a niche |

#### 2. Paste your input

- **Note ID** → 24-char hex like `69ec85eb000000001e00cd6c` (find it in the RedNote URL `https://www.xiaohongshu.com/explore/{ID}`)
- **User ID** → 24-char hex like `5ee58a2e000000000100057e` (find it in the profile URL `https://www.xiaohongshu.com/user/profile/{ID}`)
- **Keyword** → any Chinese, English, or mixed query (`美食`, `outfit`, `skincare`, `穿搭`)

#### 3. Run it

Every run produces:

- 📦 A clean dataset (one row per extracted item)
- 📊 An HTML summary report (success rate, errors, duration)

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|---|---|---|---|
| `operation` | string | Yes | One of `noteDetail`, `userDetail`, `userNotes`, `noteComments`, `searchNote`, `searchUser`. Defaults to `searchNote`. |
| `keyword` | string | For `searchNote` / `searchUser` | Chinese, English, or mixed search query. |
| `noteId` | string | For `noteDetail` / `noteComments` | 24-character hex note ID. |
| `xsecToken` | string | No | Signed token from a search or user-notes row. Improves reliability on geo-sensitive notes. |
| `userId` | string | For `userDetail` / `userNotes` | 24-character hex creator ID (not the human-readable RedID). |
| `maxPages` | integer | No | Pages to fetch on paginated operations. Default 5, hard cap 50. Ignored by `noteDetail` and `userDetail`. |

**Search a keyword:**

```json
{
  "operation": "searchNote",
  "keyword": "美食",
  "maxPages": 3
}
```

**Pull one note in full:**

```json
{
  "operation": "noteDetail",
  "noteId": "69ec85eb000000001e00cd6c"
}
```

**Map a creator's note catalog:**

```json
{
  "operation": "userNotes",
  "userId": "5ee58a2e000000000100057e",
  "maxPages": 5
}
```

***

### 📤 Output

Results land in the Apify dataset as flat rows: curated camelCase aliases, plus every raw field exactly as Xiaohongshu returns it. Export as JSON, CSV, Excel, XML or RSS.

| Field | Type | Description |
|---|---|---|
| `_operation` | string | Which of the six operations produced the row |
| `status` | string | `success` or `error` |
| `errorMessage` | string | Human-readable reason, on error rows only |
| `noteId` | string | Note ID (notes, search notes, user notes) |
| `noteTitle` | string | Note title |
| `noteDesc` | string | Note body text |
| `noteType` | string | `normal`, `video` or `multi` |
| `noteCoverUrl` | string | Cover image, HTTPS-normalized |
| `noteImageUrls` | array | Every image on the note |
| `likedCount` | number | Likes |
| `collectedCount` | number | Saves |
| `commentsCount` | number | Comments |
| `sharedCount` | number | Shares |
| `userId` | string | Creator ID |
| `userName` / `nickname` | string | Creator display name |
| `userRedId` / `redId` | string | Human-readable RedID handle |
| `fanCount` | number | Followers (user profile rows) |
| `followCount` | number | Accounts followed (user profile rows) |
| `notesPosted` | number | Notes published (user profile rows) |
| `userBio` | string | Profile bio |
| `location` | string | Creator location |
| `userVerified` | boolean | Verification badge |
| `content` | string | Comment text (comment rows) |
| `ipLocation` | string | Comment IP region |
| `subCommentSample` | array | Up to 5 replies under a comment, inline |
| `postedAt` | number | Publish timestamp |
| `notePageUrl` / `userPageUrl` | string | Public RedNote links |

**Example row (`searchNote`):**

```json
{
  "_operation": "searchNote",
  "_fetchedAt": "2026-05-12T13:20:50Z",
  "_sourceKeyword": "美食",
  "_page": 1,
  "status": "success",
  "noteId": "69ec85eb000000001e00cd6c",
  "noteTitle": "我妈尝了一口，让我原地出摊！！",
  "noteDesc": "...",
  "noteType": "normal",
  "xsecToken": "YBJwDVhExZtED4VfSbDR5egiH44n0JKZ4ODgqZapZ7YGE=",
  "noteCoverUrl": "https://sns-webpic-qc.xhscdn.com/...",
  "noteImageUrls": ["https://sns-webpic-qc.xhscdn.com/..."],
  "likedCount": 4231,
  "collectedCount": 892,
  "commentsCount": 167,
  "sharedCount": 23,
  "userId": "5ee58a2e000000000100057e",
  "userName": "香香的美食",
  "userRedId": "257152115",
  "userVerified": false,
  "userAvatarUrl": "https://sns-avatar-qc.xhscdn.com/...",
  "postedAt": 1729184563,
  "notePageUrl": "https://www.xiaohongshu.com/explore/69ec85eb000000001e00cd6c?xsec_token=..."
}
```

***

### 🎯 Use Cases

#### 1. KOL & Creator Discovery

Search Xiaohongshu / RedNote by keyword to surface trending creators in beauty, fashion, food, travel, parenting, or any niche. Then pull full profiles (fans, verification, level, bio) to shortlist KOLs for brand campaigns.

#### 2. China Market Entry Research

RedNote / Little Red Book is China's #1 discovery platform for Western brands targeting Gen-Z and Millennial consumers. Monitor lifestyle, beauty, fashion, food, and travel trends with daily keyword scrapes.

#### 3. Content Trend Tracking

Scrape keyword searches daily to track viral notes, emerging hashtags, and breakout creators. Combine `likedCount`, `collectedCount`, and `commentsCount` to identify which content shapes are working **right now**.

#### 4. Comment Sentiment Mining

Pull comments on any note — buyer reactions, brand feedback, community sentiment — for NLP analysis, customer-service intelligence, or competitor monitoring. The `subCommentSample` field gives you reply context in a single row.

#### 5. Creator Catalog Mapping

For any user ID, pull their complete note history with engagement metrics, titles, and posting times — ideal for KOL audit, content-strategy reverse-engineering, and influencer due diligence.

#### 6. Lifestyle Trend Intelligence

Track what's trending in beauty 💄, fashion 👗, food 🍜, travel ✈️, fitness 💪, parenting 👶 — Xiaohongshu is the canonical signal for consumer-lifestyle trends in China.

***

### 🆚 Why This Scraper

| | This actor | Most competitors |
|---|---|---|
| Operations bundled | 6 (notes, users, comments, search) | 1 per actor — costs 6× more |
| Pricing model | Per-result (only successful rows) | Often per-dataset-item (charges errors too) |
| Chinese keyword support | ✅ Native | ⚠️ Often documented only with English seeds |
| Retry when the source is briefly unavailable | ✅ Auto with backoff | ❌ Surfaces broken rows |
| `xsec_token` passthrough | ✅ | ❌ |
| Curated camelCase + raw fields | ✅ Both | ⚠️ Usually one or the other |
| `subCommentSample` (replies in one row) | ✅ | ❌ Requires second fetch |

***

### 🔗 Integration Examples

#### JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/xiaohongshu-rednote-scraper').call({
  operation: 'searchNote',
  keyword: '美食',
  maxPages: 3,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/xiaohongshu-rednote-scraper').call(
    run_input={'operation': 'searchUser', 'keyword': 'skincare', 'maxPages': 2}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~xiaohongshu-rednote-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"operation":"noteComments","noteId":"69ec85eb000000001e00cd6c","maxPages":2}'
```

#### Automation Workflows (n8n / Zapier / Make)

1. **Trigger**: a schedule (daily keyword sweep) or a webhook from your own app
2. **HTTP Request**: POST the input above to the actor's run endpoint
3. **Process**: read the dataset items and filter on `likedCount` or `collectedCount`
4. **Action**: append to Google Sheets, Airtable or BigQuery, or post a digest to Slack

Apify also publishes a machine-readable API, MCP config and OpenAPI definition for this actor at [apify.com/sian.agency/xiaohongshu-rednote-scraper.md](https://apify.com/sian.agency/xiaohongshu-rednote-scraper.md).

***

### 💰 Performance & Pricing — Pay Per Result

Transparent per-event pricing. **You are only charged for successful extractions.** Failed pages and empty results cost nothing.

| Event | Charge |
|---|---|
| ▶️ Actor run start | $0.014 one-time per run |
| 📕 Note detail result | $0.05 per row |
| 👤 User profile result | $0.04 per row |
| 📰 User notes result | $0.004 per row |
| 💬 Note comment result | $0.004 per row |
| 🔍 Search note result | $0.004 per row |
| 🔎 Search user result | $0.003 per row |

Those are the standard paid-plan rates. Apify Marketplace tier discounts apply automatically: Silver pays 12–25% less per row, and Gold, Platinum and Diamond pay 25–50% less, depending on the event. Free-plan runs are billed at the Free-tier rate shown on the actor's pricing tab.

**Free plan:** try any operation from the Apify Console, with up to 25 rows per run and a small daily run allowance. Paid plans lift both caps and unlock API and scheduled runs. [See current pricing](https://apify.com/sian.agency/xiaohongshu-rednote-scraper?fpr=sian).

***

### ❓ FAQ

**Q: Do I need an Xiaohongshu / RedNote account?**
A: No. The actor handles authentication on the backend. Paste a note ID, user ID, or keyword and run.

**Q: Is this affiliated with Xiaohongshu / RedNote?**
A: No. This is an independent third-party scraping tool. See trademark disclaimer below.

**Q: What's the difference between Xiaohongshu, RedNote, and Little Red Book?**
A: All three names refer to the same platform (小红书 / XHS). "Xiaohongshu" is the original Chinese name; "RedNote" is the international app rebrand; "Little Red Book" is the direct English translation.

**Q: Where do I get a `noteId` or `userId`?**
A: From any RedNote URL — `https://www.xiaohongshu.com/explore/{noteId}` or `https://www.xiaohongshu.com/user/profile/{userId}`. Both IDs are 24-character hex strings. You can also harvest them from any `searchNote` / `searchUser` run.

**Q: How many notes can I scrape per run?**
A: Paginated operations (`userNotes`, `noteComments`, `searchNote`, `searchUser`) support up to **50 pages** per run, ~20 rows/page → up to ~1,000 rows.

**Q: What if a note is private or deleted?**
A: The actor returns an `error` row with a human-readable `errorMessage`. You are never charged for error rows.

**Q: Does it support Xiaohongshu video notes?**
A: Yes. Video notes are returned with a `videoInfo` field plus all the normal note metadata. Use `noteType` (`normal` | `video` | `multi`) to filter.

**Q: Can I run it from the API or on a schedule?**
A: Yes, on any paid Apify plan. Free-plan runs are limited to the Apify Console and MCP so that the data source stays available to everyone.

***

### 🐛 Troubleshooting

**"Invalid operation" on start**

- `operation` must be exactly one of `noteDetail`, `userDetail`, `userNotes`, `noteComments`, `searchNote`, `searchUser` — it is case-sensitive.
- Leave the fields the operation does not use blank; they are ignored, not validated.

**A search returns zero rows**

- Very narrow or misspelled keywords legitimately return nothing. Try a broader term, or the Chinese form of it — `美食` surfaces far more than "chinese food".
- Pagination stops as soon as a page comes back empty, so a 1-page result on `maxPages: 10` means the platform had no more matches.

**"Note not found" / "User not found"**

- The note or account was deleted, set private, or the ID is wrong. Check the ID against the live URL.
- IDs are 24-character hex strings. A RedID handle such as `257152115` is **not** a `userId` — pull the real ID from a `searchUser` row.

**"Data source temporarily unavailable — please retry"**

- Xiaohongshu was briefly unreachable. The actor already retries with backoff before surfacing this, and the affected row is never charged. Re-running usually clears it.

**Running via API is refused on a free plan**

- Free access runs from the Apify Console, the Store test button and MCP. API and scheduled runs need any paid Apify plan.

**Run stopped after 25 rows**

- That is the free-plan per-run result cap. Paid plans are uncapped — the run continues to your `maxPages` limit.

***

### ✨ Other SIÁN Agency Actors

- 🛍️ [Taobao & Tmall Product Scraper](https://apify.com/sian.agency/taobao-tmall-product-scraper?fpr=sian) — China e-commerce product data
- 📊 [Xiaohongshu KOL Analytics](https://apify.com/sian.agency/xiaohongshu-kol-analytics?fpr=sian) — brand-side creator rates & audience demographics
- 🎵 [Douyin Scraper](https://apify.com/sian.agency/douyin-scraper?fpr=sian) — China short-video, creator & hashtag data
- 🎥 [Kwai & Kuaishou Scraper](https://apify.com/sian.agency/kwai-kuaishou-scraper?fpr=sian) — China short-video scraper & KOL data
- 💬 [WeChat Official Account Scraper](https://apify.com/sian.agency/wechat-official-account-data-scraper?fpr=sian) — WeChat article & account data
- 📸 [Instagram AI Transcript Extractor](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian) — Reels & Stories transcription
- 🌐 [Browse all SIÁN actors →](https://apify.com/sian.agency?fpr=sian)

***

### ⚠️ Trademark Disclaimer

This is an **independent scraping tool**. It is **not affiliated with, endorsed by, or sponsored by** Xingyin Information Technology (Shanghai) Co., Ltd. or any of its affiliates. The **Xiaohongshu®**, **RedNote®**, **Little Red Book®** and **小红书®** trademarks belong to their respective owners. They appear here under nominative fair use, purely to name the platform this tool collects public data from.

This tool extracts only publicly available data. Users are responsible for complying with applicable laws, the platform's terms of service, and the privacy rights of individuals whose public posts they collect. SIÁN Agency does not store, resell, or redistribute scraped content.

***

### ⚖️ Is it legal to scrape Xiaohongshu data?

Our actors are ethical and do not extract private user data such as email addresses, gender or precise location. They only collect what a creator chose to publish. We therefore believe that our actors, used for ethical purposes by Apify users, are safe.

You should still be aware that your results can contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. Do not scrape personal data unless you have a legitimate reason to. If you are unsure whether your reason is legitimate, consult your lawyers.

This scraper is provided as-is under the Apache 2.0 license. By using it you agree to use the data lawfully, to comply with Xiaohongshu / RedNote's terms of service, and to take responsibility for your downstream use of what you collect.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

***

### 🤝 Support

**Join our active support community**

- 🐛 Bug reports & feature requests: Apify Console → Issues tab
- 📧 <apify@sian-agency.online>
- ⭐ Loving this actor? [Leave a 5-star review](https://apify.com/sian.agency/xiaohongshu-rednote-scraper/reviews) — it helps us build more features.
- 🌐 Check the [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Changelog

This Actor's version history is a separate document: https://apify.com/sian.agency/xiaohongshu-rednote-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.

- **📕 Note Detail** — deep scrape of a single note by ID (title, description, images, like/save/share/comment counts, creator info, timestamps)
- **👤 User Profile** — full profile by user ID (fan count, follow count, note count, bio, verification, level, location, avatar)
- **📰 User Notes** — paginated list of a creator's full note history (~20 notes/page)
- **💬 Note Comments** — paginated comments on a single note, with reply samples (~10 comments/page)
- **🔍 Search Notes** — keyword search across Xiaohongshu / RedNote notes, paginated (~20 results/page)
- **🔎 Search Users** — keyword search across Xiaohongshu / RedNote creators, paginated (~20 results/page)

💡 **TIP:** To combine operations, run the actor multiple times with different configurations.

## `noteId` (type: `string`):

📕 **Required for `Note Detail` and `Note Comments` operations.**

The 24-character hex Xiaohongshu / RedNote note ID. You can find it:

- In any RedNote / Xiaohongshu note URL: `https://www.xiaohongshu.com/explore/{ID}` → the trailing path segment
- In the `noteId` / `id` field of any search or user-notes result row

💡 **TIP:** To analyze a batch of notes, run a `Search Notes` operation first, copy the `noteId` from the result rows, then run `Note Detail` per ID.

⚠️ **Ignored** for User Profile, User Notes, and Search operations.

## `xsecToken` (type: `string`):

🔐 **Optional.** A short-lived signed token attached to public notes — surfaced as `xsecToken` in any search or user-notes result row.

Provide it if you have it (improves reliability on geo-restricted or sensitive notes); leave blank otherwise.

## `userId` (type: `string`):

👤 **Required for `User Profile` and `User Notes` operations.**

The 24-character hex Xiaohongshu / RedNote user ID (not the human-readable `red_id`). You can find it:

- In the `userId` / `userid` field of any note, search, or comment result row
- In a creator's profile URL: `https://www.xiaohongshu.com/user/profile/{ID}`

💡 **TIP:** To build a list of creators in a niche, run `Search Users` with a keyword first, then use the top `userId` values to drill into individual profiles or note catalogs.

⚠️ **Ignored** for Note Detail, Note Comments, and Search operations.

## `keyword` (type: `string`):

🔍 **Required for `Search Notes` and `Search Users` operations.**

Any Xiaohongshu / RedNote search query. Supports Chinese, English, and mixed queries:

- `美食` (food)
- `穿搭` (outfit)
- `skincare`
- `makeup tutorial`
- `travel tips`

💡 **TIP:** Specific niches return higher-relevance results. Chinese-language queries surface more native creators; English queries surface international RedNote / Little Red Book content.

## `maxPages` (type: `integer`):

📄 **Applies to paginated operations** (User Notes, Note Comments, Search Notes, Search Users). Ignored for single-record operations (Note Detail, User Profile).

- **User Notes:** ~20 notes per page
- **Note Comments:** ~10 comments per page
- **Search Notes:** ~20 results per page
- **Search Users:** ~20 results per page

💡 **TIP:** Start small (1–3 pages) to preview results before scaling up.

⚠️ Hard cap: 50 pages to prevent runaway runs.

## Actor input object example

```json
{
  "operation": "searchNote",
  "noteId": "69ec85eb000000001e00cd6c",
  "xsecToken": "YBJwDVhExZtED4VfSbDR5egiH44n0JKZ4ODgqZapZ7YGE=",
  "userId": "5ee58a2e000000000100057e",
  "keyword": "美食",
  "maxPages": 1
}
```

# Actor output Schema

## `output` (type: `string`):

Notes, profiles, comments, or search results — one flat row per upstream item with curated camelCase aliases (noteId, userId, likedCount, collectedCount, noteTitle, noteDesc, noteCoverUrl, userName, redId, postedAt, notePageUrl, userPageUrl, …) plus the raw upstream fields spread alongside.

## `report` (type: `string`):

HTML report with run status, success/error row counts, success rate, pages fetched, duration, and the inputs used — written even on fatal crash.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "noteId": "69ec85eb000000001e00cd6c",
    "userId": "5ee58a2e000000000100057e",
    "keyword": "美食",
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/xiaohongshu-rednote-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "noteId": "69ec85eb000000001e00cd6c",
    "userId": "5ee58a2e000000000100057e",
    "keyword": "美食",
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/xiaohongshu-rednote-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "noteId": "69ec85eb000000001e00cd6c",
  "userId": "5ee58a2e000000000100057e",
  "keyword": "美食",
  "maxPages": 1
}' |
apify call sian.agency/xiaohongshu-rednote-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sian.agency/xiaohongshu-rednote-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pGalzQTVAZFRlaL6L/builds/NbnKZCGAfhq7uRyC7/openapi.json
