360 Secure SkillHub
360 安全技能中心

X / Twitter 数据助手 SocialDataX

只读的 X/Twitter 数据检索工具:按关键词搜索帖子,查看单帖详情与评论/回复,获取创作者资料、帖子列表及其发出的回复;通过 npx 命令行或 MCP 工具调用 SocialDataX 接口,运行时需环境变量中的 API Key。

devinchen2014
devinchen2014
热度 50.68
最近更新 2026-10-19 18:37:14
分类:搜索依赖:代码执行 / 第三方 API / MCP 服务应用场景:研究 / 社交媒体 / 市场分析

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add socialdatax-x-twitter
Metadata
name
socialdatax-x-twitter
description
用于 X / Twitter 内容搜索、帖子详情、评论分析、创作者资料、帖子列表及博主发出的回复(含自回复)。覆盖 X post and creator research,来自 SocialDataX 社媒数据助手。
source_client
socialdatax-skills
source_platform
clawhub
source_skill
socialdatax-x-twitter
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"}}

X / Twitter 数据助手 SocialDataX

Use this skill when the user needs an X / Twitter data assistant for post research, post details, comments, creator profiles, or creator post lists. Also use for replies authored by an X creator, including self-replies.

Current platform support:

  • X / Twitter replies authored by a creator through x_get_user_replies_by_*, including self-replies.

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

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

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

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

npx -y socialdatax-skills@latest x detail \
  --post-id "<post_id>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

npx -y socialdatax-skills@latest x detail \
  --post-url "<x_post_url_or_share_text>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

npx -y socialdatax-skills@latest x comments \
  --post-id "<post_id>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

npx -y socialdatax-skills@latest x comments \
  --post-url "<x_post_url_or_share_text>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

npx -y socialdatax-skills@latest x replies \
  --post-id "<post_id>" --comment-id "<comment_id>" --pretty \
  --source-client socialdatax-skills --source-platform clawhub \
  --source-skill socialdatax-x-twitter

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

npx -y socialdatax-skills@latest x user-info \
  --username "<username>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

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

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

npx -y socialdatax-skills@latest x user-posts \
  --username "<username>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

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

npx -y socialdatax-skills@latest x user-posts \
  --username "<username>" --all --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

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

npx -y socialdatax-skills@latest x user-replies \
  --username "<username>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

npx -y socialdatax-skills@latest x user-replies \
  --profile-url "<profile_url>" --pretty --source-client socialdatax-skills \
  --source-platform clawhub --source-skill socialdatax-x-twitter

Optional arguments:

  • --source-client socialdatax-skills --source-platform clawhub --source-skill socialdatax-x-twitter: usage attribution for this Agent Skill; keep these values unchanged when running examples from this Skill.

Use search for X / Twitter content research, detail for one post, comments/replies for discussion analysis, user-info for creator profiles, and user-posts for creator content lists. For replies, use the returned post_id together with the first-level comment_id. X creator replies: use x user-replies for replies authored by the creator, including self-replies; use x comments or x replies for discussions under a post. Choose exactly one of --user-id, --username, or --profile-url. Keep identity and the full returned token unchanged; user-posts tokens cannot be reused. An empty page with a nonempty token can continue. --since-days is not supported.

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:

  • x_search_posts
  • x_get_post_detail_by_post_id
  • x_get_post_detail_by_post_url
  • x_get_post_comments_by_post_id
  • x_get_post_comments_by_post_url
  • x_get_post_comment_replies_by_comment_id
  • x_get_user_info_by_user_id
  • x_get_user_info_by_username
  • x_get_user_info_by_profile_url
  • x_get_user_posts_by_user_id
  • x_get_user_posts_by_username
  • x_get_user_posts_by_profile_url
  • x_get_user_replies_by_user_id
  • x_get_user_replies_by_username
  • x_get_user_replies_by_profile_url

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.
  • If the CLI exits with status 1 and prints partial: true, preserve data.items and the error, and report incomplete results. This recovery rule overrides advice to rerun the original command. After resolving the error (including insufficient balance), resume only with a non-empty data.next_page_token and the same query parameters. Keep the original page and item limits: subtract cumulative page_count and item_count from the respective --pages and --max-items limits, if set. Stop parent-list pagination when either limit is reached. An empty token does not mean completion. Do not restart from the first page; investigate repeated-token errors before continuing.
  • 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.