# XiaoHongShu (RedNote) Scraper — Notes, Search, Comments 小红书 (`technicaldost/xiaohongshu-rednote-scraper`) Actor

Scrape XiaoHongShu (小红书 / RedNote) notes by keyword: titles, authors, engagement stats, images, videos and comments. No official API needed. Built for e-commerce research, trend analysis and social listening.

- **URL**: https://apify.com/technicaldost/xiaohongshu-rednote-scraper.md
- **Developed by:** [Technical Dost Solutions](https://apify.com/technicaldost) (community)
- **Categories:** E-commerce, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## XiaoHongShu (RedNote) Scraper — Notes, Search & Comments 小红书

Scrape **XiaoHongShu (小红书 / RedNote)** notes by keyword search: titles, full text, authors, engagement stats (likes / collects / comments / shares), images, video URLs, publish time and top comments — delivered as clean JSON via the Apify API.

XiaoHongShu has **no public API**. This actor drives a real headless browser (Playwright) against the xiaohongshu.com web app and extracts structured data from rendered pages, so you get exactly what a logged-in user sees.

Built for CN/SEA e-commerce operators, US agencies, brand monitoring and trend research pipelines.

### What it does

1. Opens `xiaohongshu.com` search for each of your keywords.
2. Scrolls the result feed and collects up to `maxNotesPerKeyword` note cards.
3. Opens every note page and extracts the full note: title, description, hashtags, author, likes, collects, comment count, share count, publish time, all images, video URL.
4. Optionally scrolls the comment section and collects up to `maxCommentsPerNote` top-level comments per note (user, text, likes).
5. Pushes one dataset item per note — ready for export as JSON / CSV / Excel or API consumption.

### ⚠️ Keyless vs. cookies — read this before running

XiaoHongShu aggressively gates its web app behind login. Here is exactly what works, verified live:

| Feature | Without cookies | With login cookies |
| --- | --- | --- |
| Keyword search results | ❌ **Blocked** — the search page shows a login wall and renders zero note cards | ✅ Works |
| Note detail pages (title, author, stats, images) | ✅ Works\* | ✅ Works |
| Comments on note pages | ✅ Works\* (login popup auto-dismissed) | ✅ Works |

\* …but without keyword search there is nothing to feed the detail extractor, so **a keyless run normally produces 0 items**.

**Bottom line: set the `cookies` input.** Without it the actor still runs, warns loudly, and returns an empty dataset.

#### How to get your cookies

1. Log in to [xiaohongshu.com](https://www.xiaohongshu.com) in Chrome/Edge (phone SMS or QR scan).
2. Open DevTools (F12) → **Network** tab → refresh the page.
3. Click any request to `xiaohongshu.com` → copy the full **`Cookie:`** request header value.
4. Paste it into the `cookies` input. It looks like `a1=abc123; webId=def456; web_session=...`.

Cookies typically last days to weeks. If a run with cookies returns 0 notes, grab fresh ones.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `keywords` | string\[] | `["护肤 推荐"]` | Search keywords (Chinese or English). One search run per keyword. **Required.** |
| `maxNotesPerKeyword` | integer | `20` | Max notes scraped per keyword (1–200). |
| `maxCommentsPerNote` | integer | `0` | Max top-level comments per note. `0` skips comment extraction entirely (much faster). |
| `cookies` | string | — | Browser cookies for xiaohongshu.com (`name=value; name=value`). Strongly recommended — see above. |
| `proxyConfiguration` | object | — | Optional Apify proxy. Residential proxies help if you hit rate limits. |

#### Example input

```json
{
  "keywords": ["护肤 推荐", "夏日穿搭"],
  "maxNotesPerKeyword": 20,
  "maxCommentsPerNote": 5,
  "cookies": "a1=yourCookieValue; webId=yourCookieValue; web_session=yourCookieValue"
}
```

### Output

One dataset item per note:

| Field | Type | Description |
| --- | --- | --- |
| `keyword` | string | Keyword that found this note |
| `noteId` | string | XiaoHongShu note ID |
| `url` | string | Canonical note URL |
| `type` | string | `note` (image/text) or `video` |
| `title` | string | Note title |
| `desc` | string | Body text incl. hashtags |
| `authorName` | string | Author nickname |
| `authorId` | string | Author user ID |
| `authorUrl` | string | Author profile URL |
| `likes` | string | Like count as displayed (e.g. `2.4万`) |
| `collects` | string | Collect/favorite count |
| `commentsCount` | string | Total comment count |
| `shareCount` | string | Share count |
| `publishTime` | string | ISO publish timestamp |
| `images` | string\[] | Image URLs |
| `videoUrl` | string | Video URL (video notes only, else `null`) |
| `comments` | object\[] | `{userName, text, likes}` — empty when comment extraction is off |
| `scrapedAt` | string | ISO timestamp of scraping |

#### Example item

```json
{
  "keyword": "护肤",
  "noteId": "6a64f1c60000000010026e57",
  "url": "https://www.xiaohongshu.com/explore/6a64f1c60000000010026e57",
  "type": "note",
  "title": "讨厌夏天",
  "desc": "没有鲨人！但是是真的心好累……",
  "authorName": "+こおり+",
  "authorId": "699af24b000000001c037d61",
  "authorUrl": "https://www.xiaohongshu.com/user/profile/699af24b000000001c037d61",
  "likes": "2.4万",
  "collects": "1497",
  "commentsCount": "2153",
  "shareCount": "6106",
  "publishTime": "2026-07-25T16:06:30.000Z",
  "images": ["http://sns-webpic-qc.xhscdn.com/..."],
  "videoUrl": null,
  "comments": [
    { "userName": "+こおり+", "text": "你们点赞的是啥意思呀！", "likes": "1千+" }
  ],
  "scrapedAt": "2026-08-19T18:00:00.000Z"
}
```

### Pricing (pay per event)

- **$3.00 per 1,000 notes** scraped
- **$0.005 per comment** extracted
- **No start fee** — you only pay for successfully scraped data

Set `maxCommentsPerNote: 0` if you don't need comments — note-only runs are fast and cheap.

### Tips & limits

- **Rate limits**: XiaoHongShu throttles aggressively. Anonymous (no-cookie) access from one IP is cut off entirely after a burst of requests — with cookies, keep volumes modest per account, or attach a residential proxy (Chinese IPs work best; datacenter IPs are often pre-blocked).
- **Login wall popups** on note pages are auto-dismissed by the actor.
- Counts like `likes` are returned **as displayed** on the site (`2.4万` = 24,000) — convert in post-processing if you need raw numbers.
- Deleted or private notes are skipped with a warning.

### Legal

This actor extracts publicly visible data from xiaohongshu.com. You are responsible for complying with XiaoHongShu's Terms of Service and applicable law. Use your own account cookies at your own risk.

# Actor input Schema

## `keywords` (type: `array`):

Search keywords to look up on XiaoHongShu. Chinese or English both work. One search run per keyword.

## `maxNotesPerKeyword` (type: `integer`):

Maximum number of notes to scrape for each keyword.

## `maxCommentsPerNote` (type: `integer`):

Maximum top-level comments to extract per note. Set to 0 to skip comment extraction (much faster). Requires opening each note page. Without cookies, note detail pages are often blocked by a login wall.

## `cookies` (type: `string`):

Browser cookies for xiaohongshu.com, pasted from your browser (DevTools → Application → Cookies, or a 'Cookie' request header). Strongly recommended: without login cookies XiaoHongShu usually shows a login wall and only a small number of results may render. Format: 'name1=value1; name2=value2'.

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

Optional Apify proxy settings. Residential proxies with Chinese IPs may improve reliability.

## Actor input object example

```json
{
  "keywords": [
    "护肤 推荐"
  ],
  "maxNotesPerKeyword": 20,
  "maxCommentsPerNote": 0
}
```

# Actor output Schema

## `notesDatasetUrl` (type: `string`):

Dataset containing one item per scraped note.

# 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 = {
    "keywords": [
        "护肤 推荐"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("technicaldost/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 = { "keywords": ["护肤 推荐"] }

# Run the Actor and wait for it to finish
run = client.actor("technicaldost/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 '{
  "keywords": [
    "护肤 推荐"
  ]
}' |
apify call technicaldost/xiaohongshu-rednote-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,technicaldost/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/3fCUdB8RSyUcQA2XE/builds/ySkf0QDbwHk1RXbHq/openapi.json
