LaunchKit · 2026
Back to Skills

xiaohongshu-extract

Extract metadata from Xiaohongshu (XHS) share or discovery URLs by parsing window.__INITIAL_STATE__ and returning.

1
1.3k downloads
by @jovijovi

Setup & Installation

openclaw skills install @jovijovi/xiaohongshu-extract

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install xiaohongshu-extract

What This Skill Does

Extracts note metadata from Xiaohongshu (XHS) share or discovery URLs by parsing the page's embedded state object. Returns structured JSON with title, description, engagement stats, user info, tags, and video stream details.

Parses the embedded window.__INITIAL_STATE__ directly, avoiding the need for a formal API key or authenticated session.

When to use it

  • Pulling engagement stats from a viral XHS post
  • Archiving note metadata before a post is deleted
  • Feeding XHS content data into a downstream analysis pipeline
  • Extracting video stream URLs from XHS discovery links
  • Batch collecting note details from a list of XHS share URLs

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: extract metadata from this XHS share link: https://www.xiaohongshu.com/explore/abc123

AGENT
  1. 1Run scripts/xiaohongshu_extract.py with the provided URL and --pretty flag
  2. 2Check if window.__INITIAL_STATE__ was found in the page response
  3. 3If not found, ask the user for a direct discovery URL instead
  4. 4Parse the returned JSON for title, engagement counts, tags, and video info
  5. 5Return the structured note metadata to the user
OUTPUT

JSON object with note_id, title, desc, interact counts, tags, and video stream details