# Xiaohongshu Image Note Detail Scraper (`opspilot.cc/xiaohongshu-image-note-detail-scraper`) Actor

Fetch the full detail of a Xiaohongshu image post (note) by note\_id or share\_text. Returns normalized title, description, image list, author, and engagement metrics.

- **URL**: https://apify.com/opspilot.cc/xiaohongshu-image-note-detail-scraper.md
- **Developed by:** [wang wei](https://apify.com/opspilot.cc) (community)
- **Categories:** E-commerce, SEO tools, Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.10 / actor start

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Image Note Detail Scraper

Fetch the full detail of a Xiaohongshu image post (note) by `note_id` or `share_text`. Returns the normalized title, description, image list, author, and engagement metrics for a single note. One upstream request per run; no pagination needed.

> When both `note_id` and `share_text` are provided, `note_id` wins.

### Use it together with the other Xiaohongshu Actors

This Actor is one piece of a 4-piece Xiaohongshu toolkit. Run them in sequence to go from a topic, to a single note detail, to its comment thread.

| Where in the pipeline | Actor | Console | Use it to |
|---:|---|---|---|
| before / step ① | [Xiaohongshu Keyword Search Scraper](https://console.apify.com/actors/JECW4SdwsOOgtuobc) | [JECW4SdwsOOgtuobc](https://console.apify.com/actors/JECW4SdwsOOgtuobc) | step ① — start here to discover `noteId`s by keyword, then feed one to this Actor |
| sister Actor / step ② | [Xiaohongshu Video Note Detail Scraper](https://console.apify.com/actors/nIGSWsYF5htLotphk) | [nIGSWsYF5htLotphk](https://console.apify.com/actors/nIGSWsYF5htLotphk) | sister Actor — same shape, but for video notes (returns playback URLs) |
| after / step ③ | [Xiaohongshu Note Comments Scraper](https://console.apify.com/actors/LNXEA0uuHX70vchNW) | [LNXEA0uuHX70vchNW](https://console.apify.com/actors/LNXEA0uuHX70vchNW) | step ③ — pull the comment thread for the same `noteId` |

**You are here:** **Xiaohongshu Image Note Detail Scraper** (step ②) — run this on its own for `pull the full payload for one image note`. The other 3 Actors live in their own Apify listings — click their Console links to open them in a new tab.

### No Setup Required

> **No setup required.** The upstream API key and base URL are preconfigured in this Actor — no Environment variables to add, no Console setup steps to follow. Just click **Start** and fill in the input form.

> **Schema changed?** Apify Console caches the input form. Click **Reload editor** (or hard-refresh) to pick up new fields after a schema bump.

### Why Use This Actor

| Problem | How This Actor Solves It |
|---|---|
| You have a Xiaohongshu note URL but no easy way to extract title, images, and engagement stats. | Pass the URL as `share_text`; get a normalized JSON record back. |
| You want to enrich your CRM or BI dataset with Xiaohongshu post performance. | One normalized row per run with structured fields and the original payload in `rawData`. |
| You need a fast, deterministic way to grab a single note detail without scraping. | One upstream request per run — cheap, predictable, no pagination. |

### What You Get

A single normalized dataset row with:

- **Identifiers** — `noteId`, `xsecToken`, `noteUrl`
- **Content** — `title`, `description`, `noteType`, `tags`, `ipLocation`, `publishTime`
- **Media** — `images[]` (each with `url`, `urlDefault`, `urlPre`, `width`, `height`, `format`, `livePhoto`), `coverUrl`
- **Author** — `userId`, `nickname`, `avatar`
- **Engagement** — `likedCount`, `collectedCount`, `commentCount`, `sharedCount`
- **Provenance** — `source` (`note_id` or `share_text`), `collectedAt`, `rawData` (full upstream payload)

Plus a SUMMARY record with the note ID, source kind, and request count.

### Quick Start

#### 1. Run with Example Input

```json
{
  "note_id": "697c0eee000000000a03c308"
}
```

Or paste a Xiaohongshu share link or the full app share text (the Actor extracts the URL automatically):

```json
{
  "share_text": "美食推荐 https://www.xiaohongshu.com/explore/64abcdef0000000000ffffff?xsec_token=abc&xsec_source=pc_copy_link 复制打开"
}
```

#### 2. Export Your Results

The dataset is available as a JSON array; the SUMMARY record is in the default key-value store.

### Input Reference

#### `note_id` — Note ID

| Required | Type | Description |
|---|---|---|
| Optional (one of two) | string | Xiaohongshu note ID, up to 64 alphanumeric characters. Wins over `share_text` when both are provided. |

#### `share_text` — Share text

| Required | Type | Description |
|---|---|---|
| Optional (one of two) | string | A Xiaohongshu share link or the full share text from the app. up to 2000 characters; the Actor extracts the first http(s) URL. Use when you don't have the raw note\_id. |

### Output Reference

See "What You Get" above for the full field list. Each row also includes `rawData`, the unmodified upstream payload, for audit and re-parsing.

### Pricing & Limits

- **Free tier**: 5 runs/day (one detail fetch = one run).
- **Paid users**: Unlimited runs.
- **Hard caps**: 1 note per run, 1 upstream request per run. No bulk input — pass a single note at a time.

### FAQ

- **Can I fetch many notes in one run?** No. This Actor is built around one note = one request. Run it multiple times, or use a workflow/scheduler to fan out.
- **My share text is missing the URL — what happens?** The Actor's `extractShareUrl` regex needs at least one http(s) link. If you only pasted the title or Chinese characters, it will reject the input.
- **I got an empty `images` array.** Some notes are video-only or the author deleted the images. Check `noteType` and `rawData`.
- **Why is my free run blocked?** Free tier is 5 runs/day. Either upgrade your Apify plan, wait until tomorrow, or set `APIFY_USER_IS_PAYING=1` (paid tier only).
- **Do I need to add an upstream API key?** No. This Actor ships with the upstream integration preconfigured — `UPSTREAM_API_KEY` and `UPSTREAM_BASE_URL` are baked into the build. No Console setup, no secrets to manage.

### Support

Open an issue on the [Actor Console page](https://console.apify.com/actors/) or contact via Discord linked in the upstream SUMMARY.

### Actor

- **Apify Actor ID**: `kP7I5XcMAaLxaYj0R`
- **Console**: <https://console.apify.com/actors/kP7I5XcMAaLxaYj0R>

### Changelog

See [CHANGELOG.md](./CHANGELOG.md).

# Actor input Schema

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

Xiaohongshu note ID, for example: 697c0eee000000000a03c308. Preferred over share\_text. If both are provided, note\_id wins. Default value is used when the Actor is invoked with empty input so Apify automated tests can run without manual setup.

## `share_text` (type: `string`):

Paste a Xiaohongshu share link or the full share text from the app. The Actor extracts the first http(s) URL automatically. Use this only when you do not have a raw note\_id.

## Actor input object example

```json
{
  "note_id": "697c0eee000000000a03c308",
  "share_text": ""
}
```

# Actor output Schema

## `dataset` (type: `string`):

One item per run with the normalized image note detail (title, description, image list, author, engagement metrics) and the original upstream payload in rawData.

## `summary` (type: `string`):

note\_id, source kind (note\_id vs share\_text), upstream request count, request cost, and any error details.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("opspilot.cc/xiaohongshu-image-note-detail-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("opspilot.cc/xiaohongshu-image-note-detail-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 '{}' |
apify call opspilot.cc/xiaohongshu-image-note-detail-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,opspilot.cc/xiaohongshu-image-note-detail-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/kP7I5XcMAaLxaYj0R/builds/PQqPAcbmw1wdkRyZt/openapi.json
