# Xiaohongshu (RedNote) Scraper — Notes, Users, Products & Search (`memo23/xiaohongshu-rednote-scraper`) Actor

Scrape Xiaohongshu / RedNote (小红书, XHS, Little Red Book): note details, user profiles, category discovery, mall products & prices, comments, and keyword search. Eight operations, one flat dataset. Note detail, profiles, discovery & products need NO login. Chinese counts parsed to numbers.

- **URL**: https://apify.com/memo23/xiaohongshu-rednote-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Social media, E-commerce, AI
- **Stats:** 15 total users, 15 monthly users, 89.1% runs succeeded, 0 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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Xiaohongshu (RedNote) Scraper — Notes, Users, Products, Comments & Search 📕

Extract structured data from **Xiaohongshu / RedNote (小红书 / XHS / Little Red Book)** — China's #1 lifestyle-discovery platform (300M+ MAU). Eight operations in one actor: note details, user profiles, note catalogs, **category discovery**, **mall products & pricing**, comments, and keyword search across notes and users. One clean, flat dataset per run.

![How it works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-xiaohongshu.png)

---

### 💡 Why use this scraper

- **🔓 Four operations run with *no login at all*** — Note Detail, User Profile, **Channel Feed** (topical discovery), and **Mall Products** (prices, sales, sellers) all work as a plain guest. No cookie, no account.
- **🧭 Discover notes without keyword search** — browse 12 Xiaohongshu categories (fashion, food, beauty, travel, gaming…) and pull fresh notes with engagement metrics, entirely login-free.
- **🛍️ Real e-commerce data** — scrape XHS mall products with current price, discount, units sold, seller, and stock — the pricing/competitor data behind China's biggest lifestyle-commerce platform.
- **🔏 Real request signing, not a fragile reimplementation** — the signed operations run Xiaohongshu's *own* in-page signing, so they survive XHS's signature rotations instead of breaking on them.
- **🎯 Production-ready shape** — curated camelCase fields with numeric twins for the Chinese human counts (`"1.8万"` → `18000`).
- **💰 Pay per result** — charged only for rows actually returned.

---

### 📋 Overview

Whether you call it **Xiaohongshu**, **RedNote**, **Little Red Book**, **小红书**, or **XHS**, this actor pulls clean structured data across eight operations:

| Operation | What you get | Login needed? |
|---|---|---|
| 📕 **Note Detail** | title, description, images, video URL, like/save/comment/share counts, creator, timestamps, tags | **No** |
| 👤 **User Profile** | nickname, redId, gender, bio, fans/follows/interaction counts, location | **No** |
| 🧭 **Channel Feed** | discover notes across 12 categories (fashion, food, beauty, travel…) with engagement + tokens | **No** |
| 🛍️ **Mall Products** | a shop's + related products: price, discount, units sold, seller, stock, brand, image | **No** |
| 📰 **User Notes** | a creator's note catalog with engagement metrics | Page 1 free; more needs cookie* |
| 💬 **Note Comments** | top comments with author, IP location, likes + a reply sample | Cookie* |
| 🔍 **Search Notes** | keyword → notes (comprehensive / most-popular / newest) | **Yes** |
| 🧑‍🤝‍🧑 **Search Users** | keyword → user/KOL results | **Yes** |

> \* **About the `web_session` cookie.** Xiaohongshu gates its *signed* APIs behind a logged-in session. **Note Detail, User Profile, Channel Feed, and Mall Products need no login whatsoever.** **Search is login-walled** and requires a `web_session` cookie from an XHS account you control; **Note Comments** (and User Notes beyond page 1) also rely on the signed API and are reliable only with the same `web_session` — guest access to those is now heavily throttled by XHS. See the FAQ for how to grab the cookie (30 seconds in your browser).

---

### ✨ Features

