# Xiaohongshu (RedNote) Search Scraper (`shahidirfan/xiaohongshu-search-scraper`) Actor

Scrape Xiaohongshu (RedNote) search results, posts, keywords, hashtags, user profiles, engagement metrics, likes, comments, and content URLs. Extract valuable RedNote data for influencer discovery, social media analytics, trend tracking, competitor research, and marketing insights.

- **URL**: https://apify.com/shahidirfan/xiaohongshu-search-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.25 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does Xiaohongshu (RedNote) Search Scraper do?

Xiaohongshu (RedNote) Search Scraper collects notes from Xiaohongshu keyword search results and saves them as structured rows. Give it a keyword such as `coffee`, `美食`, or `skincare routine`, and it returns note titles, captions, authors, engagement counts, tags, images, and direct note links.

The Actor runs without a Xiaohongshu account, cookie, or login. It pages through search results, skips promoted slots, removes duplicates, and stops when it reaches your result limit or the end of the results.

### Why use Xiaohongshu (RedNote) Search Scraper?

- **Keyword discovery at scale** - collect up to 1,000 notes across a keyword without clicking through search pages.
- **Structured rows** - every note becomes one record with stable field names, ready for a spreadsheet, database, or AI pipeline.
- **No empty placeholders** - fields are only written when Xiaohongshu returns a real value.
- **Simple input** - a keyword or a pasted search URL both work.
- **Repeatable runs** - schedule the Actor, call it through the Apify API, or chain it with the Xiaohongshu Comments Scraper to add comment data to the notes you find.
- **Clean pagination** - search pages are processed in order, with bounded retries when the site slows down.

### What data can you extract from Xiaohongshu?

| Group      | Fields                                                                                           |
| ---------- | ------------------------------------------------------------------------------------------------ |
| Note       | `note_id`, `note_url`, `note_type`, `note_title`, `caption`, `published_at`, `published_at_unix` |
| Author     | `author_id`, `author_name`, `author_avatar`                                                      |
| Engagement | `likes`, `comments_count`, `collects_count`, `shares_count`                                      |
| Media      | `cover_image`, `images`                                                                          |
| Topics     | `tags`                                                                                           |
| Search     | `keyword`, `search_page`                                                                         |

Promoted search slots are skipped, so every row is an organic note.

### How to use Xiaohongshu (RedNote) Search Scraper

1. Open the Actor on Apify.
2. Enter a **Search keyword or search URL**.
3. Set **Maximum notes** and **Maximum search pages**.
4. Optionally attach a proxy configuration.
5. Run the Actor.
6. Open the dataset and download it as JSON, CSV, Excel, or XML, or send it to another system.

| Input                | Type    | Default  | Description                                                                                                     |
| -------------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `keyword`            | String  | `coffee` | Search keyword, or a RedNote search URL that contains a `keyword` parameter. Defaults to `coffee` when omitted. |
| `maxResults`         | Integer | `60`     | Maximum notes to save. Range 1 to 1000.                                                                         |
| `maxPages`           | Integer | `10`     | Maximum search pages to request. Each page holds up to 20 results, including promoted slots. Range 1 to 50.     |
| `proxyConfiguration` | Object  | none     | Optional proxy. The Actor works without one. Use residential proxies for repeated runs that hit rate limits.    |

Search results arrive 20 per page, and roughly 4 of those are promoted slots. Expect around 16 notes per page.

### Output data

| Field               | Type   | Description                                       |
| ------------------- | ------ | ------------------------------------------------- |
| `keyword`           | String | Keyword that produced the note                    |
| `search_page`       | Number | Search page the note appeared on                  |
| `note_id`           | String | 24 character note id                              |
| `note_url`          | String | Direct RedNote note URL                           |
| `note_type`         | String | `normal` for image notes, `video` for video notes |
| `note_title`        | String | Note title, when the author wrote one             |
| `caption`           | String | Note caption text                                 |
| `author_id`         | String | 24 character author id                            |
| `author_name`       | String | Author display name                               |
| `author_avatar`     | String | Author avatar URL                                 |
| `likes`             | Number | Like count                                        |
| `comments_count`    | Number | Comment count                                     |
| `collects_count`    | Number | Collect or save count                             |
| `shares_count`      | Number | Share count                                       |
| `published_at`      | String | Publish time in ISO format                        |
| `published_at_unix` | Number | Publish time in Unix milliseconds                 |
| `cover_image`       | String | Cover image URL                                   |
| `images`            | Array  | Image URLs attached to the note                   |
| `tags`              | Array  | Topic tags attached to the note                   |

Counts are converted from Xiaohongshu display values, so `1.7万` becomes `17000`.

### Usage examples

#### Search a single keyword

```json
{
    "keyword": "coffee",
    "maxResults": 60,
    "maxPages": 10
}
```

#### Paste a search URL

```json
{
    "keyword": "https://www.rednote.com/search_result?keyword=%E7%BE%8E%E9%A3%9F&source=web_search_result_notes",
    "maxResults": 40,
    "maxPages": 3
}
```

#### Run a larger job with a proxy

