# RedNote Xiaohongshu Scraper All-in-One (`zhorex/rednote-xiaohongshu-scraper`) Actor

The only RedNote scraper you need. Search posts, extract user content, download videos, scrape comments, and get profile data — all in one reliable Actor. Clean JSON output, fast, and actually works.

- **URL**: https://apify.com/zhorex/rednote-xiaohongshu-scraper.md
- **Developed by:** [Sami](https://apify.com/zhorex) (community)
- **Categories:** Social media, AI, Lead generation
- **Stats:** 2 total users, 1 monthly users, 92.9% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## RedNote (Xiaohongshu) Scraper -- All-in-One

The only RedNote scraper you need. One Actor that replaces six separate tools -- search posts, extract user content, download videos, scrape comments, and get profile data. Clean JSON output, reliable, and maintained.

### One Actor, Six Capabilities

| Mode | What it does | Input needed |
|------|-------------|--------------|
| **Search** | Find posts by keyword with filters | Search query |
| **User Posts** | Get all posts from a user's profile | User URL or ID |
| **Post Details** | Extract full data from specific posts | Post URL(s) |
| **Comments** | Scrape all comments from a post | Post URL(s) |
| **Video Download** | Get direct video download URLs | Post URL(s) |
| **User Profile** | Extract profile data (bio, followers, etc.) | User URL or ID |

### Why This Scraper?

- **All-in-one**: No need to juggle 6 different Actors for different tasks
- **Clean output**: Structured JSON with consistent schema across all modes
- **Actually works**: Built with Playwright for reliable rendering of RedNote's SPA
- **Smart extraction**: Uses Vue state data when available, falls back to DOM parsing
- **Anti-detection**: Stealth browser configuration, random delays, residential proxy support
- **Honest about limitations**: Documents what works and what doesn't

### Use Cases

- **Brand monitoring**: Track mentions and sentiment about your brand on China's hottest social platform
- **Influencer research**: Find creators, analyze their content and engagement metrics
- **Competitive analysis**: Monitor competitor activity and popular content in your niche
- **Trend discovery**: Search for trending topics, products, and content styles
- **Content research**: Study what performs well before creating your own content strategy

### Input Examples

#### Search for posts

```json
{
    "mode": "search",
    "searchQuery": "skincare routine",
    "maxResults": 50,
    "sortBy": "popularity_descending",
    "filterByType": "all",
    "filterByMinLikes": 100
}
````

#### Get a user's posts

```json
{
    "mode": "user_posts",
    "userUrl": "https://www.xiaohongshu.com/user/profile/5d7439b40000000001009f54",
    "maxResults": 100
}
```

#### Get full details for specific posts

```json
{
    "mode": "post_details",
    "postUrls": [
        "https://www.xiaohongshu.com/explore/643fa30c000000001303f836",
        "https://www.xiaohongshu.com/explore/640b414e000000001300238a"
    ]
}
```

#### Extract comments

```json
{
    "mode": "comments",
    "postUrls": ["https://www.xiaohongshu.com/explore/643fa30c000000001303f836"],
    "maxComments": 200
}
```

#### Download video URL

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

#### Get user profile

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

### Output Schema

#### Post output (search, user\_posts, post\_details)

```json
{
    "mode": "search",
    "postId": "643fa30c000000001303f836",
    "postUrl": "https://www.xiaohongshu.com/explore/643fa30c000000001303f836",
    "type": "normal",
    "title": "My Morning Skincare Routine",
    "content": "Full text of the post...",
    "images": ["https://cdn.xiaohongshu.com/image1.jpg"],
    "videoUrl": null,
    "likes": 15234,
    "comments": 423,
    "shares": 89,
    "saves": 1567,
    "tags": ["skincare", "routine"],
    "author": {
        "userId": "user123",
        "nickname": "BeautyQueen",
        "avatar": "https://cdn.xiaohongshu.com/avatar.jpg"
    },
    "publishedAt": "2026-03-15T10:30:00Z",
    "scrapedAt": "2026-04-07T12:00:00Z"
}
```

#### Profile output

```json
{
    "mode": "profile",
    "userId": "5d7439b40000000001009f54",
    "profileUrl": "https://www.xiaohongshu.com/user/profile/5d7439b40000000001009f54",
    "nickname": "BeautyQueen",
    "description": "Sharing my daily skincare tips",
    "followers": 50000,
    "following": 320,
    "totalLikes": 1200000,
    "notesCount": 156,
    "isVerified": false,
    "scrapedAt": "2026-04-07T12:00:00Z"
}
```

#### Comment output

```json
{
    "mode": "comments",
    "postId": "643fa30c000000001303f836",
    "postUrl": "https://www.xiaohongshu.com/explore/643fa30c000000001303f836",
    "authorName": "user456",
    "content": "Love this routine!",
    "likes": 42,
    "publishedAt": "2 days ago",
    "scrapedAt": "2026-04-07T12:00:00Z"
}
```

### Pricing

This Actor uses **Pay-Per-Event** pricing. You only pay for the results you get:

| Event | Price | Description |
|-------|-------|-------------|
| `post-scraped` | $0.005 | Each post extracted (search results, user posts, post details) |
| `comment-scraped` | $0.001 | Each comment extracted |
| `profile-scraped` | $0.01 | Each user profile extracted |
| `video-extracted` | $0.01 | Each video URL extracted |

**Example costs:**

- Search 100 posts: ~$0.50
- Scrape 500 posts from a user: ~$2.50
- Extract comments (200 comments): ~$0.20
- Get 10 user profiles: ~$0.10

Platform compute costs (Apify usage) are charged separately.

### Proxy Configuration

RedNote blocks datacenter IPs. **Residential proxies are required** for reliable scraping.

The default configuration uses Apify's residential proxy group. If you're using custom proxies, make sure they are residential IPs.

### Limitations

- **Best modes**: `search`, `user_posts`, and `profile` work best. These modes extract data directly from the feed and profile pages.
- **Post details/comments/video**: These modes require post-specific authentication tokens. They work best for posts that appear in the current feed. For individual posts not in the feed, use `search` or `user_posts` mode to get the data instead.
- **Login wall**: Some content (especially search results beyond the first page) may be limited by RedNote's login requirement. The scraper extracts everything available without login.
- **Rate limiting**: The scraper enforces 3-8 second delays between requests to avoid IP bans. Large scrapes will take time.
- **Content language**: Most content on RedNote is in Chinese. The scraper returns content as-is without translation.
- **Data freshness**: Engagement metrics (likes, comments, shares) reflect the values at the time of scraping.

### FAQ

**Q: Why do I get fewer results than expected?**
A: RedNote may limit content visibility for non-logged-in users. The scraper extracts everything available. If you're getting empty results, try with residential proxies.

**Q: Can I scrape in languages other than Chinese?**
A: Yes! RedNote has growing English and multilingual content. Just search in any language.

**Q: How fast is the scraper?**
A: Due to rate limiting requirements, expect ~10-20 posts per minute. This is intentionally slow to avoid IP bans and ensure reliable scraping.

**Q: Does this work with short links (xhslink.com)?**
A: Yes, the scraper handles RedNote short links and resolves them automatically.

# Actor input Schema

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

Choose what you want to scrape from RedNote.

## `searchQuery` (type: `string`):

The search term to look for on RedNote. Required for 'search' mode.

## `userUrl` (type: `string`):

RedNote user profile URL or user ID. Required for 'user\_posts' and 'profile' modes. Example: https://www.xiaohongshu.com/user/profile/USER\_ID

## `postUrls` (type: `array`):

One or more RedNote post URLs. Required for 'post\_details', 'comments', and 'video' modes.

## `maxResults` (type: `integer`):

Maximum number of results to return. 0 = unlimited. Applies to search, user\_posts, and comments modes.

## `sortBy` (type: `string`):

Sort order for search results.

## `filterByType` (type: `string`):

Filter results by content type.

## `filterByMinLikes` (type: `integer`):

Only return posts with at least this many likes. 0 = no filter.

## `includeComments` (type: `boolean`):

When scraping posts (search, user\_posts, post\_details), also scrape comments for each post. This will slow down the scraper and increase costs.

## `maxComments` (type: `integer`):

Maximum number of comments to scrape per post. Only used when includeComments is true or mode is 'comments'.

## `proxyConfiguration` (type: `object`):

Proxy settings. RedNote blocks datacenter IPs — residential proxies are strongly recommended.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "skincare routine",
  "userUrl": "https://www.xiaohongshu.com/user/profile/5d7439b40000000001009f54",
  "postUrls": [
    "https://www.xiaohongshu.com/explore/643fa30c000000001303f836"
  ],
  "maxResults": 50,
  "sortBy": "general",
  "filterByType": "all",
  "filterByMinLikes": 0,
  "includeComments": false,
  "maxComments": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "mode": "search"
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhorex/rednote-xiaohongshu-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 = { "mode": "search" }

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

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

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

```

## CLI example

```bash
echo '{
  "mode": "search"
}' |
apify call zhorex/rednote-xiaohongshu-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=zhorex/rednote-xiaohongshu-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "RedNote Xiaohongshu Scraper All-in-One",
        "description": "The only RedNote scraper you need. Search posts, extract user content, download videos, scrape comments, and get profile data — all in one reliable Actor. Clean JSON output, fast, and actually works.",
        "version": "1.0",
        "x-build-id": "f7HpgUqJV4PaNlblA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/zhorex~rednote-xiaohongshu-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-zhorex-rednote-xiaohongshu-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/zhorex~rednote-xiaohongshu-scraper/runs": {
            "post": {
                "operationId": "runs-sync-zhorex-rednote-xiaohongshu-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/zhorex~rednote-xiaohongshu-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-zhorex-rednote-xiaohongshu-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Scraping Mode",
                        "enum": [
                            "search",
                            "user_posts",
                            "post_details",
                            "comments",
                            "video",
                            "profile"
                        ],
                        "type": "string",
                        "description": "Choose what you want to scrape from RedNote.",
                        "default": "search"
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "The search term to look for on RedNote. Required for 'search' mode."
                    },
                    "userUrl": {
                        "title": "User Profile URL",
                        "type": "string",
                        "description": "RedNote user profile URL or user ID. Required for 'user_posts' and 'profile' modes. Example: https://www.xiaohongshu.com/user/profile/USER_ID"
                    },
                    "postUrls": {
                        "title": "Post URLs",
                        "type": "array",
                        "description": "One or more RedNote post URLs. Required for 'post_details', 'comments', and 'video' modes.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 0,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of results to return. 0 = unlimited. Applies to search, user_posts, and comments modes.",
                        "default": 50
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "general",
                            "time_descending",
                            "popularity_descending"
                        ],
                        "type": "string",
                        "description": "Sort order for search results.",
                        "default": "general"
                    },
                    "filterByType": {
                        "title": "Filter by Content Type",
                        "enum": [
                            "all",
                            "note",
                            "video"
                        ],
                        "type": "string",
                        "description": "Filter results by content type.",
                        "default": "all"
                    },
                    "filterByMinLikes": {
                        "title": "Minimum Likes",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return posts with at least this many likes. 0 = no filter.",
                        "default": 0
                    },
                    "includeComments": {
                        "title": "Include Comments",
                        "type": "boolean",
                        "description": "When scraping posts (search, user_posts, post_details), also scrape comments for each post. This will slow down the scraper and increase costs.",
                        "default": false
                    },
                    "maxComments": {
                        "title": "Max Comments per Post",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of comments to scrape per post. Only used when includeComments is true or mode is 'comments'.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. RedNote blocks datacenter IPs — residential proxies are strongly recommended.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
