# Xiaohongshu Scraper — RedNote Scraper for Trending & Notes (`nexgendata/rednote-scraper`) Actor

Search Xiaohongshu (RedNote, 小红书) posts by keyword or hashtag — no cookie or login needed. Also trending feeds, category channels and full note detail with likes, comments, shares and saves. Clean JSON, pay per post. A cookie is optional and adds logged-in extras. By NexGenData.

- **URL**: https://apify.com/nexgendata/rednote-scraper.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** Social media, Marketing, News
- **Features:** Limited permissions
- **Stats:** 78 total users, 5 monthly users, 65.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 rednote posts

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

## Xiaohongshu Scraper — RedNote Scraper for Trending & Notes

Search Xiaohongshu (RedNote, 小红书) posts by keyword or hashtag — no cookie needed — and get trending feeds and full note details with likes, comments, shares and saves as clean JSON. Built by NexGenData.

A **Xiaohongshu scraper** (also searched as a **RedNote scraper**) for keyword search, hashtags, trending feeds, category channels and note detail — no login or cookie needed.

> **Pricing:** $0.02 per post returned plus a $0.05 Actor Start fee per run. The default `limit` of 25 posts costs $0.50 + $0.05 = **$0.55 per run**; $1.00 buys one run of ~47 posts ($0.05 start + 47 × $0.02). Runs that return 0 posts pay only the start fee.

Pull RedNote (Xiaohongshu, 小红书) trending notes, category discovery feeds, keyword / hashtag / user search results and full note detail as clean JSON. Western brand and sourcing teams use it to read China's earliest publicly observable consumer-demand signal: on RedNote, nearly every viral note is a product review or buying guide, surfacing weeks before Tmall or JD sales rankings. Every mode runs without a login. Keyword search and hashtags work with no cookie (see *No cookie needed* below); a logged-in cookie is optional and only adds logged-in results. No Mandarin-speaking analyst in Shanghai required.

### 📊 Sample Output

