小红书数据分析-socialdatax-笔记搜索-x-4

内容来源:clawhub · 原始地址 · 查看安装指南

原始内容


name: "socialdatax-xhs-search" description: "用于小红书数据分析、小红书笔记搜索、关键词检索、内容调研、竞品分析和趋势研究。覆盖 Xiaohongshu / XHS / RedNote note search,来自 SocialDataX 社媒数据助手。" source_client: "socialdatax-skills" source_platform: "clawhub" source_skill: "socialdatax-xhs-search" 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 wants 小红书数据分析, 小红书笔记搜索, Xiaohongshu / XHS / RedNote note search, topic discovery, content planning, competitor research, market observation, or trend scanning.

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;不要引导用户使用其他域名;do not infer alternate domains。

Preferred Direct CLI

Prefer the direct CLI when the agent can run shell commands. It does not require MCP server configuration:

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

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

Required arguments:

  • --keyword <text>: content research topic; use the user's actual intent, trim whitespace, and keep it focused.

Optional arguments:

  • --page-token <next_page_token>: opaque pagination token; omit it on the first search request. Continue only with the complete returned next_page_token from the same search pagination chain. Do not modify, truncate, redact, mask, omit, normalize, rebuild, generate, or replace the middle with ellipses.
  • --sort-type <general|time_descending|like_count_descending|comment_count_descending|collect_count_descending>: optional sort value; omit it for default sorting.
  • --note-type <all|image|video>: optional content format filter; default is all.
  • --publish-time-range <all|day|week|half_year>: optional publish-time filter; default is all.
  • --pages <n>: fetch and merge N search pages from the current starting point.
  • --max-items <n>: stop after collecting N search results.
  • --since-days <1-365>: keep only search results whose public publish_time is within the last N days; search remains bounded by --pages.
  • --pretty: output formatting only; it does not change the research topic or results.
  • --source-client socialdatax-skills --source-platform clawhub --source-skill socialdatax-xhs-search: usage attribution for this Agent Skill; keep these values unchanged when running examples from this Skill.

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_search_notes

For XHS, call xhs_search_notes with keyword, optional page_token, sort_type, note_type, and publish_time_range.

Do not pass page to xhs_search_notes; omit page_token on the first request. Continue pagination only when next_page_token is not empty, and pass the complete returned next_page_token back unchanged as page_token for the same keyword, sort, note type, publish-time range, and caller chain.

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

Summarize visible evidence separately from interpretation. Focus on topic patterns, content angles, audience reactions, creator positioning, and useful examples when the user needs traceability. For XHS search 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. For XHS note_id, copy the complete 24-character lowercase hexadecimal ID exactly; do not pass or display only a prefix. When the user asks for recent topic research, prefer CLI --since-days 7 or another user-specified day window; do not claim complete platform coverage beyond the fetched pages.

Troubleshooting

  • 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.