```json
{
    "keyword": "skincare routine",
    "maxResults": 500,
    "maxPages": 40,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

### Sample output

One real row from a local run with the keyword `coffee`. The `images` array is shortened here; a full row lists every image URL.

```json
{
    "keyword": "coffee",
    "search_page": 1,
    "note_id": "6a640c800000000004029906",
    "note_url": "https://www.rednote.com/explore/6a640c800000000004029906",
    "note_type": "normal",
    "note_title": "coffee, cuddles & cozy dayyy",
    "caption": "૮⁔. ̫ .⁔ა 穿上新衣服和好朋友度过这美好的一天哦 墨尔本大学附近的flovie cafe好好吃 #记录吧就现在",
    "author_id": "58afaa9750c4b444d19e5f8e",
    "author_name": "我的阿仔",
    "author_avatar": "https://sns-avatar-qc.xhscdn.com/avatar/6343a44e50b203b7f11ee95e.jpg?imageView2/2/w/80/format/jpg",
    "likes": 1730,
    "comments_count": 31,
    "collects_count": 293,
    "shares_count": 85,
    "published_at": "2026-07-25T01:08:16.000Z",
    "published_at_unix": 1784941696000,
    "cover_image": "https://sns-na-i27.xhscdn.com/notes_pre_post/1040g3k83231clp63na7g496q4sl9ense4kdk8co?imageView2/2/w/1440/format/webp&ap=5&sc=SRH_DTL&sign=8615461759b26a50e1cc86bec8e2e5d0&t=6af487a4",
    "images": [
        "https://sns-na-i27.xhscdn.com/notes_pre_post/1040g3k83231clp63na7g496q4sl9ense4kdk8co?imageView2/2/w/1440/format/webp&ap=5&sc=SRH_DTL&sign=8615461759b26a50e1cc86bec8e2e5d0&t=6af487a4"
    ],
    "tags": ["记录吧就现在", "来拍照了", "狗狗日记"]
}
```

### Tips for best results

- Use the language of the audience you want to reach. Chinese keywords return Chinese notes, English keywords return English notes.
- Start with `maxResults` between 50 and 100 to check a keyword before running a large job.
- Broader keywords return more pages. Very specific phrases can return only one page.
- Search order is whatever Xiaohongshu returns by default. Sorting options are not part of search results for anonymous requests.
- If repeated runs start failing, add a residential proxy. The Actor retries and rotates the proxy session when a proxy is configured.
- Feed `note_url` or `note_id` into the Xiaohongshu Comments Scraper to collect comments for the notes you found.

### FAQ

**Do I need a Xiaohongshu account?**
No. The Actor works without a login, cookie, or token.

**How many notes can I get per keyword?**
Up to 1,000 notes, which is about 50 search pages. Set `maxResults` and `maxPages` to control the run.

**Why are there fewer notes than 20 per page?**
Each page includes promoted slots. Those are skipped because they are not organic notes.

**Can I sort by newest or most liked?**
No. Xiaohongshu returned the same order for every sort option tested, so the Actor saves the default ordering.

**What happens when a keyword has no results?**
The run succeeds with an empty dataset and logs that no notes were found.

**Can I search several keywords in one run?**
Run the Actor once per keyword, or start it several times through the Apify API or a schedule.

### Integrations

Send the dataset to Google Sheets, Airtable, a webhook, or your own API with Apify integrations. The Apify API lets you start runs from your own application and read the dataset when the run finishes.

### Related Actors

- [Xiaohongshu Comments Scraper](https://apify.com/shahidirfan/Xiaohongshu-Comments-Scraper) - collect the comments under the notes you found here.
- [Pinterest Search Scraper](https://apify.com/shahidirfan/Pinterest-Search-Scraper) - run keyword searches on Pinterest and collect the matching pins.
- [TikTok Hashtag Scraper](https://apify.com/shahidirfan/TikTok-Hashtag-Scraper) - collect posts for a TikTok hashtag to compare topic interest.

### Support

Open an issue on the Actor page if a run fails. Include the run id, the keyword, and the log line that shows the failure. Do not include cookies or account details.

### Legal notice

This Actor collects publicly visible search results. Use it for research, market analysis, and content planning. Respect Xiaohongshu terms of service, local law, and the privacy of the people whose public posts you collect. Do not use the data for harassment or mass unsolicited messaging.

# Actor input Schema

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

A search keyword such as coffee or 美食, or a RedNote search URL containing a keyword parameter. The keyword is sent to Xiaohongshu search as typed.

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

Maximum number of notes to save. Xiaohongshu returns up to 20 results per search page.

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

Maximum number of search pages to request. Each page holds up to 20 results, including promoted slots that are skipped.

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

Optional proxy configuration. The Actor works without a proxy. Use residential proxies when repeated runs hit rate limits.

## Actor input object example

```json
{
  "keyword": "coffee",
  "maxResults": 60,
  "maxPages": 10,
  "proxyConfiguration": {}
}
```

# Actor output Schema

## `overview` (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 = {
    "keyword": "coffee"
};

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

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/xiaohongshu-search-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 '{
  "keyword": "coffee"
}' |
apify call shahidirfan/xiaohongshu-search-scraper --silent --output-dataset

```

## MCP server setup

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