![1 real rows delivered by RedNote (小红书) Scraper — Trending, Feeds, Notes · No API Key — run ANLjvC2DwnYL44lJx on build 0.0.40](https://api.apify.com/v2/key-value-stores/8gLgXMBveEI1tTz1z/records/rednote-scraper-sample)

| `post_id` | `author_id` | `title` | `hashtags` | `posted_at` | `category` |
|---|---|---|---|---|---|
| 6a7005110000000008010ab1 | 66e567b9000000000b031bd3 | 这就是早期A萍吗 | \['瑶一瑶小肉包', '早期A萍', '女宝', '瑶总'] | 2026-08-03T03:50:06Z | lifestyle |

Real rows from run `ANLjvC2DwnYL44lJx` on build 0.0.40 (2026-09-24), unedited apart from masked emails/phones and shortened long text; fields the source does not publish are empty.

### 🔧 Input reference

| Field | Type | Default | What it does |
|---|---|---|---|
| `mode` | string (trending, keyword_search, hashtag, user_posts, note_detail, topic_probe) | `"trending"` | What to scrape. 'trending' pulls the homepage discovery feed or a category channel (no cookie needed). 'keyword_search' searches RedNote for the terms in 'keywords' (Chinese or En… |
| `category` | string (recommend, fashion, food, cosmetics, movie, career, love, home, …) | `"recommend"` | For 'trending' mode: which explore feed to pull. 'recommend' = the default mixed feed; or pick a category channel tab. Works without a cookie. If the requested category tab cannot… |
| `cookie` | string |  | Optional. Not needed for any mode: keyword_search and hashtag work without it through the public search path. A logged-in cookie adds RedNote's own logged-in search and is recommended for user_posts. If RedNote does not accept it, the run continues without it (never fails). Treated as a secret. |
| `keywords` | array | `["护肤", "口红", "穿搭"]` | Search terms for 'keyword_search' mode (max 10 per run). Chinese terms find the most notes (e.g. \['口红', '护肤', '穿搭']); English terms work too. No cookie needed. Ignored in other modes. |
| `hashtags` | array | `["秋冬穿搭"]` | List of RedNote hashtags/topics to pull posts for in 'hashtag' mode (max 10 per run). Provide the tag text without the leading '#' (e.g. \['秋冬穿搭', '咖啡探店']). Each tag is resolved th… |
| `users` | array | `[]` | List of RedNote user references for 'user_posts' mode (max 10 per run). Accepts a full profile URL (https://www.xiaohongshu.com/user/profile/{id}), a path (/user/profile/{id}), or… |
| `note_urls` | array | `["https://www.xiaohongshu.com/explore/68ec515c0000000005010…` | For 'note_detail' mode: RedNote note URLs (best with xsec_token, e.g. https://www.xiaohongshu.com/explore/?xsec_token=...) or bare note IDs. Returns the full body text plus likes… |
| `limit` | integer | `25` | Maximum number of RedNote posts to return per run (across all keywords / hashtags / users). Default 25 (billed: 25 × $0.02 = $0.50 + the $0.05 Actor Start fee). Maximum 200 — the… |
| `proxyConfiguration` | object | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]…` | Apify proxy configuration. RESIDENTIAL is required — RedNote is hosted in mainland China and blocks datacenter IPs (403/461 or empty feeds). The default exit is pinned to CN resid… |

### 🧾 JSON sample record

One real record from run `ANLjvC2DwnYL44lJx` (emails/phones masked, long text shortened):

```json
{
  "post_id": "6a7005110000000008010ab1",
  "author": "安念",
  "author_id": "66e567b9000000000b031bd3",
  "title": "这就是早期A萍吗",
  "body": "第一张都可以当氛围感头像了，太好看了吧。不知道瑶总长大是什么样子[害羞R]#瑶一瑶小肉包[话题]# #早期A萍[话题]# #女宝[话题]# #瑶总[话题]#",
  "image_urls": [
    "http://sns-webpic-qc.xhscdn.com/202609250756/9f818c5e7c3bd3df5ace9db71e92bdcf/1040g008323d2nup6nu6g5pn5cusiu6ujpa52j8o!nd_dft_wlteh_webp_3",
    "http://sns-webpic-qc.xhscdn.com/202609250756/bcbffbfafd392c9a60ba914ade67caad/1040g008323d2nup6nu605pn5cusiu6ujlts7bvg!nd_dft_wlteh_webp_3",
    "http://sns-webpic-qc.xhscdn.com/202609250756/f14acfcfb0b18f6cf4e031e35a5346a8/1040g008323d2nup6nu5g5pn5cusiu6uje85thp8!nd_dft_wlteh_webp_3",
    "http://sns-webpic-qc.xhscdn.com/202609250756/426740fbfb7c752f36bb1e044bd25a96/1040g008323d2nup6nu505pn5cusiu6ujmguh5cg!nd_dft_wlteh_webp_3",
    "http://sns-webpic-qc.xhscdn.com/202609250756/924b6980ced9a8a82403c0fe9da48103/1040g008323d2nup6nu005pn5cusiu6uj12h3puo!nd_dft_wlteh_webp_3"
  ],
  "hashtags": [
    "瑶一瑶小肉包",
    "早期A萍",
    "女宝",
    "瑶总"
  ],
  "likes_count": 72,
  "comments_count": 218,
  "shares_count": 14,
  "collected_count": 8,
  "engagement_total": 312,
  "posted_at": "2026-08-03T03:50:06Z",
  "url": "https://www.xiaohongshu.com/explore/6a7005110000000008010ab1?xsec_token=ABurwOqJq_s4gjlW8rY2CXHDbBbo2fLHfKs8qFwpVaby4=&xsec_source=pc_search",
  "category": "lifestyle",
  "mode": "note_detail",
  "query": "https://www.xiaohongshu.com/explore/6a7005110000000008010ab1?xsec_token=ABurwOqJq_s4gjlW8rY2CXHDbBbo2fLHfKs8qFwpVaby4=&xsec_source=pc_search",
  "data_source": "xiaohongshu.com (SSR, cookieless)",
  "as_of_timestamp": "2026-09-24T23:56:12Z",
  "source_url": "https://www.xiaohongshu.com/explore/6a7005110000000008010ab1?xsec_token=ABurwOqJq_s4gjlW8rY2CXHDbBbo2fLHfKs8qFwpVaby4=&xsec_source=pc_search"
}
```

### 💰 Pricing

| Event | Price (USD) | When it is charged |
|---|---|---|
| Actor Start (`apify-actor-start`) | $0.05 | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). |
| RedNote post (`apify-default-dataset-item`) | $0.02 | Charged per RedNote post returned. |

Pay-per-event: you pay only for what the run delivers. A run that delivers nothing bills no result events (only the actor-start event, when the actor defines one). Example: a run that delivers 100 results costs 100 × $0.02 = $2.00 plus the start fee.

### 中文说明

小红书(RedNote)采集器让你获取小红书的热门内容、分类信息流与笔记数据。每条结果为一篇笔记,可导出为 JSON、CSV 或 Excel,适合品牌、内容营销与消费者研究。

**定价**:按笔记计费,每条 $0.02,另加每次运行 $0.05 启动费(默认 25 条约 $0.55 一次)。

**定时运行**:在 Apify 的「Schedules」中新建计划任务,设定关键词或分类,即可定期追踪话题与品类的变化。

**AI 智能体**:采用按事件计费(PPE),可通过 Apify 的 [x402](https://docs.apify.com/platform/integrations/x402) 让智能体用 USDC 直接调用,无需账号。

说明:关键词搜索与话题搜索**无需登录 Cookie**(通过公开搜索索引找到笔记,再抓取笔记详情);Cookie 为可选项。没有结果时运行同样以成功结束,0 条结果,只收启动费。所有字段均来自公开数据。

### Modes

| Mode | What it does | Cookie? |
|---|---|---|
| `trending` | Homepage discovery feed (`category: recommend`) or a category channel tab (fashion / food / cosmetics / travel / gaming / fitness / movie / home / love / career / video) | Not needed |
| `note_detail` | Full body text + engagement counts (likes / comments / shares / collected) for a note URL or ID. Comment **text** is not returned — only `comments_count`. | Not needed |
| `keyword_search` | Search by keyword (Chinese or English terms), up to 10 keywords per run | Not needed (optional) |
| `hashtag` | Posts for a hashtag / topic, up to 10 tags per run | Not needed (optional) |
| `user_posts` | Recent posts by a specific user, up to 10 users per run | Recommended — without one only the user's notes found in the public search index are returned, often none |

`topic_probe` also exists in the mode list for compatibility. It is a diagnostic mode: it writes to the key-value store only, pushes 0 dataset rows and incurs 0 result charges. It is not a buyer feature.

**No cookie needed, plainly:** RedNote shows its own search page only to logged-in visitors, so without a cookie this actor finds the notes for your keyword or hashtag through the public search index (360 Search and Bing — plain public result pages, no paid API), then opens each note and returns its full detail: title, body, author, hashtags, likes, comments, shares, saves, date and link. Each row says where it was found in `source` (`so360`, `bing`, or `xiaohongshu_search`). Expect up to about 25–30 notes per Chinese keyword per run (fewer for English terms); results lean to notes that are already popular and indexed, not the newest minutes-old posts. A logged-in `cookie` is optional: with a working one, keyword / hashtag / user runs use RedNote's own logged-in search first. If RedNote does not accept your cookie, the run says so in its status and continues with the no-cookie search — it never fails because of a cookie. `user_posts` without a cookie can only return the user's notes that appear in the public index, often none. When nothing is found, the run ends SUCCEEDED with 0 rows, a plain status message, and only the start fee. `trending` (all categories) and `note_detail` work without a cookie: the trending feed is read from RedNote's server-rendered explore page through a China residential proxy session (about 30 notes per session, sessions rotated until `limit`).

**Category feeds, plainly:** if the requested category tab cannot be activated on the page, the run ends with 0 rows and the status message `category tab unavailable` (0 result charges). It never delivers the mixed `recommend` feed labelled as your category. The `category` field on each record is the note's own text-classified category (beauty / fashion / food / travel / wellness / tech / finance / lifestyle); the channel you asked for is recorded in `query`.

**Time budget:** without a cookie a keyword takes about 30–70 s (search index + note pages); with a cookie each keyword / hashtag / user is a separate 60–115 s browser session. The run stops starting new queries 45 s before its timeout and delivers whatever the completed queries produced in one push; the run status message then says `delivered X records from Q of N queries; N-Q not processed (time budget)`. Raise the run timeout or split queries across runs for large lists.

### Use cases

1. Track emerging Chinese consumer-product trends before they reach Western markets.
2. Brand monitoring via trending and category feeds.
3. Cross-border e-commerce / DTC product research — spot rising categories early.
4. Build a Chinese-language lifestyle-content corpus for NLP / AI.
5. Brand and competitor monitoring by keyword or hashtag (no cookie), and KOL discovery via `user_posts` (with a cookie) and `note_detail`.

### Sample input

```json
{
  "mode": "trending",
  "category": "cosmetics",
  "limit": 50,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "CN" }
}
```

### Output fields

Every mode emits the same field set per note:

`post_id`, `author`, `author_id`, `title`, `body`, `image_urls`, `hashtags`, `likes_count`, `comments_count`, `shares_count`, `collected_count`, `engagement_total` (sum of the four counts), `posted_at`, `url`, `category`, `mode`, `query`, `data_source`, `as_of_timestamp`. `note_detail` records additionally carry `source_url` (the URL actually fetched).

Note: the trending / category feed API returns card summaries, so in `trending` mode `body` and `posted_at` can be `null`. Use `note_detail` on a record's `url` to get the full body and timestamp.

```json
{ "post_id": "65a1f...e3", "author": "美妆日记Amy", "title": "早C晚A空瓶记录", "body": null, "likes_count": 12840, "comments_count": 612, "shares_count": 88, "collected_count": 2310, "engagement_total": 15850, "hashtags": ["护肤","空瓶"], "posted_at": null, "url": "https://www.xiaohongshu.com/explore/65a1f...e3?xsec_token=...", "category": "beauty", "mode": "trending", "query": "cosmetics" }
```

### Run it on a schedule

A daily run suits trending and category feeds, because what RedNote surfaces on those feeds turns over quickly. Between runs you get new notes on the feed, and notes you have seen before can come back with higher likes, comments, shares and saves. Keyword and hashtag runs can be scheduled too and need no cookie; each run returns what the public search index shows for your terms that day. The actor has no new-only mode, so use `post_id` to match notes across runs. Send each run's results onward with a webhook, Google Sheets, Zapier, Make or the Apify API.

Video guides from Apify: [Schedule your Actor](https://www.youtube.com/watch?v=1jI7WcVQmwM) · [Integrations](https://www.youtube.com/watch?v=bNACk1_S_6w)

### FAQ

#### Why use this instead of the official RedNote app or website?

RedNote is built for browsing, not for exporting data. This actor turns keyword and hashtag search, trending feeds, category channels and note detail (and, with your cookie, user posts) into clean JSON with English field names and engagement counts. It needs no API key, comes set up to use the China residential proxy that RedNote requires, and can run on a schedule. You do not need to read Chinese to use the output.

#### What does a typical run cost?

You pay per result, not for run time: $0.02 for each row in the results, plus $0.05 per run start (charged per GB of run memory, minimum one). A run that returns 5 RedNote posts costs about $0.15. Live prices are always shown in the Pricing tab.

#### Can I scrape Xiaohongshu without logging in?

Yes. `keyword_search` and `hashtag` work with no cookie: the actor finds the notes through the public search index and returns each note's full detail (`source` says where it was found). `trending` (all category channels) and `note_detail` also work without one. `user_posts` works best with a logged-in `cookie`; without one it returns only that user's notes found in the public index, often none. A run that finds nothing ends SUCCEEDED with 0 rows, a message, and only the start fee.

#### Does it return the comments on a RedNote note?

No. `note_detail` returns `comments_count` only, not the comment text. In `trending` mode the feed gives card summaries, so `body` and `posted_at` can be empty. Run `note_detail` on a note's `url` to get the full text and timestamp.

#### How many RedNote posts can one run return?

Up to 200 per run, set with `limit`. Search modes take up to 10 keywords, hashtags or users per run, and each one is a separate browser session that shares the run's time budget. If time runs out, the run delivers what it finished and its status message says how many queries were not processed.

### Related actors

- [RedNote (Xiaohongshu) Note Detail Scraper · 小红书笔记详情采集](https://apify.com/nexgendata/rednote-note-detail) — a dedicated actor for full note detail.
- [Xiaohongshu Trends Tracker · 小红书趋势追踪](https://apify.com/nexgendata/xiaohongshu-trends-tracker) — follow trend topics on the same platform.
- [Weibo Hot Search Tracker · 微博热搜 API & Trend Monitor](https://apify.com/nexgendata/weibo-hot-search-tracker) — see what is trending on Weibo at the same time.
- [Douyin Trending Tracker - Chinese TikTok Hot List](https://apify.com/nexgendata/douyin-trending-tracker) — add the Douyin hot list to your China consumer watch.
- [China Trends Tracker · 中国趋势汇总(微博/百度/头条/抖音)](https://apify.com/nexgendata/china-trends-tracker) — one feed across several Chinese trend boards.

### Related actors from NexGenData

If this actor is useful, these related ones from the same publisher may cover your next step:

- **[RedNote (Xiaohongshu) Note Detail Scraper · 小红书笔记详情采集](https://apify.com/nexgendata/rednote-note-detail)** — Full RedNote (Xiaohongshu) note by URL: text, media, hashtags, author, engagement.
- **[Douyin Trending Tracker - Chinese TikTok Hot List](https://apify.com/nexgendata/douyin-trending-tracker)** — The live Douyin hot list with rank, category, views and English translation.
- **[Bilibili Comments Scraper · B站评论 API (WBI-signed)](https://apify.com/nexgendata/bilibili-video-comments)** — Comments on any Bilibili video: author, level, likes, replies and time.

# Actor input Schema

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

What to scrape. 'trending' pulls the homepage discovery feed or a category channel. 'keyword_search' finds RedNote notes for the terms in 'keywords' (Chinese or English). 'hashtag' finds notes for the tags in 'hashtags'. Neither needs a cookie: without one the actor finds the notes through the public search index (360 Search and Bing) and returns each note's full detail. 'user_posts' lists a user's recent notes (best with a cookie; without one only notes found in the public index, often none). 'note_detail' returns the full body and engagement COUNTS for the notes in 'note_urls' (comment text is not returned). 'topic_probe' is a diagnostic mode: key-value store only, 0 dataset rows, 0 result charges. A run that finds nothing ends SUCCEEDED with 0 rows, a status message and only the start fee.

## `category` (type: `string`):

For 'trending' mode: which explore feed to pull. 'recommend' = the default mixed feed; or pick a category channel tab. Works without a cookie. If the requested category tab cannot be activated on the page, the run FAILS with 'category tab unavailable' (0 rows, 0 result charges) — it never delivers the mixed 'recommend' feed labelled as your category. Each record's 'category' field is the note's own text-classified category; the requested channel is recorded in 'query'.

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

Optional for every mode. Keyword search and hashtags work without it through the public search path. With a working logged-in cookie, keyword_search / hashtag / user_posts use RedNote's own logged-in search first; it is recommended for user_posts. If RedNote does not accept your cookie (logged out or expired), the run says so in its status and continues with the no-cookie search — it never fails because of the cookie. To get it: log in at xiaohongshu.com, open DevTools → Application → Cookies (or run document.cookie), and paste the full cookie string (e.g. 'a1=...; web_session=...; webId=...'). Using your own account may violate XHS Terms — use at your own risk. Treated as a secret.

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

Search terms for 'keyword_search' mode (max 10 per run). Chinese characters find the most notes (e.g. \['口红', '护肤', '穿搭']); English terms work too. No cookie needed. Ignored in other modes.

## `hashtags` (type: `array`):

List of RedNote hashtags/topics to pull posts for in 'hashtag' mode (max 10 per run). Provide the tag text without the leading '#' (e.g. \['秋冬穿搭', '咖啡探店']). Each tag is resolved through RedNote's search API.  Ignored in other modes.

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

List of RedNote user references for 'user_posts' mode (max 10 per run). Accepts a full profile URL (https://www.xiaohongshu.com/user/profile/{id}), a path (/user/profile/{id}), or the bare 24-hex user id.  Ignored in other modes.

## `note_urls` (type: `array`):

For 'note_detail' mode: RedNote note URLs (best with xsec_token, e.g. https://www.xiaohongshu.com/explore/<id>?xsec_token=...) or bare note IDs. Returns the full body text plus likes / comments / shares / collected COUNTS (comment text is not returned). Works without a cookie. The prefilled example is a public share URL (with its xsec_token) used for the store's automated test run; replace it with your own note URLs.

## `limit` (type: `integer`):

Maximum number of RedNote posts to return per run (across all keywords / hashtags / users). Default 25 (billed: 25 × $0.02 = $0.50 + the $0.05 Actor Start fee). Maximum 200 — the trending/category feed can only be scrolled ~8 pages (~230 notes) in one run, and search modes share one time budget, so higher values are not reachable and are not accepted.

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

Apify proxy configuration. RESIDENTIAL is required — RedNote is hosted in mainland China and blocks datacenter IPs (403/461 or empty feeds). The default exit is pinned to CN residential (apifyProxyCountry=CN) for reliable inside-China egress.

## Actor input object example

```json
{
  "mode": "trending",
  "category": "recommend",
  "keywords": [
    "护肤",
    "口红",
    "穿搭"
  ],
  "hashtags": [
    "秋冬穿搭"
  ],
  "users": [],
  "note_urls": [
    "https://www.xiaohongshu.com/explore/68ec515c0000000005010c0a"
  ],
  "limit": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CN"
  }
}
```

# Actor output Schema

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

Default dataset of RedNote (小红书) Scraper records (20 fields per row: post_id, author, author_id, title, body, image_urls, hashtags, likes_count, comments_count, shares_count, collected_count, engagement_total…).

# 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": "trending",
    "category": "recommend",
    "keywords": [
        "护肤",
        "口红",
        "穿搭"
    ],
    "hashtags": [
        "秋冬穿搭"
    ],
    "users": [],
    "note_urls": [
        "https://www.xiaohongshu.com/explore/68ec515c0000000005010c0a"
    ],
    "limit": 25,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "CN"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/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 = {
    "mode": "trending",
    "category": "recommend",
    "keywords": [
        "护肤",
        "口红",
        "穿搭",
    ],
    "hashtags": ["秋冬穿搭"],
    "users": [],
    "note_urls": ["https://www.xiaohongshu.com/explore/68ec515c0000000005010c0a"],
    "limit": 25,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "CN",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/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 '{
  "mode": "trending",
  "category": "recommend",
  "keywords": [
    "护肤",
    "口红",
    "穿搭"
  ],
  "hashtags": [
    "秋冬穿搭"
  ],
  "users": [],
  "note_urls": [
    "https://www.xiaohongshu.com/explore/68ec515c0000000005010c0a"
  ],
  "limit": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CN"
  }
}' |
apify call nexgendata/rednote-scraper --silent --output-dataset

```

## MCP server setup

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