# Xiaohongshu API - RedNote XHS Scraper, Notes & Comments (`reportable_broth/rednote-xiaohongshu-scraper`) Actor

Xiaohongshu API / RedNote scraper (小红书, XHS, Little Red Book): keyword search with sort and filters, full note text, images and video URLs, comments, user notes and profiles. Uses your own RedNote login cookie. Monitor mode returns only new notes. $2.99 per 1,000 items.

- **URL**: https://apify.com/reportable\_broth/rednote-xiaohongshu-scraper.md
- **Developed by:** [Quiet Harvest](https://apify.com/reportable_broth) (community)
- **Categories:** Social media, Marketing, E-commerce
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 item (your own login or no login)s

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/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 (Xiaohongshu) Scraper

A RedNote / Xiaohongshu scraper (小红书, XHS): keyword search, full notes, comments, and creators' notes and profiles. Plain HTTP, the request signing is done inside the actor. No browser, no third-party API.

$2.99 per 1,000 items. You need your own RedNote cookie.

### What does RedNote Scraper do?

- **Search.** Sort by relevance, latest, most liked, most commented or most saved. Filter image or video notes. I've tested 15 pages (300 notes) on one keyword.
- **Full notes.** Search only returns a title and counts, so by default each note is opened to get the text, publish time, tags, all images and the video URL.
- **Comments** for search results, a creator's notes, or note URLs you paste.
- **Creators.** A user's notes (newest first) and their profile.

### What can I use it for?

- See what people post and say about a product, a brand or a place.
- Find the most-saved or most-liked notes in a niche.
- Read the comments under a note, or under every note a search found.
- Check a creator's recent notes and follower count before working with them.
- Run it on a schedule to collect new notes for a keyword as they come in.

### How do I use it?

1. Open the actor on Apify and click Try for free. A free Apify account is enough to start.
2. Get your RedNote cookie (steps below) and paste it into `cookie`.
3. Add keywords, note URLs or profile URLs. You can mix them in one run.
4. Click Start.
5. When it finishes, open the Output tab and download JSON, CSV or Excel. Or read the dataset through the API.

#### Getting your cookie

RedNote requires a login for search, comments and user notes, so this part is required.

1. In Chrome, open https://www.rednote.com and log in.
2. Press F12, open the Network tab, type `webapi` in the filter box, press F5.
3. Click any request. Under Request Headers, right-click the Cookie value and choose Copy value.
4. Paste it into `cookie`. It must contain `a1` and `web_session`.

Apify stores it encrypted, and it's only sent to RedNote. Use a secondary account if you can. Heavy scraping can get any account rate limited.

### Examples

Search, newest first, with some comments:

```json
{
  "cookie": "a1=...; web_session=...; webId=...",
  "searchKeywords": ["露营装备", "coffee shop tokyo"],
  "maxNotesPerKeyword": 100,
  "sort": "latest",
  "maxCommentsPerNote": 20
}
```

A creator's notes and profile:

```json
{ "cookie": "...", "users": ["https://www.rednote.com/user/profile/55767c58c2bdeb795e73735d?xsec_token=..."], "maxNotesPerUser": 100 }
```

All comments on one note (use the full URL with `xsec_token`):

```json
{ "cookie": "...", "noteUrls": ["https://www.rednote.com/explore/6a902c00000000000400a8fb?xsec_token=..."], "maxCommentsPerNoteUrl": 500 }
```

### Input

| Field | Default | |
|---|---|---|
| `accountMode` | `own` | Only option right now: your own cookie |
| `cookie` | | Required, see above |
| `searchKeywords` | | Chinese, English or hashtags |
| `maxNotesPerKeyword` | `40` | 20 per page, max 1,000 |
| `sort` | `general` | `general`, `latest`, `popular`, `comments`, `collects` |
| `noteType` | `all` | `all`, `image`, `video` |
| `fetchDetails` | `true` | Full text, time, tags, images, video URL (one extra request per note) |
| `maxCommentsPerNote` | `0` | Comments for search and user notes. 0 = off |
| `noteUrls` | `[]` | Full note URLs with `xsec_token` |
| `maxCommentsPerNoteUrl` | `50` | |
| `users` | `[]` | Profile URLs with `xsec_token` (rednote.com or xiaohongshu.com) |
| `includeProfile` | `true` | Add a profile row per user |
| `maxNotesPerUser` | `30` | Newest first |
| `onlyNew` | `false` | Skip items returned in earlier runs |
| `requestGapSecs` | `1.5` | Seconds between requests |
| `proxyConfiguration` | residential, SG | Keep residential. RedNote blocks datacenter IPs |

### What data do I get?

Every row has a `type`: `note`, `comment` or `user`.

```json
{
  "type": "note",
  "url": "https://www.rednote.com/explore/6a902c00000000000400a8fb",
  "title": "...",
  "text": "...",
  "noteType": "image",
  "createdAt": "2026-09-18T07:38:24+00:00",
  "likes": 2310, "collects": 845, "comments": 96, "shares": 40,
  "region": "上海",
  "tags": ["露营"],
  "images": ["https://..."],
  "user": { "userId": "55767c58c2bdeb795e73735d", "name": "...", "url": "https://..." },
  "keyword": "露营装备"
}
```

Notes also have `id`, `updatedAt`, `cover`, `videoUrl`, `sourceUserId`. Comments have `noteId`, `replies`, `topReplies` (up to 3). User rows have `redId`, `followers`, `following`, `likesAndCollects`, `notes`, `description`.

Text comes back as posted, mostly Simplified Chinese. Nothing is translated.

### Limits

- Note and profile URLs need their `xsec_token`. It's in the address bar when you open them in a browser. Notes found by search already carry it.
- One residential IP is kept for the run, with 1.5 s between requests. If RedNote rate-limits, it switches IP once and slows down. A second time and the run stops, so it doesn't keep hitting your account. You only pay for what was delivered.
- RedNote sometimes hides a comment's IP location, so `region` can be empty.
- RedNote changes its request signing now and then. If runs suddenly start failing, open an issue and I'll update it.

### How much does it cost?

$2.99 per 1,000 items. Notes, comments and profiles each count as one. Residential proxy traffic is included, and there's no separate compute charge. With `onlyNew` on you only pay for new items.

Some real numbers:

- 100 notes for a keyword, with full details: 100 × $0.00299 = $0.30.
- The same 100 notes with 20 comments each: 100 + 2,000 = 2,100 items = $6.28.
- A creator's profile and 100 notes: 101 items = $0.30.

Apify's free plan gives you $5 of credit a month. That's about 1,670 items here.

### FAQ

**Why do I need a cookie?**
RedNote doesn't show search, comments or a user's notes to logged-out visitors. The actor uses your login to see what you'd see in the browser.

**Is my account safe?**
The run keeps one IP, waits 1.5 s between requests, and stops if RedNote rate-limits it twice. That keeps it close to normal browsing, but I can't promise RedNote will never restrict an account. Use a secondary account if you can.

**Why did I get so few results?**
Check that the cookie still works (log in again and copy a fresh one if not), and that note and profile URLs include `xsec_token`. With `onlyNew` on, notes from earlier runs are skipped on purpose.

**Why does my note URL fail?**
It's probably missing `?xsec_token=...`. Copy the whole address from the browser bar, not just the part up to the note ID.

**Can I schedule it?**
Yes. Save your input as a Task, add a Schedule, and turn on `onlyNew` so each run only returns new notes and comments.

### Other scrapers I made

- [Weibo Scraper](https://apify.com/reportable_broth/weibo-scraper), [Douyin](https://apify.com/reportable_broth/douyin-scraper), [Bilibili](https://apify.com/reportable_broth/bilibili-scraper)
- [Threads Scraper & Monitor](https://apify.com/reportable_broth/threads-scraper-monitor), [YouTube Monitor](https://apify.com/reportable_broth/youtube-scraper-monitor)

Found a bug or need a field? Open an issue on the Issues tab.

### 中文说明

抓小红书关键词搜索（可按最新、最多赞、最多评论、最多收藏排序）、笔记全文和图片视频链接、评论、博主笔记和资料。需要填自己的小红书 cookie（步骤见上），链接要带 `xsec_token`。每 1,000 条 $2.99，住宅代理已含在内。

***

Only collects publicly available data. You're responsible for how you use it.

# Actor input Schema

## `accountMode` (type: `string`):

RedNote requires a login for search, comments and user notes. Paste your cookie below. Using our accounts (no setup): coming soon.

## `cookie` (type: `string`):

Log in at www.rednote.com and copy the Cookie request header (see README). Must contain a1 and web\_session. Stored encrypted; only sent to RedNote.

## `searchKeywords` (type: `array`):

Chinese, English or hashtags. One search per line.

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

20 notes per page.

## `sort` (type: `string`):

Search order.

## `noteType` (type: `string`):

Filter search results.

## `fetchDetails` (type: `boolean`):

Search results only have the title and counts. This fetches the full text, publish time, tags, all images and the video URL (one extra request per note).

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

0 = off.

## `noteUrls` (type: `array`):

Paste the full URL from the browser, including ?xsec\_token=... (RedNote needs it).

## `maxCommentsPerNoteUrl` (type: `integer`):

Comments to fetch for each note URL.

## `users` (type: `array`):

www.rednote.com/user/profile/<id>?xsec\_token=... (or xiaohongshu.com profile URLs).

## `includeProfile` (type: `boolean`):

Followers, following, likes and saves, note count, bio, region.

## `maxNotesPerUser` (type: `integer`):

Newest first.

## `onlyNew` (type: `boolean`):

Run on a schedule; each run returns only notes and comments earlier runs haven't returned. You only pay for new items.

## `monitorStoreName` (type: `string`):

Runs with the same inputs share memory automatically.

## `requestGapSecs` (type: `number`):

Slower is safer for your account.

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

Residential is recommended; RedNote blocks datacenter IPs. One IP is kept for the whole run.

## Actor input object example

```json
{
  "accountMode": "own",
  "searchKeywords": [
    "露营装备"
  ],
  "maxNotesPerKeyword": 40,
  "sort": "general",
  "noteType": "all",
  "fetchDetails": true,
  "maxCommentsPerNote": 0,
  "noteUrls": [],
  "maxCommentsPerNoteUrl": 50,
  "users": [],
  "includeProfile": true,
  "maxNotesPerUser": 30,
  "onlyNew": false,
  "requestGapSecs": 1.5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SG"
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "searchKeywords": [
        "露营装备"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "SG"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("reportable_broth/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 = {
    "searchKeywords": ["露营装备"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "SG",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("reportable_broth/rednote-xiaohongshu-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 '{
  "searchKeywords": [
    "露营装备"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SG"
  }
}' |
apify call reportable_broth/rednote-xiaohongshu-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,reportable_broth/rednote-xiaohongshu-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/PzLstndHDKMrOp8L6/builds/cIpnNQM0jGtaMHFGd/openapi.json
