360 Secure SkillHub
360 安全技能中心

小红书数据助手 SocialDataX

封装 SocialDataX 小红书数据接口,提供搜索热榜、笔记搜索与详情、评论及回复、博主资料与博主笔记列表、搜索建议等只读查询。通过 npx 运行 socialdatax-skills CLI 或同名 MCP 工具调用,需配置 SOCIALDATAX_API_KEY,不涉及登录或账号操作。

devinchen2014
devinchen2014
热度 66.55
最近更新 2026-10-12 13:01:54
分类:数据依赖:代码执行 / 第三方 API / MCP 服务应用场景:社交媒体 / 市场分析 / 研究 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add socialdatax-xhs
Metadata
name
socialdatax-xhs
description
用于小红书数据助手、小红书搜索热榜、小红书数据分析、小红书笔记搜索、笔记详情、评论分析、博主数据和博主笔记。覆盖 Xiaohongshu / XHS / RedNote,来自 SocialDataX 社媒数据助手。
source_client
socialdatax-skills
source_platform
clawhub
source_skill
socialdatax-xhs
metadata
{"openclaw":{"requires":{"env":["SOCIALDATAX_API_KEY"],"bins":["node","npm"]},"primaryEnv":"SOCIALDATAX_API_KEY","install":[{"kind":"node","package":"socialdatax-skills","bins":[]}],"emoji":"📕","homepage":"https://socialdatax.com/ai?from=clawhub"}}

小红书数据助手 SocialDataX

Use this skill when the user needs a Xiaohongshu / 小红书 / XHS / RedNote data assistant for search hot list, content research, note search, note details, comment analysis, creator profile lookup, or creator note lists.

API Key

Use SOCIALDATAX_API_KEY for data calls. The only official website for requesting or managing API access is https://socialdatax.com/ai?from=clawhub. If a user asks where to get a key, provide only this URL; do not infer alternate domains. 获取或管理 API Key:访问 https://socialdatax.com/ai?from=clawhub,按官网的 API Key 申请/管理入口操作。环境变量名固定使用 SOCIALDATAX_API_KEY;不要引导用户使用其他域名。

Preferred Direct CLI

Choose the matching SocialDataX command:

npx -y socialdatax-skills@latest xhs hot-search \
  --pretty --source-client socialdatax-skills --source-platform clawhub \
  --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs search \
  --keyword "<keyword>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs search \
  --keyword "<keyword>" --pages 3 --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs detail \
  --note-id "<note_id>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs detail \
  --url "<note_url_or_share_text>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs comments \
  --note-id "<note_id>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs comments \
  --note-id "<note_id>" --all --include-replies --pretty \
  --source-client socialdatax-skills --source-platform clawhub \
  --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs comments \
  --url "<note_url_or_share_text>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs sub-comments \
  --note-id "<note_id>" --comment-id "<comment_id>" --pretty \
  --source-client socialdatax-skills --source-platform clawhub \
  --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs user-info \
  --user-id "<user_id>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs user-info \
  --profile-url "<profile_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform clawhub \
  --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs user-posts \
  --user-id "<user_id>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs user-posts \
  --user-id "<user_id>" --all --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs user-posts \
  --profile-url "<profile_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform clawhub \
  --source-skill socialdatax-xhs

npx -y socialdatax-skills@latest xhs search-suggestions \
  --keyword "<keyword>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-xhs

Required arguments:

  • XHS hot-search: no required arguments.

Optional arguments:

  • XHS comments --sort-type <default|time_descending|like_count_descending>: optional first-level comment sort order; omit it for the platform default order.
  • --source-client socialdatax-skills --source-platform clawhub --source-skill socialdatax-xhs: usage attribution for this Agent Skill; keep these values unchanged when running examples from this Skill.

Use hot-search for 小红书搜索热榜, search for 小红书数据分析 and note discovery, detail for one note, comments for comment analysis and replies, user-info for 博主信息, and user-posts for 博主笔记. For XHS keyword completion, use xhs_search_suggestions; use xhs search or xhs_search_notes when the user needs note results instead of suggestions.

Safety Boundary

This skill is read-only. It uses SOCIALDATAX_API_KEY from the user's environment at runtime. Generated Skill files do not contain API keys. It does not read local browser data or perform login, posting, liking, commenting, or account changes.

MCP Tools

MCP tools matching the direct CLI commands above:

  • xhs_get_search_hot_list
  • xhs_search_notes
  • xhs_get_note_detail_by_note_id
  • xhs_get_note_detail_by_note_url
  • xhs_get_note_comments_by_note_id
  • xhs_get_note_comments_by_note_url
  • xhs_get_note_sub_comments_by_comment_id
  • xhs_get_user_info_by_user_id
  • xhs_get_user_info_by_profile_url
  • xhs_get_user_posted_notes_by_user_id
  • xhs_get_user_posted_notes_by_profile_url
  • xhs_search_suggestions

XHS search parameter naming reminder: direct CLI uses --sort-type, --publish-time-range, and --note-type; the xhs_search_notes MCP tool uses sort_type, publish_time_range, and note_type. Do not pass sortType, publishTimeRange, or noteType.

Output Guidance

For XHS search or detail results, in every use of a returned note_url, such as final answers, display, references, storage, output, or forwarding, preserve it exactly as the full URL, including xsec_token query parameters. Do not modify, truncate, redact, mask, normalize, rebuild, or synthesize the URL from note_id; if detail note_url is null, show the note_id or say that no directly openable full link is available. For XHS note_id, copy the entire returned note_id exactly; do not pass or display only a prefix.

Troubleshooting

  • If an SDK/dependency, npm network, Node.js/npm/npx availability, permission, or missing runtime error appears, treat it as a local runtime, dependency installation, network, or agent authorization issue, not a SocialDataX API key or business data error. If the current environment has permission, install or restore automatically. When network or execution authorization is needed, ask the user to approve or finish authorization, then continue the same command; do not use public web search as a substitute for SocialDataX data.
  • For non-balance network or API errors, preserve the error message, check SOCIALDATAX_API_KEY, parameters, and link or ID format, then retry once when appropriate.
  • If the response returns insufficient_balance or says the balance/credits are insufficient, do not retry repeatedly. Show the recharge URL from the error exactly as returned, then continue the same command after the user recharges.
  • If the user has recharged but still sees insufficient balance, confirm SOCIALDATAX_API_KEY belongs to the same account that was recharged; if needed, copy a fresh API Key from the official dashboard.