- 📕 **Note Detail** — title, desc, image list, video master URL + duration, like/save/comment/share counts (raw + numeric), creator, post & update timestamps, topic tags.
- 👤 **User Profile** — nickname, redId, gender, bio, IP location, fans / follows / interaction counts (raw + numeric), profession/college/location tags.
- 🧭 **Channel Feed** — cookieless topical discovery across 12 homefeed channels; returns note cards with title, likes, author, cover, and a ready-to-scrape URL + `xsec_token`. Paginate with `maxPages` (the feed rotates each load, so more pages = more unique notes); flip `fullDetail` on to hydrate every note to its full record.
- 🛍️ **Mall Products** — give a product URL or goods ID and get that shop's + related products, each with `price`, `salePrice`, `officialPrice`, `couponPrice`, `soldCount`, `stockStatus`, `sellerId`, `vendorName`, `brand`, `imageUrl`, and `productUrl`. Pure HTTP, no login.
- 📰 **User Notes** — a creator's published notes with per-note engagement and cover images; paginate with `maxPages`.
- 💬 **Note Comments** — top comments with content, author, IP location, like count, and a top-5 reply sample per thread.
- 🔍 **Search Notes** — keyword search with sort by comprehensive (综合), most popular (最热), or newest (最新).
- 🧑‍🤝‍🧑 **Search Users** — keyword search returning users/KOLs with fan counts.

---

### 🎯 Use cases

- **Trend & content discovery (no login)** — browse category feeds to see what's rising in beauty, fashion, food, travel, and more — without needing a keyword or an account.
- **E-commerce & pricing research (no login)** — track XHS mall product prices, discounts, units sold, and sellers for competitor and market analysis.
- **KOL / influencer discovery** — find creators by keyword, size them by fans and engagement.
- **Brand & competitor monitoring** — track a creator's catalog, a note's engagement, and comment sentiment.
- **Content & campaign analytics** — pull structured metrics for reporting instead of screenshotting the app.

---

### ⚙️ How it works

1. Pick an **operation** and paste the matching input — a note URL/ID, a user ID/URL, a channel, a product URL/goods ID, or a keyword.
2. The no-login operations read Xiaohongshu's server-rendered data (or the guest mall API) directly; the signed operations (comments, search) drive a real in-page signing step so requests are accepted.
3. Every result is normalized into one flat row per item and pushed to the dataset — filter by `_operation` to split modes.

---

### 📥 Input configuration

| Field | Type | Notes |
|---|---|---|
| `operation` | select | One of the eight operations. **Required.** |
| `noteId` | string | Note ID or full note URL (Note Detail / Note Comments). Pasting the full URL also captures the `xsec_token`. |
| `xsecToken` | string | The note's `xsec_token`. Skip if you pasted the full note URL. |
| `userId` | string | User ID or full profile URL (User Profile / User Notes). |
| `channel` | select | Channel Feed category (Recommended, Fashion, Food, Beauty, Travel, Gaming…). |
| `goodsId` | string | Product URL (`…/goods-detail/<id>`) or 24-hex goods ID (Mall Products). |
| `fullDetail` | boolean | Channel Feed: hydrate each discovered note to full detail. Default off. |
| `keyword` | string | Search keyword, Chinese or English (Search Notes / Search Users). |
| `searchSort` | select | Search Notes ranking: comprehensive / most popular / newest. |
| `maxPages` | integer | Pages to fetch on paginated operations (~15–20 items/page). Default 1. |
| `maxItems` | integer | Hard cap on total rows. Optional. |
| `webSession` | string (secret) | Logged-in `web_session` cookie. **Required for Search**, needed for reliable Note Comments / User Notes pagination. |
| `proxy` | proxy | Defaults to built-in residential routing; override if needed. |

#### Example input

