# RedNote Scraper — Xiaohongshu Posts, Comments & Video (`scrapepilot/rednote-xiaohongshu-scraper-all-in-one`) Actor

Scrape RedNote (Xiaohongshu 小红书) posts, comments, creator profiles & video URLs. Search keywords, track creators, extract sentiment — zero login for posts, profiles & video. Clean JSON, delta mode, proxy ready

- **URL**: https://apify.com/scrapepilot/rednote-xiaohongshu-scraper-all-in-one.md
- **Developed by:** [Scrape Pilot](https://apify.com/scrapepilot) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 rednote post scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

***

## 📕 RedNote Scraper — Xiaohongshu Posts, Comments, Profiles & Video

***

**RedNote (Xiaohongshu / 小红书) Scraper** — extract posts, comments, creator profiles, and direct video stream URLs at scale. Zero login required for post details, video, and creator profiles. Optional cookie for keyword search and comment threads. China's #1 lifestyle platform with 300M+ monthly active users — now fully accessible via structured JSON.

If you searched for **rednote scraper**, **xiaohongshu scraper**, **小红书爬虫**, **小红书数据采集**, **rednote post scraper**, **xiaohongshu comments scraper**, **rednote creator profile scraper**, **xiaohongshu video downloader**, **rednote keyword search**, or a **no-login xiaohongshu data extractor** — this is the actor you're looking for. ✅

***

### 💡 What is the RedNote Scraper?

**RedNote** (小红书, Xiaohongshu, "Little Red Book") is China's #1 lifestyle, review, and short-video platform with **300M+ monthly active users**. This **RedNote scraper** is your complete **Xiaohongshu data intelligence engine** — pull structured data from six surfaces:

- **Post Details** — Full post metadata, images, hashtags, engagement, and video URLs
- **Video Streams** — Direct signed MP4 master URLs for video posts
- **Comments** — Complete comment threads with user info and sentiment
- **Creator Profiles** — Followers, following, bio, location, verified status
- **User Posts** — All posts from any creator feed
- **Keyword Search** — Search posts by keyword, sort, type, and min-likes

All done without a real browser session — fast, reliable, and production-ready.

***

### 🔥 SEO Keywords (Why This RedNote Scraper Ranks)

This actor ranks for **rednote scraper**, **xiaohongshu scraper**, **小红书爬虫**, **小红书数据采集**, **rednote post scraper**, **xiaohongshu post scraper**, **rednote comments scraper**, **xiaohongshu comments scraper**, **rednote profile scraper**, **xiaohongshu creator scraper**, **xiaohongshu user scraper**, **rednote video downloader**, **xiaohongshu video downloader**, **xiaohongshu keyword search**, **rednote keyword tracker**, **xiaohongshu sentiment analysis**, **rednote data API alternative**, **xiaohongshu data extraction**, **little red book scraper**, **chinese lifestyle platform scraper**, **apify rednote actor**, **apify xiaohongshu actor**.

***

### 🚀 Key Features

| Feature | Description |
|---------|-------------|
| **6 Powerful Modes** | `post_details`, `video`, `comments`, `profile`, `search`, `user_posts`. |
| **Zero Login Required** | Post details, video streams, and creator profiles work with **no cookie**. |
| **Optional Cookie Boost** | Supply a `web_session` cookie to unlock keyword search and deep comment threads. |
| **Direct Video URLs** | Extracts signed **H.264 MP4 master URLs** for video posts. |
| **Short Link Resolution** | Automatically follows `xhslink.com` short links to full URLs. |
| **Chinese Sentiment Analysis** | Positive / negative / neutral detection with score (−1.0 to +1.0). |
| **Language Detection** | Auto-detects `zh-CN`, `en`, or `mixed` for each post/comment. |
| **Delta Mode** | Tracks seen IDs across runs so scheduled runs return only new items. |
| **Lite Mode** | Skip heavy parsing — return just `postId`, `title`, `likes`, `url` (cheaper). |
| **Ad Filter / Min Likes** | Filter by post type (video / normal) and minimum like count. |
| **Residential Proxy Ready** | Supports Apify residential proxies for high-volume runs. |
| **Pay-Per-Result Pricing** | Only charged for successfully scraped items. Empty runs cost $0. |

***

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `mode` | string | Yes | `"user_posts"` | `post_details`, `video`, `comments`, `profile`, `search`, `user_posts`. |
| `searchQuery` | string | Search mode | `"skincare routine"` | Keyword for `search` mode. |
| `userUrl` | string | No | sample URL | Single creator profile URL. |
| `userUrls` | array | No | `[]` | Additional creator profile URLs. |
| `postUrls` | array | Post modes | `["..."]` | Post URLs, short links, or note IDs. |
| `maxResults` | integer | No | `50` | Max items to return. |
| `cookieString` | string | No | `""` | Full cookie string (or single `web_session` value) to unlock gated features. |
| `sortBy` | string | No | `"general"` | Search sort: `general`, `time_descending`, `popularity_descending`. |
| `filterByType` | string | No | `"all"` | `all`, `video`, `normal`. |
| `filterByMinLikes` | integer | No | `0` | Only keep posts with at least N likes. |
| `sentimentAnalysis` | boolean | No | `false` | Add `sentiment` block to each post/comment. |
| `liteMode` | boolean | No | `false` | Return lightweight records (postId, title, likes, url) — cheaper. |
| `deltaMode` | boolean | No | `false` | Only return unseen items across runs. |
| `deltaStateKey` | string | No | `"default"` | Separate delta memory per pipeline. |
| `concurrency` | integer | No | `4` | Parallel workers for post/profile/video fetch. |
| `proxyConfiguration` | object | No | – | Apify proxy config. Residential recommended. |

***

### 📤 Output Fields (All Modes)

Every record includes `mode` and `scrapedAt`.

#### 1. `mode: "post_details"` / `"search"` / `"user_posts"` — Post Record

| Field | Type | Description |
|-------|------|-------------|
| `postId` | string | 24-char note ID. |
| `postUrl` | string | Canonical URL. |
| `xsecToken` | string | Security token used for access. |
| `type` | string | `normal` (image) or `video`. |
| `title` | string | Post title. |
| `content` | string | Full post description. |
| `tags` | array | Hashtags. |
| `publishedAt` | string | ISO 8601 publish time (UTC). |
| `location` | string | IP location (province / country). |
| `images` | array | HD image URLs. |
| `videoUrl` | string | Signed MP4 URL (video posts only). |
| `hasVideo` | boolean | Whether post is a video. |
| `likes` | integer | Like count (parsed from `1.9万` format). |
| `comments` | integer | Comment count. |
| `shares` | integer | Share count. |
| `saves` | integer | Save / bookmark count. |
| `author` | object | `{userId, nickname, avatar}`. |
| `authorName` | string | Author display name. |
| `language` | string | `zh-CN`, `en`, or `mixed`. |
| `sentiment` | object | `{polarity, score, method}` when enabled. |

#### 2. `mode: "comments"` — Comment Record

| Field | Type | Description |
|-------|------|-------------|
| `postId` | string | Parent post ID. |
| `postUrl` | string | Parent post URL. |
| `content` | string | Comment text. |
| `authorName` | string | Commenter name. |
| `avatar` | string | Commenter avatar. |
| `likes` | integer | Comment likes. |
| `publishedAt` | string | ISO 8601. |
| `language` | string | Detected language. |
| `sentiment` | object | When enabled. |

#### 3. `mode: "profile"` — Creator Profile Record

| Field | Type | Description |
|-------|------|-------------|
| `userId` | string | 24-char user ID. |
| `profileUrl` | string | `xiaohongshu.com/user/profile/{uid}`. |
| `redId` | string | RedNote display ID. |
| `nickname` | string | Display name. |
| `avatar` | string | HD avatar URL. |
| `description` | string | Bio. |
| `gender` | integer | `0`, `1`, `2`. |
| `location` | string | IP location. |
| `followers` | integer | Follower count. |
| `following` | integer | Following count. |
| `totalLikes` | integer | Total likes received. |
| `tags` | array | Creator tags. |
| `language` | string | Detected language. |
| `fetchPath` | string | Provenance of the fetch. |

#### 4. `mode: "video"` — Video Stream Record

| Field | Type | Description |
|-------|------|-------------|
| `postId` | string | Video post ID. |
| `postUrl` | string | Post URL. |
| `title` | string | Video title. |
| `authorName` | string | Author name. |
| `videoUrl` | string | Signed H.264 MP4 master URL. |
| `hasVideo` | boolean | Always `true`. |

***

### 📚 Full Input & Output Examples

#### 🔹 Example 1 — Post Details (Zero Login)

**Input:**

```json
{
  "mode": "post_details",
  "postUrls": [
    "https://www.xiaohongshu.com/explore/654321000000000001000813?xsec_token=AB123xyz",
    "http://xhslink.com/abc123"
  ],
  "sentimentAnalysis": true,
  "concurrency": 4
}
```

**Output:**

```json
[
  {
    "mode": "post_details",
    "postId": "654321000000000001000813",
    "postUrl": "https://www.xiaohongshu.com/explore/654321000000000001000813?xsec_token=AB123xyz",
    "xsecToken": "AB123xyz",
    "type": "normal",
    "title": "5分钟懒人护肤｜油皮必看！",
    "content": "最近皮肤真的太干了，试了这套组合效果惊艳...",
    "tags": ["护肤", "油皮", "懒人护肤"],
    "publishedAt": "2026-09-15T08:22:11+00:00",
    "location": "上海",
    "images": ["https://sns-img-qc.xhscdn.com/abc123.jpg"],
    "videoUrl": null,
    "hasVideo": false,
    "likes": 19000,
    "comments": 432,
    "shares": 87,
    "saves": 1520,
    "author": {
      "userId": "5d5a56c10000000001000813",
      "nickname": "小美护肤日记",
      "avatar": "https://sns-avatar-qc.xhscdn.com/xyz.jpg"
    },
    "authorName": "小美护肤日记",
    "language": "zh-CN",
    "sentiment": {"polarity": "positive", "score": 0.42, "method": "snownlp"},
    "scrapedAt": "2026-10-10T12:00:00+00:00"
  }
]
```

***

#### 🔹 Example 2 — Video Stream Extraction

**Input:**

```json
{
  "mode": "video",
  "postUrls": ["https://www.xiaohongshu.com/explore/654321000000000001000888"],
  "concurrency": 2
}
```

**Output:**

```json
[
  {
    "mode": "video",
    "postId": "654321000000000001000888",
    "postUrl": "https://www.xiaohongshu.com/explore/654321000000000001000888?xsec_token=CD456",
    "xsecToken": "CD456",
    "title": "上海隐藏小店｜探店Vlog",
    "authorName": "食在上海",
    "videoUrl": "https://sns-video-qc.xhscdn.com/stream/110/xxx/master.mp4?sign=xyz",
    "hasVideo": true,
    "scrapedAt": "2026-10-10T12:00:00+00:00"
  }
]
```

***

#### 🔹 Example 3 — Comments (Optional Cookie for Full Thread)

**Input:**

```json
{
  "mode": "comments",
  "postUrls": ["https://www.xiaohongshu.com/explore/654321000000000001000813?xsec_token=AB123xyz"],
  "maxResults": 30,
  "sentimentAnalysis": true,
  "cookieString": "web_session=YOUR_SESSION_COOKIE"
}
```

**Output:**

```json
[
  {
    "mode": "comments",
    "postId": "654321000000000001000813",
    "postUrl": "https://www.xiaohongshu.com/explore/654321000000000001000813?xsec_token=AB123xyz",
    "content": "这套我用了三个月，真的有效！",
    "authorName": "护肤小白菜",
    "avatar": "https://sns-avatar-qc.xhscdn.com/user123.jpg",
    "likes": 328,
    "publishedAt": "2026-09-16T09:11:00+00:00",
    "language": "zh-CN",
    "sentiment": {"polarity": "positive", "score": 0.55, "method": "snownlp"},
    "scrapedAt": "2026-10-10T12:00:05+00:00"
  }
]
```

***

#### 🔹 Example 4 — Creator Profile (Zero Login)

**Input:**

```json
{
  "mode": "profile",
  "userUrl": "https://www.xiaohongshu.com/user/profile/5d5a56c10000000001000813",
  "concurrency": 3
}
```

**Output:**

```json
[
  {
    "mode": "profile",
    "userId": "5d5a56c10000000001000813",
    "profileUrl": "https://www.xiaohongshu.com/user/profile/5d5a56c10000000001000813",
    "redId": "123456789",
    "nickname": "小美护肤日记",
    "avatar": "https://sns-avatar-qc.xhscdn.com/xyz.jpg",
    "description": "专注敏感肌护理｜理性护肤｜不推荐智商税",
    "gender": 2,
    "location": "上海",
    "followers": 128000,
    "following": 320,
    "totalLikes": 890000,
    "tags": ["护肤", "美妆", "敏感肌"],
    "language": "zh-CN",
    "fetchPath": "http",
    "scrapedAt": "2026-10-10T12:00:00+00:00"
  }
]
```

***

#### 🔹 Example 5 — Keyword Search (Requires Cookie)

**Input:**

```json
{
  "mode": "search",
  "searchQuery": "skincare routine",
  "maxResults": 30,
  "sortBy": "popularity_descending",
  "filterByType": "all",
  "filterByMinLikes": 500,
  "sentimentAnalysis": true,
  "cookieString": "web_session=YOUR_SESSION_COOKIE"
}
```

**Output:**

```json
[
  {
    "mode": "search",
    "postId": "654321000000000001001111",
    "postUrl": "https://www.xiaohongshu.com/explore/654321000000000001001111?xsec_token=EF789",
    "xsecToken": "EF789",
    "type": "normal",
    "title": "敏感肌必备！3步搞定日常护肤",
    "content": "",
    "tags": [],
    "publishedAt": null,
    "location": null,
    "images": ["https://sns-img-qc.xhscdn.com/cover111.jpg"],
    "videoUrl": null,
    "hasVideo": false,
    "likes": 45000,
    "comments": 890,
    "shares": 320,
    "saves": 2100,
    "author": {
      "userId": "5d5a56c10000000001000222",
      "nickname": "护肤小师太",
      "avatar": "https://sns-avatar-qc.xhscdn.com/u222.jpg"
    },
    "authorName": "护肤小师太",
    "language": "zh-CN",
    "sentiment": {"polarity": "positive", "score": 0.38, "method": "snownlp"},
    "scrapedAt": "2026-10-10T12:00:00+00:00"
  }
]
```

***

#### 🔹 Example 6 — User Posts (Creator Feed)

**Input:**

```json
{
  "mode": "user_posts",
  "userUrl": "https://www.xiaohongshu.com/user/profile/5d5a56c10000000001000813",
  "maxResults": 30,
  "sentimentAnalysis": true,
  "liteMode": false
}
```

**Output:**

```json
[
  {
    "mode": "user_posts",
    "postId": "654321000000000001002222",
    "postUrl": "https://www.xiaohongshu.com/explore/654321000000000001002222?xsec_token=GH901",
    "xsecToken": "GH901",
    "type": "normal",
    "title": "秋日护肤清单｜干皮友好",
    "content": "",
    "tags": [],
    "publishedAt": null,
    "location": null,
    "images": ["https://sns-img-qc.xhscdn.com/cover222.jpg"],
    "videoUrl": null,
    "hasVideo": false,
    "likes": 8900,
    "comments": 145,
    "shares": 22,
    "saves": 380,
    "author": {
      "userId": "5d5a56c10000000001000813",
      "nickname": "小美护肤日记",
      "avatar": "https://sns-avatar-qc.xhscdn.com/xyz.jpg"
    },
    "authorName": "小美护肤日记",
    "language": "zh-CN",
    "profileUrl": "https://www.xiaohongshu.com/user/profile/5d5a56c10000000001000813",
    "sentiment": {"polarity": "positive", "score": 0.28, "method": "snownlp"},
    "scrapedAt": "2026-10-10T12:00:00+00:00"
  }
]
```

***

#### 🔹 Example 7 — Lite Mode (Cheaper Output)

**Input:**

```json
{
  "mode": "search",
  "searchQuery": "skincare",
  "maxResults": 100,
  "liteMode": true,
  "cookieString": "web_session=YOUR_SESSION_COOKIE"
}
```

**Output:**

```json
[
  {
    "mode": "search",
    "postId": "654321000000000001001111",
    "postUrl": "https://www.xiaohongshu.com/explore/654321000000000001001111?xsec_token=EF789",
    "xsecToken": "EF789",
    "type": "normal",
    "title": "敏感肌必备！3步搞定日常护肤",
    "likes": 45000,
    "scrapedAt": "2026-10-10T12:00:00+00:00"
  }
]
```

***

### 💰 Pricing (Pay-Per-Event)

Only charged for **successfully scraped items**. Empty runs and failed lookups cost **$0**.

| Event | Event Name | Price / 1K | When Charged |
|-------|------------|------------|--------------|
| **Post scraped** | `post-scraped` | **$40.00 / 1,000** | `search`, `user_posts`, `post_details` mode items. |
| **Comment scraped** | `comment-scraped` | **$15.00 / 1,000** | Comments fetched. |
| **Creator profile scraped** | `profile-scraped` | **$80.00 / 1,000** | `profile` mode items. |
| **Video stream extracted** | `video-extracted` | **$110.00 / 1,000** | `video` mode MP4 URL extraction. |
| **Actor start** | `apify-actor-start` | **$0.00005 / run** | One-time startup fee. |

**Example costs:**

- **100 posts** (post_details) = 100 × $0.04 = **$4.00** + $0.00005 start
- **500 comments** = 500 × $0.015 = **$7.50**
- **50 creator profiles** = 50 × $0.08 = **$4.00**
- **30 video streams** = 30 × $0.11 = **$3.30**

***

### 🛠 How to Use This RedNote Scraper on Apify

1. **Create a task** with this actor.
2. **Choose the mode** in your input JSON.
3. **Fill in the required fields** (searchQuery / postUrls / userUrl).
4. **(Optional) Add `cookieString`** — for keyword search and deep comment threads.
5. **Enable residential proxies** — strongly recommended for high-volume runs.
6. **Run** — the actor handles everything automatically.
7. **Export** — download as JSON, CSV, or Excel.

#### Running via API

```bash
curl -X POST "https://api.apify.com/v2/acts/your-username~rednote-scraper/runs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "mode": "post_details",
    "postUrls": ["https://www.xiaohongshu.com/explore/654321000000000001000813"],
    "sentimentAnalysis": true
  }'
```

***

### 🎯 Use Cases (Who Uses This RedNote Scraper)

- **Brand monitoring** — Track mentions of your brand on Xiaohongshu.
- **Influencer / KOL research** — Build a database of Chinese creators with follower counts.
- **Competitive analysis** — Monitor competitor posts, hashtags, and engagement.
- **Content research** — Discover trending topics and hooks via keyword search.
- **Sentiment analysis** — Extract labeled Chinese corpora for NLP.
- **Video content discovery** — Bulk-extract direct MP4 URLs for repurposing.
- **Crisis monitoring** — Get early signals from rising negative comments.
- **Academic research** — Study Chinese consumer reviews, lifestyle trends.

***

### ❓ Frequently Asked Questions

**1. Do I need a Xiaohongshu / RedNote account?**\
No. **Post details, video, and creator profiles work with zero login.** Only **keyword search** and **deep comment pagination** benefit from a `web_session` cookie.

**2. How do I get the `web_session` cookie?**\
Log in to xiaohongshu.com in your browser → F12 → Application → Cookies → copy the `web_session` value. Paste it into the `cookieString` field.

**3. What's `xsec_token` and why does it matter?**\
`xsec_token` is a security token attached to RedNote URLs. The actor uses it when present to gain access without triggering rate limits.

**4. Does `xhslink.com` short link work?**\
Yes. The actor resolves short links automatically.

**5. What's the difference between `normal` and `video` posts?**\
`normal` = image carousel. `video` = short-video (returns signed MP4 URL).

**6. What if search returns 0 items without a cookie?**\
RedNote gates anonymous keyword search. The actor falls back to topic feeds — usually returning limited matches. For guaranteed search results, add `cookieString`. **Empty runs are $0.**

**7. What is Lite Mode?**\
`liteMode: true` returns only `postId`, `postUrl`, `title`, `likes`, `xsecToken` — cheaper and faster for lead-gen pipelines.

**8. How does delta mode work?**\
Every processed `postId` / `userId` is saved to KV Store. Future runs with the same `deltaStateKey` skip already-seen items.

**9. Can I get video files, not URLs?**\
The actor returns signed **MP4 URLs** (valid ~2 hours). Use `wget` / `curl` to download.

**10. Do I need a proxy?**\
For small runs, direct IP works. For 500+ items, residential proxies are strongly recommended.

***

### 📝 Technical Notes

- The actor is built with a production-grade HTTP pipeline optimized for RedNote.
- Handles anonymous access, optional session cookies, proxy configuration, and payload integrity for every request.
- Runs entirely server-side on Apify — no local setup required.
- Empty runs (0 results) are always free. You only pay for successfully delivered records.
- Delta state and per-run summaries are stored in Apify Key-Value Store for scheduled monitoring.
- All records are validated for JSON-serializable output and sanitized for special characters.
- Robust error handling: a single item failure never stops the run. Failures are logged and skipped.

***

### 🔗 Related Actors

- **[Weibo Scraper – Posts, Comments, Hot Search & Black Cat](https://apify.com/your-username/weibo-scraper)**
- **[Bilibili Scraper – Videos, Comments, Danmaku & Users](https://apify.com/your-username/bilibili-scraper)**
- **[WhatsApp Number Lookup – Profile, Leaks & Carrier](https://apify.com/your-username/whatsapp-number-lookup)**

***

##

***

**Start scraping RedNote / Xiaohongshu today — zero login for posts, profiles & video. Only pay for results.**

````



# Actor input Schema

## `mode` (type: `string`):

Choose scraping mode: creator posts (zero login), keyword search (with cookie), full post details (with token), post comments, creator profiles, or direct video URLs.
## `searchQuery` (type: `string`):

Keyword to search for on RedNote in 'search' mode. Example: 'skincare routine', 'Nike', or '护肤'.
## `userUrl` (type: `string`):

Single RedNote creator profile URL (used in 'user_posts' and 'profile' modes). Example: 'https://www.xiaohongshu.com/user/profile/5d5a56c10000000001000813'.
## `userUrls` (type: `array`):

List of creator profile URLs for bulk sweeps in 'user_posts' and 'profile' modes. Sweeps entire watchlist in one run.
## `postUrls` (type: `array`):

List of RedNote post URLs with ?xsec_token= query parameter or xhslink.com short links. Used in 'post_details', 'comments', and 'video' modes.
## `maxResults` (type: `integer`):

Maximum number of items (posts, comments, or profiles) to return per target.
## `cookieString` (type: `string`):

Your RedNote session cookie (e.g. 'web_session=YOUR_SESSION_COOKIE', full 'Cookie:' header, or Cookie-Editor JSON). Unlocks keyword search and deep comments.
## `sortBy` (type: `string`):

Sorting criteria for search results.
## `filterByType` (type: `string`):

Filter notes by content media type in search mode.
## `filterByMinLikes` (type: `integer`):

Exclude posts with fewer likes than this threshold.
## `sentimentAnalysis` (type: `boolean`):

Enrich output with language tag (zh-CN / en / mixed) and sentiment polarity and score (-1.0 to +1.0) using SnowNLP and lexicon fallback.
## `liteMode` (type: `boolean`):

Return compact metadata schema (postId, postUrl with token, title, likes, scrapedAt). Halves payload size for high-volume pipelines.
## `deltaMode` (type: `boolean`):

Return only posts that have not been delivered by an earlier delta run of the same stream. Ideal for recurring scheduled monitors.
## `deltaStateKey` (type: `string`):

Identifier key for the delta stream memory (e.g. 'nike-daily' or 'beauty-feed').
## `concurrency` (type: `integer`):

Number of concurrent workers for multi-URL workloads (post_details, comments, video).
## `blockResources` (type: `boolean`):

Skip downloading media bytes to save bandwidth while still emitting clean asset URLs in output records.
## `networkCapture` (type: `boolean`):

Use fast extraction path that completes earlier in the page-load lifecycle. Auto-falls back to DOM parsing if needed.
## `proxyConfiguration` (type: `object`):

Optional proxy settings. Apify Datacenter or Residential proxy helps prevent IP blocks and regional throttling.

## Actor input object example

```json
{
  "mode": "user_posts",
  "searchQuery": "skincare routine",
  "userUrl": "https://www.xiaohongshu.com/user/profile/5d5a56c10000000001000813",
  "userUrls": [],
  "postUrls": [
    "https://www.xiaohongshu.com/explore/654321000000000001000813?xsec_token=AB123"
  ],
  "maxResults": 50,
  "sortBy": "general",
  "filterByType": "all",
  "filterByMinLikes": 0,
  "sentimentAnalysis": false,
  "liteMode": false,
  "deltaMode": false,
  "deltaStateKey": "default",
  "concurrency": 4,
  "blockResources": true,
  "networkCapture": true
}
````

# Actor output Schema

## `results` (type: `string`):

Extracted RedNote posts, comments, creator profiles, or video streams.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapepilot/rednote-xiaohongshu-scraper-all-in-one").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapepilot/rednote-xiaohongshu-scraper-all-in-one").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 '{}' |
apify call scrapepilot/rednote-xiaohongshu-scraper-all-in-one --silent --output-dataset

```

## MCP server setup

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

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/2iUWnuBG3yvVma9oS/builds/F3LZctUleYYPAkzMV/openapi.json
