# Xiaohongshu (RedNote) Scraper & API | EveryInfra (`blushing_parachute/everyinfra-xiaohongshu-api`) Actor

EveryInfra Xiaohongshu (RedNote) data Actor for English-speaking developers and analysts on Apify Store; 12 active operations. First 3 accepted data-request attempts per Apify account are free of result-event charges, shared across all EveryInfra Actors.

- **URL**: https://apify.com/blushing_parachute/everyinfra-xiaohongshu-api.md
- **Developed by:** [ECHO](https://apify.com/blushing_parachute) (community)
- **Stats:** 1,890 total users, 1,402 monthly users, 99.0% runs succeeded, 0 bookmarks
- **User rating**: 4.78 out of 5 stars

## Pricing

from $2.80 / 1,000 note 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/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 (RedNote) Scraper & API | EveryInfra

EveryInfra Xiaohongshu (RedNote) API scrapes notes, posts, comments, user profiles, followers, and product data using 12 dedicated App actions.

**No official affiliation.**

### Active Actions

12 active App actions only:

- `search`: Search notes/posts by keyword
- `note`: Get a specific note by ID
- `comments`: Get comments for a note
- `sub_comments`: Get sub-comments
- `user_post`: Get posts by user
- `user_info`: Get user information
- `user_followers`: Get followers of a user
- `user_search`: Search for users
- `topic`: Get notes by topic
- `product_search`: Search products
- `product_detail`: Get product details
- `product_review`: Get product reviews

### Usage

Both flat parameters and a params object are accepted. If the action field is omitted, search is used.

Flat example:

```json
{"action":"search","keyword":"coffee","page_size":20}
```

Nested example:

```json
{"action":"search","params":{"keyword":"coffee","page_size":20}}
```

For search only, num is accepted as an alias of page_size. For comments and sub_comments, num keeps its existing meaning as items per page.

If both shapes provide the same canonical key, equal values are accepted and conflicting values fail. num and page_size count as the same canonical key for search.

Each run requests just one page, with manual pagination. Requested page_size/num is NOT a strict result cap: a source page may contain more or fewer rows. No automatic retries or pagination.

Invalid input does not consume a trial or call the data service.

The Form has keyword coffee as an example only; when switching operations, clear non-applicable example fields. Blank fields for other operations are ignored; unknown fields are still rejected.

### Trial Policy

The first 3 accepted data-request attempts per Apify account are free of result-event charges, shared across all EveryInfra Actors using this policy; no daily reset and no per-Actor reset. Each run makes one source request only. A reserved trial counts even when the request is empty or fails; invalid input is rejected before reservation. After 3 trials a paid Apify plan is required and normal event pricing applies. Retries/restarts cannot create another free attempt. No automatic retries or pagination.

### Pricing

| Action | Billing unit | USD per unit |
|---|---|---:|
| `note` | request | 0.013 |
| `comments` | request | 0.013 |
| `sub_comments` | request | 0.013 |
| `user_info` | request | 0.013 |
| `user_followers` | request | 0.013 |
| `search` | record | 0.0028 |
| `user_post` | record | 0.0028 |
| `topic` | record | 0.0028 |
| `user_search` | record | 0.004 |
| `product_search` | record | 0.0032 |
| `product_detail` | request | 0.015 |
| `product_review` | record | 0.004 |

No startup charge or extra default-dataset event charge. Empty data and source errors before delivery result in no charge. Budget must cover complete returned page or the request fails before any result delivery or charge. No fee for nonexistent records. An interrupted delivery may require inspection of dataset/charges before retry.

Note: Embedded review replies included, not extra charged. Creator covers platform running costs. Empty or failed requests before delivery have no result-event charge. Paid run budget must cover a complete returned page; otherwise no delivery or charge. Separate paid runs independent; dedupe within one page.

### Pagination and Inputs

note_id, user_id, comment_id and last_note_id must be 24-character hexadecimal strings.

`note.node_type` defaults to `images`. A `video` `node_type` can cause the source to return the wrong note; the wrapper rejects a mismatch. Use the default first.

`search`, `user_search`, and `product_search` pages start at 1. `product_review` pages start at 0. `comments`, `sub_comments`, `user_post`, and `user_followers` use a cursor. For `comments` and `sub_comments`, use output `pagination.next_cursor` when it is supplied.

First page of action topic requires only topic_id. To request a later page, provide last_note_ct, last_note_id and cursor_score from the same returned note. The topic_id in the topic URL can differ from its display tag id.

`num` and `page_size` accept 1–100, but the source may ignore them. A `search` with `page_size` 1 returned 20 records. A comments sample with `num` 15 returned 15. `sub_comments` with default 10 returned 5.

### Output Format

- `OUTPUT` holds full response page plus pagination
- request-priced dataset has one page row
- per-record dataset has rows `{action,record_id,data}`
- `product_search` and `product_detail` have nested `data.module.data` cards
- `product_review` uses `data.reviews`
- Only product cards count for `product_search`

### Parameter reference

| Action | Required parameters | Optional parameters and defaults |
|---|---|---|
| `search` | `keyword` | `page=1`, `page_size=20`, `sort="综合"`, `note_type="不限"`, `note_range="不限"`, `search_id=""`, `session_id=""`, `note_time="不限"` |
| `note` | `note_id` | `node_type="images"` |
| `comments` | `note_id` | `num=15`, `sort="默认"`, `cursor=""` |
| `sub_comments` | `note_id`, `comment_id` | `num=10`, `cursor=""` |
| `user_post` | `user_id` | `cursor=""` |
| `user_info` | `user_id` | — |
| `user_followers` | `user_id` | `cursor=""` |
| `user_search` | `keyword` | `page=1`, `fans_count="all"`, `user_type="all"` |
| `topic` | `topic_id` | `sort="最新"`, `last_note_ct=""`, `last_note_id=""`, `cursor_score=""` |
| `product_search` | `keyword` | `page=1`, `sort="综合"`, `filters_tags=[]` |
| `product_detail` | `sku_id` | — |
| `product_review` | `new_sku_id` | `sort_strategy_type="综合"`, `page=0` |

#### Allowed enum values

- `search.sort`: `综合`, `最新`, `最多点赞`, `最多评论`, `最多收藏`, `英文优先`
- `search.note_type`: `不限`, `视频笔记`, `普通笔记`, `直播笔记`
- `search.note_range`: `不限`, `已看过`, `未看过`, `已关注`
- `search.note_time`: `不限`, `一天内`, `一周内`, `一个月内`, `一年内`
- `note.node_type`: `images`, `video`
- `comments.sort`: `默认`, `最新`, `最多点赞`
- `user_search.user_type`: `all`, `regular_user`, `personal_verification`, `business_verification`
- `topic.sort`: `最新`, `最热`
- `product_search.sort`: `综合`, `销量`, `价格升序`, `价格降序`
- `product_review.sort_strategy_type`: `综合`, `最新`

### Support

Support via Apify Issues. See EveryInfra profile at https://apify.com/blushing_parachute

# Actor input Schema

## `action` (type: `string`):

12 App actions for scraping Xiaohongshu notes, posts, comments, users, followers and products: search, note, comments, sub_comments, user_post, user_info, user_followers, user_search, topic, product_search, product_detail, product_review.

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

Search keyword. Applicable to: search, user_search, product_search

## `note_id` (type: `string`):

Note ID. Applicable to: note, comments, sub_comments

## `user_id` (type: `string`):

User ID. Applicable to: user_post, user_info, user_followers

## `comment_id` (type: `string`):

Comment ID. Applicable to: sub_comments

## `topic_id` (type: `string`):

Topic ID. Applicable to: topic

## `sku_id` (type: `string`):

SKU ID. Applicable to: product_detail

## `new_sku_id` (type: `string`):

New SKU ID. Applicable to: product_review

## `page` (type: `integer`):

Page number. Applicable to: search, user_search, product_search, product_review. Action-specific accepted values/defaults are in README.

## `page_size` (type: `integer`):

Requested page_size/num is NOT a strict result cap: a source page may contain more or fewer rows. Applicable to: search.

## `num` (type: `integer`):

Items per page. Applicable to: search (alias of page_size), comments, sub_comments. Requested page_size/num is NOT a strict result cap: a source page may contain more or fewer rows.

## `cursor` (type: `string`):

Pagination cursor. Applicable to: comments, sub_comments, user_post, user_followers

## `search_id` (type: `string`):

Search ID. Applicable to: search

## `session_id` (type: `string`):

Session ID. Applicable to: search

## `last_note_ct` (type: `string`):

Last note creation time. Applicable to: topic

## `last_note_id` (type: `string`):

Last note ID. Applicable to: topic

## `cursor_score` (type: `string`):

Pagination cursor score. Applicable to: topic

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

Sort method. Applicable to: search, comments, topic, product_search. Action-specific accepted values/defaults are in README.

## `note_type` (type: `string`):

Note type filter. Applicable to: search

## `note_range` (type: `string`):

Note range filter. Applicable to: search

## `note_time` (type: `string`):

Time range filter. Applicable to: search

## `node_type` (type: `string`):

Node type. Applicable to: note

## `fans_count` (type: `string`):

Fans count filter. Applicable to: user_search

## `user_type` (type: `string`):

User type filter. Applicable to: user_search

## `filters_tags` (type: `array`):

Filters tags array. Applicable to: product_search

## `sort_strategy_type` (type: `string`):

Sort strategy. Applicable to: product_review

## `params` (type: `object`):

Optional advanced JSON object under 'params' key. Existing clients can continue using nested input format.

## Actor input object example

```json
{
  "action": "search",
  "keyword": "coffee"
}
```

# Actor output Schema

## `pages` (type: `string`):

No description

## `response` (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 = {
    "action": "search",
    "keyword": "coffee"
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,blushing_parachute/everyinfra-xiaohongshu-api"
        }
    }
}
```

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/UFtJkgrTBylXaWfcy/builds/GrQPDBGFIba6GtUbp/openapi.json