```json
{
  "operation": "mall-products",
  "goodsId": "https://www.xiaohongshu.com/goods-detail/6449fb26db9efc0001b1c665"
}
````

***

### 📤 Output

One flat row per item; filter on `_operation` to split modes.

**Mall Products** row (abridged):

```json
{
  "_operation": "mall-products",
  "goodsId": "6449fb26db9efc0001b1c665",
  "title": "专利款：紫光檀无漆无蜡六齿头部经络按摩梳",
  "price": 89.9,
  "salePrice": 69.9,
  "currency": "CNY",
  "soldText": "已售3717",
  "soldCount": 3717,
  "stockStatus": 1,
  "sellerId": "63760151f3e1aa0001e68de9",
  "vendorName": "君匠的店",
  "imageUrl": "https://qimg.xiaohongshu.com/arkgoods/...",
  "productUrl": "https://www.xiaohongshu.com/goods-detail/6449fb26db9efc0001b1c665"
}
```

**Note Detail** row (abridged):

```json
{
  "_operation": "note-detail",
  "noteId": "64ba392e000000000b0283ce",
  "noteType": "video",
  "noteTitle": "备婚系列🍒被问疯了的/敬酒妆容一比一复刻",
  "likedCount": "3.8万",
  "likedCountNum": 38000,
  "collectedCountNum": 9235,
  "commentCountNum": 212,
  "userName": "大魔王喵",
  "postedAt": "2023-07-21T07:52:14.000Z",
  "isVideo": true,
  "videoUrl": "https://sns-video-...xhscdn.com/stream/....mp4",
  "notePageUrl": "https://www.xiaohongshu.com/explore/64ba392e000000000b0283ce?xsec_token=..."
}
```

#### Key output fields

| Field | Description |
|---|---|
| `_operation` | Which mode produced the row — filter on this to split modes. |
| `noteId` / `userId` / `goodsId` | Xiaohongshu 24-hex identifiers. |
| `likedCount` … `shareCount` | Human strings as shown on XHS (`"1.8万"`), each with a numeric `…Num` twin. |
| `price` / `salePrice` / `soldCount` | Mall product price, discounted price, and units sold (parsed from `已售…`). |
| `vendorName` / `sellerId` | Mall seller/shop identity. |
| `noteCoverUrl` / `imageUrls` / `videoUrl` / `imageUrl` | Media URLs. |
| `redId` | The public Xiaohongshu ID on a profile. |
| `notePageUrl` / `productUrl` | Shareable note / product URLs. |

***

### ❓ FAQ

**Which operations need no login at all?**
Note Detail, User Profile, **Channel Feed** (category discovery), and **Mall Products** all run as a plain guest — no cookie, no account.

**Why does Search need a `web_session` cookie?**
Xiaohongshu hard-blocks its search API for logged-out visitors (`code -104`, "no permission"). There is no guest path — providing a `web_session` from an account you control is the only way, the same requirement every XHS data source faces.

**How do I get my `web_session` cookie? (~30 seconds)**

1. Log in at `xiaohongshu.com` in your browser.
2. Open DevTools → **Application** (Chrome) / **Storage** (Firefox) → **Cookies** → `https://www.xiaohongshu.com`.
3. Copy the **value** of the `web_session` cookie and paste it into the `webSession` input.

Use an account you're comfortable running automation on. The cookie is stored as a secret input.

**Do Note Comments and User Notes need the cookie too?**
Xiaohongshu now throttles guest access to its signed comment API aggressively, so Note Comments (and User Notes beyond page 1) are reliable only with a `web_session`. User Notes page 1 still renders login-free.

**How does Channel Feed discovery differ from Search?**
Channel Feed browses Xiaohongshu's own category feeds (a topical stream), which works with no login. Search filters by an exact keyword, which XHS gates behind login. If you just need topical volume without an account, use Channel Feed.

**Where do I find a note's `xsec_token` or a product's goods ID?**
The `xsec_token` is in the note URL you copy (`…/explore/<id>?xsec_token=…`) — paste the whole URL into `noteId`. The goods ID is the string in a product URL (`…/goods-detail/<id>`) — paste the whole URL into `goodsId`.

**What proxy should I use?**
The actor ships with residential routing that works out of the box. You can override it with Apify Proxy or your own proxy URLs.

***

### 🛠️ Support

Found a bug or need a field added? Open an issue on the actor's Issues tab and we'll take a look.

***

### 🤖 For AI agents & LLM apps

This actor returns clean, flat JSON — one row per item, stable camelCase keys, and an `_operation` discriminator — so it drops straight into RAG pipelines, agent tools, and MCP servers. The no-login operations (Note Detail, User Profile, Channel Feed, Mall Products) need no credentials, making them ideal for autonomous agents that shouldn't manage cookies. Call it programmatically via the Apify API or as an MCP tool: pick an `operation`, pass the matching input, and consume the dataset.

***

### ⚠️ Disclaimer

This actor collects only publicly available information from Xiaohongshu and does not bypass authentication for content you couldn't otherwise view. You are responsible for how you use the scraped data, including compliance with Xiaohongshu's Terms of Service, applicable data-protection laws (e.g. GDPR/PIPL), and any rights in the underlying content. Do not use it to collect personal data unlawfully or to infringe intellectual-property rights. This actor is not affiliated with, endorsed by, or sponsored by Xiaohongshu / Xingin.

### SEO Keywords

Xiaohongshu scraper, RedNote scraper, 小红书 scraper, XHS scraper, Little Red Book scraper, Xiaohongshu API, RedNote API, Xiaohongshu note scraper, Xiaohongshu user scraper, Xiaohongshu comments scraper, Xiaohongshu search scraper, Xiaohongshu product scraper, Xiaohongshu mall scraper, RedNote product scraper, Xiaohongshu price scraper, Xiaohongshu category feed, Xiaohongshu trend discovery, Xiaohongshu KOL discovery, RedNote influencer scraper, China social media scraper, China e-commerce scraper, Xiaohongshu data export, xhs note detail, xiaohongshu user profile, redbook scraper.

# Actor input Schema

## `operation` (type: `string`):

What to scrape. note-detail / user-profile / channel-feed / mall-products work with NO login. note-comments / search-notes / search-users require the web\_session cookie below — Xiaohongshu gates guest access to its comment and search APIs. (User Notes returns page 1 login-free; more pages need the cookie.)

## `noteId` (type: `string`):

For Note Detail / Note Comments. A 24-hex note ID, or a full note URL (…/explore/<id>?xsec\_token=…). Pasting the full URL also captures the xsec\_token automatically.

## `xsecToken` (type: `string`):

The xsec\_token that pairs with the note. Required for Note Detail / Note Comments. Skip this if you pasted the full note URL above (the token is taken from it).

## `userId` (type: `string`):

For User Profile / User Notes. A 24-hex user ID, or a full profile URL (…/user/profile/<id>).

## `keyword` (type: `string`):

For Search Notes / Search Users. Chinese or English keyword, e.g. 美食 or 'skincare'.

## `channel` (type: `string`):

For Channel Feed. Which homefeed category to discover notes from. 'Recommended' is the main mixed feed. Increase Max pages to pull more (the feed rotates each load, so more pages = more unique notes).

## `goodsId` (type: `string`):

For Mall Products. A product URL (…/goods-detail/<id>) or a 24-hex goods ID. Returns that shop's + related products with full pricing, sales counts, and seller info — no login needed.

## `fullDetail` (type: `boolean`):

For Channel Feed: hydrate each discovered note to its full detail (description, full image gallery, video URL, all counts). Costs one extra request per note. Off by default — the feed row already includes note ID, title, likes, author, cover, and a ready-to-scrape URL + token.

## `searchSort` (type: `string`):

Ranking for Search Notes.

## `maxPages` (type: `integer`):

Pages to fetch on paginated operations (User Notes, Channel Feed, Note Comments, Search Notes/Users). ~15–20 items per page. Default 1.

## `maxItems` (type: `integer`):

Hard cap on total dataset rows. Leave empty for no cap.

## `webSession` (type: `string`):

A logged-in Xiaohongshu `web_session` cookie value from an account you control. REQUIRED for Note Comments, Search Notes, and Search Users (Xiaohongshu gates guest access to comments and search). Not needed for Note Detail, User Profile, Channel Feed, or Mall Products. You can paste either the bare value or your whole cookie string.

## `proxy` (type: `object`):

Proxy egress. Leave default to use built-in residential routing. Override with Apify Proxy or custom proxy URLs if needed.

## Actor input object example

```json
{
  "operation": "channel-feed",
  "noteId": "https://www.xiaohongshu.com/explore/644a3e3c00000000130085a0?xsec_token=ABw5H7OmT061JPr1RF2mmIQQ4v5auTThBae2wAf3wo17k=&xsec_source=pc_feed",
  "channel": "homefeed_recommend",
  "goodsId": "https://www.xiaohongshu.com/goods-detail/6449fb26db9efc0001b1c665",
  "fullDetail": false,
  "searchSort": "general",
  "maxPages": 1,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "noteId": "https://www.xiaohongshu.com/explore/644a3e3c00000000130085a0?xsec_token=ABw5H7OmT061JPr1RF2mmIQQ4v5auTThBae2wAf3wo17k=&xsec_source=pc_feed",
    "goodsId": "https://www.xiaohongshu.com/goods-detail/6449fb26db9efc0001b1c665"
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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 = {
    "noteId": "https://www.xiaohongshu.com/explore/644a3e3c00000000130085a0?xsec_token=ABw5H7OmT061JPr1RF2mmIQQ4v5auTThBae2wAf3wo17k=&xsec_source=pc_feed",
    "goodsId": "https://www.xiaohongshu.com/goods-detail/6449fb26db9efc0001b1c665",
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/xiaohongshu-rednote-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 '{
  "noteId": "https://www.xiaohongshu.com/explore/644a3e3c00000000130085a0?xsec_token=ABw5H7OmT061JPr1RF2mmIQQ4v5auTThBae2wAf3wo17k=&xsec_source=pc_feed",
  "goodsId": "https://www.xiaohongshu.com/goods-detail/6449fb26db9efc0001b1c665"
}' |
apify call memo23/xiaohongshu-rednote-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Xiaohongshu (RedNote) Scraper — Notes, Users, Products & Search",
        "description": "Scrape Xiaohongshu / RedNote (小红书, XHS, Little Red Book): note details, user profiles, category discovery, mall products & prices, comments, and keyword search. Eight operations, one flat dataset. Note detail, profiles, discovery & products need NO login. Chinese counts parsed to numbers.",
        "version": "0.0",
        "x-build-id": "fNVEoZKB2JVNiex3R"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/memo23~xiaohongshu-rednote-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-memo23-xiaohongshu-rednote-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/memo23~xiaohongshu-rednote-scraper/runs": {
            "post": {
                "operationId": "runs-sync-memo23-xiaohongshu-rednote-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/memo23~xiaohongshu-rednote-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-memo23-xiaohongshu-rednote-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": [
                    "operation"
                ],
                "properties": {
                    "operation": {
                        "title": "🎯 Operation",
                        "enum": [
                            "note-detail",
                            "user-profile",
                            "user-notes",
                            "channel-feed",
                            "mall-products",
                            "note-comments",
                            "search-notes",
                            "search-users"
                        ],
                        "type": "string",
                        "description": "What to scrape. note-detail / user-profile / channel-feed / mall-products work with NO login. note-comments / search-notes / search-users require the web_session cookie below — Xiaohongshu gates guest access to its comment and search APIs. (User Notes returns page 1 login-free; more pages need the cookie.)",
                        "default": "channel-feed"
                    },
                    "noteId": {
                        "title": "📕 Note ID or URL",
                        "type": "string",
                        "description": "For Note Detail / Note Comments. A 24-hex note ID, or a full note URL (…/explore/<id>?xsec_token=…). Pasting the full URL also captures the xsec_token automatically."
                    },
                    "xsecToken": {
                        "title": "🔐 xsec_token",
                        "type": "string",
                        "description": "The xsec_token that pairs with the note. Required for Note Detail / Note Comments. Skip this if you pasted the full note URL above (the token is taken from it)."
                    },
                    "userId": {
                        "title": "👤 User ID or URL",
                        "type": "string",
                        "description": "For User Profile / User Notes. A 24-hex user ID, or a full profile URL (…/user/profile/<id>)."
                    },
                    "keyword": {
                        "title": "🔍 Search Keyword",
                        "type": "string",
                        "description": "For Search Notes / Search Users. Chinese or English keyword, e.g. 美食 or 'skincare'."
                    },
                    "channel": {
                        "title": "🧭 Channel (Channel Feed)",
                        "enum": [
                            "homefeed_recommend",
                            "homefeed.fashion_v3",
                            "homefeed.food_v3",
                            "homefeed.cosmetics_v3",
                            "homefeed.movie_and_tv_v3",
                            "homefeed.career_v3",
                            "homefeed.love_v3",
                            "homefeed.household_product_v3",
                            "homefeed.gaming_v3",
                            "homefeed.travel_v3",
                            "homefeed.fitness_v3",
                            "homefeed.video_v3"
                        ],
                        "type": "string",
                        "description": "For Channel Feed. Which homefeed category to discover notes from. 'Recommended' is the main mixed feed. Increase Max pages to pull more (the feed rotates each load, so more pages = more unique notes).",
                        "default": "homefeed_recommend"
                    },
                    "goodsId": {
                        "title": "🛍️ Product URL or Goods ID (Mall Products)",
                        "type": "string",
                        "description": "For Mall Products. A product URL (…/goods-detail/<id>) or a 24-hex goods ID. Returns that shop's + related products with full pricing, sales counts, and seller info — no login needed."
                    },
                    "fullDetail": {
                        "title": "🔎 Full detail (Channel Feed)",
                        "type": "boolean",
                        "description": "For Channel Feed: hydrate each discovered note to its full detail (description, full image gallery, video URL, all counts). Costs one extra request per note. Off by default — the feed row already includes note ID, title, likes, author, cover, and a ready-to-scrape URL + token.",
                        "default": false
                    },
                    "searchSort": {
                        "title": "↕️ Search Sort (Search Notes)",
                        "enum": [
                            "general",
                            "popularity_descending",
                            "time_descending"
                        ],
                        "type": "string",
                        "description": "Ranking for Search Notes.",
                        "default": "general"
                    },
                    "maxPages": {
                        "title": "📄 Max pages",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Pages to fetch on paginated operations (User Notes, Channel Feed, Note Comments, Search Notes/Users). ~15–20 items per page. Default 1.",
                        "default": 1
                    },
                    "maxItems": {
                        "title": "🧮 Max items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on total dataset rows. Leave empty for no cap."
                    },
                    "webSession": {
                        "title": "🍪 web_session cookie (for Search)",
                        "type": "string",
                        "description": "A logged-in Xiaohongshu `web_session` cookie value from an account you control. REQUIRED for Note Comments, Search Notes, and Search Users (Xiaohongshu gates guest access to comments and search). Not needed for Note Detail, User Profile, Channel Feed, or Mall Products. You can paste either the bare value or your whole cookie string."
                    },
                    "proxy": {
                        "title": "🌐 Proxy",
                        "type": "object",
                        "description": "Proxy egress. Leave default to use built-in residential routing. Override with Apify Proxy or custom proxy URLs if needed.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
