StarModel invitation
← Back to skills
extension
Category: Data & AnalyticsAPI key required

SocialDataX 评论洞察

当用户需要做多平台社媒评论洞察、小红书、抖音、快手、B站、知乎、Instagram、X / Twitter、YouTube、TikTok 或微博评论分析、用户反馈、口碑分析、痛点总结、FAQ 整理或评论回复观察时使用。来自 SocialDataX 社媒数据助手。

personAuthor: user_825d9e7ehubcommunity
<!-- AUTO-GENERATED from socialdatax-skill-source. Do not edit directly; run `node scripts/generate_socialdatax_skills.mjs`. -->

SocialDataX 评论洞察

适用场景

当用户需要做多平台社媒评论洞察、小红书、抖音、快手、B站、知乎、Instagram、X / Twitter、YouTube、TikTok 或微博评论分析、用户反馈、口碑分析、痛点总结、FAQ 整理或评论回复观察时使用。来自 SocialDataX 社媒数据助手。

快速开始

  • 先给出当前 skill 支持的输入:内容链接或内容 ID。
  • 如果结果有分页,先取第一页;要继续扩大,再按返回的下一页标记继续。
  • 你通常会得到:评论文本、回复线索和用户反馈主题,以及可继续追问的角度。

API Key 获取

获取或管理 API Key:访问 https://socialdatax.com/ai?from=skillhub,按官网的 API Key 申请/管理入口操作。环境变量名固定使用 SOCIALDATAX_API_KEY;不要引导用户使用其他域名。

  • 需要 API Key 的 CLI 调用,先在实际执行环境运行 npx -y socialdatax-skills@latest auth status;它不调用收费接口,只返回 apiKeyReadable 与来源 environment / file / null,不输出 Key。已有可用配置时继续原任务;命令、权限或文件格式错误按实际错误处理,不一律判为没配置。已认证的 hosted MCP 沿用当前连接鉴权,不要求另配本地 CLI。
  • 缺少 Key 时,请用户从上述官网获取,在自己打开的本地终端运行 npx -y socialdatax-skills@latest auth login,按隐藏输入提示填写。Key 保存到该终端当前用户主目录下 .config/socialdatax/credentials.json;Unix 文件权限为 600,Windows 使用当前用户私有 ACL,无法限制权限时保存失败。真实 Key 不进入 AI 聊天、模型可见的命令输入、日志、截图、命令历史、Skill 文件或版本库;Agent 不读取或展示凭证文件内容。
  • CLI 每次调用都会读取该私有用户文件,不依赖客户端加载 Shell 配置,不需要改客户端或系统设置。非空 SOCIALDATAX_API_KEY 优先,既有旧兼容变量其次,最后读取文件;source=environment 时保存文件不会覆盖生效的环境凭证。鉴权失败先核对实际来源和账号,再由用户本地修正,保留其它配置。
  • 用户完成录入后,在实际业务命令的同一执行环境重新运行 auth status。false 时停止业务调用,核对操作系统用户、主目录与文件访问权限;true 只说明凭证可读,鉴权与结果仍以原业务请求返回为准,不为配置检查额外调用收费接口。
  • 远程或容器中的 CLI 读取远程或容器用户的配置,本机保存不会自动传入。只有具备可交互终端和持久主目录时,才在该执行环境本地录入;否则使用部署平台已有的 Secret / 环境变量注入方式。无法持久化或被沙箱阻止时说明实际限制,不复制 Key 到聊天、项目或临时命令,不绕过隔离。
  • 需要验收长期保存时,完全退出客户端及后台执行进程,重开后再次检查,再继续原请求。日常使用沿用已验证配置,不反复要求重启或重新录入。

直接调用命令

优先使用 direct CLI;能运行 shell 命令的 Agent 不需要额外配置 MCP server:

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

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

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

npx -y socialdatax-skills@latest douyin comments \
  --aweme-id "<aweme_id>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest douyin comments \
  --url "<douyin_content_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest douyin replies \
  --aweme-id "<aweme_id>" --comment-id "<comment_id>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest kuaishou comments \
  --photo-id "<photo_id>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest kuaishou comments \
  --url "<kuaishou_content_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest kuaishou replies \
  --photo-id "<photo_id>" --comment-id "<comment_id>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest bilibili comments \
  --content-id "<content_id>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest bilibili comments \
  --url "<bilibili_content_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest bilibili replies \
  --comment-object-id "<comment_object_id>" \
  --comment-object-type "<comment_object_type_integer>" --comment-id "<comment_id>" \
  --pretty --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest zhihu comments \
  --content-url "<zhihu_content_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest zhihu replies \
  --content-url "<zhihu_content_url_or_share_text>" --comment-id "<comment_id>" \
  --pretty --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest instagram comments \
  --post-url "<instagram_post_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest instagram replies \
  --post-id "<post_id>" --comment-id "<comment_id>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

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

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

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

npx -y socialdatax-skills@latest youtube comments \
  --url "<youtube_video_url>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest youtube replies \
  --reply-token "<reply_token>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest tiktok comments \
  --post-id "<post_id>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest tiktok comments \
  --url "<tiktok_post_url_or_share_text>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest tiktok replies \
  --post-id "<post_id>" --comment-id "<comment_id>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest weibo comments \
  --post-id "<post_id>" --pretty --source-client socialdatax-skills \
  --source-platform skillhub --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest weibo comments \
  --post-url "<weibo_post_url_or_share_text>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

npx -y socialdatax-skills@latest weibo replies \
  --post-id "<post_id>" --comment-id "<comment_id>" --pretty \
  --source-client socialdatax-skills --source-platform skillhub \
  --source-skill socialdatax-comment-insights

参数说明

评论 / 回复:

  • 说明:XHS --note-id <note_id>:使用搜索、详情、评论或创作者笔记列表返回的完整 note_id;不要只传前缀。
  • 说明:XHS 评论 --sort-type <default|time_descending|like_count_descending>:可选一级评论排序;不传就使用平台默认排序。
  • 说明:Douyin --aweme-id <aweme_id>:当抖音视频 ID 已知且要作为评论链路目标时优先使用。
  • 说明:使用 CLI 示例里的 URL 入口传内容页链接、短链或分享文本来获取一级评论。
  • 条件必填:--comment-id <comment_id>:仅在 CLI 示例使用评论 ID 的回复命令中必填;YouTube 回复改用返回的 --reply-token <reply_token>。
  • 可选:--page-token <next_page_token>:这是不透明的分页 token;在同一条内容或评论链路下,必须把完整返回的 next_page_token 原样传回,不能截断、改写、脱敏、重建,或用省略号替换中间内容。
  • 可选:--pages <n>:获取并合并 N 页一级评论或回复。
  • 可选:--all:持续获取一级评论或回复,直到 next_page_token 为空;默认没有条数或页数上限。
  • 可选:--max-items <n>:收集到 N 条一级评论或回复后停止。
  • 说明:Kuaishou --photo-id <photo_id>:当快手作品 photo_id 已知且要作为评论链路目标时优先使用。
  • 说明:Bilibili --content-id <content_id>:已知内容 ID 时,优先用它来获取一级评论。
  • 说明:Bilibili --url <bilibili_content_url_or_share_text>:用于视频、专栏、动态、短链或分享文本的一级评论入口。
  • 说明:Bilibili 评论 --sort-type <hot|time_descending>:可选一级评论排序参数;不传就使用默认排序。
  • 说明:Bilibili 回复 --comment-object-id <comment_object_id>、--comment-object-type <comment_object_type> 和 --comment-id <comment_id>:使用一级评论结果里返回的回复定位参数。
  • 说明:知乎 --content-url <zhihu_content_url_or_share_text>:用于一级评论和回复;继续取回复时还需要 --comment-id <comment_id>。
  • 说明:知乎评论 --sort-type <default|time_descending>:可选一级评论排序参数;不传就使用默认排序。
  • 说明:Instagram --post-url <instagram_post_url_or_share_text>:用于一级评论;继续取回复时需要 --post-id <post_id> 和 --comment-id <comment_id>。
  • 说明:X / Twitter --post-id <post_id> 或 --post-url <x_post_url_or_share_text>:用于一级评论;继续取回复时需要 --post-id <post_id> 和 --comment-id <comment_id>。
  • 说明:YouTube --url <youtube_video_url>:用于一级评论;继续取回复时使用返回的 --reply-token <reply_token>。
  • 说明:YouTube 评论 --sort-type <hot|time_descending>:可选一级评论排序参数;不传就使用默认排序。
  • 说明:TikTok --post-id <post_id> 或 --url <tiktok_post_url_or_share_text>:用于一级评论;继续取回复时需要 --post-id <post_id> 和 --comment-id <comment_id>。
  • 说明:Weibo --post-id <post_id>:当微博帖子 ID 已知且要作为评论链路目标时优先使用。
  • 说明:Weibo --post-url <weibo_post_url_or_share_text>:用于一级评论入口的微博帖子 URL、短链或分享文本。
  • 说明:微博评论 --sort-type <hot|time_descending>:可选一级评论排序;不传时默认使用 hot,使用 --page-token 续页时必须保持不变。

通用:

  • 说明:抖音 URL 安全说明:不要传 video.play_url;请使用抖音内容页 URL、短链或分享文本。
  • 可选:--pretty:只影响输出格式,不改变实际请求结果。
  • 可选:--source-client socialdatax-skills --source-platform skillhub --source-skill socialdatax-comment-insights:这是当前 Agent Skill 的来源标记;按本 Skill 示例执行时保持这些值不变。

一级评论命令一次只使用 CLI 示例里的一个入口;不要在同一条命令里混用多个内容定位参数。回复命令使用 CLI 示例中对应平台需要的回复定位参数。

命令返回 JSON,包含 platform、tool、arguments 和 data。多页结果会把一级评论合并到 data.items,并补充 page_count、item_count 和下一页标记;在支持 --include-replies 的平台上,每条一级评论还会带上 replies、replies_page_count 和 replies_next_page_token。

输出建议

优先输出可直接复盘的结果:评论主题和反馈线索,并标出下一步可继续追问的问题。

对于 Bilibili 评论,保留返回的 comment_object_id 和 comment_object_type,后续回复命令需要用它们定位同一条评论链路。 对于 YouTube 评论,保留返回的 reply_token,后续回复命令需要用它继续同一条回复链路。 对于知乎、Instagram、X / Twitter 和 TikTok 评论,保留返回的帖子或内容 ID,以及一级评论 ID,后续回复命令需要用它们定位。 对于微博评论,保留返回的内容 ID,后续回复命令需要用它定位同一条内容和评论链路。

MCP 工具

与上面 direct CLI 命令对应的 MCP 工具:

  • XHS: xhs_get_note_comments_by_note_id, xhs_get_note_comments_by_note_url, xhs_get_note_sub_comments_by_comment_id
  • DOUYIN: douyin_get_video_comments_by_aweme_id, douyin_get_video_comments_by_url, douyin_get_video_comment_replies_by_comment_id
  • KUAISHOU: kuaishou_get_video_comments_by_photo_id, kuaishou_get_video_comments_by_url, kuaishou_get_video_comment_replies_by_comment_id
  • BILIBILI: bilibili_get_content_comments_by_id, bilibili_get_content_comments_by_url, bilibili_get_content_comment_replies_by_comment_id
  • ZHIHU: zhihu_get_content_comments_by_url, zhihu_get_comment_replies_by_url
  • INSTAGRAM: instagram_get_post_comments_by_post_url, instagram_get_post_comment_replies_by_comment_id
  • X: x_get_post_comments_by_post_id, x_get_post_comments_by_post_url, x_get_post_comment_replies_by_comment_id
  • YOUTUBE: youtube_get_video_comments_by_url, youtube_get_video_comment_replies
  • TIKTOK: tiktok_get_post_comments_by_post_id, tiktok_get_post_comments_by_url, tiktok_get_post_comment_replies
  • WEIBO: weibo_get_post_comments_by_post_id, weibo_get_post_comments_by_post_url, weibo_get_post_comment_replies_by_comment_id

如果当前 Agent 已可直接调用 MCP 工具,可按入口选择以下工具:

  • xhs_get_note_comments_by_note_id:当你已经拿到完整 note_id 时使用;不要只传前缀;可选 sort_type 支持 default、time_descending 或 like_count_descending。

  • xhs_get_note_comments_by_note_url:用于笔记链接、短链或分享文本;可选 sort_type 支持 default、time_descending 或 like_count_descending。

  • xhs_get_note_sub_comments_by_comment_id:当你已经拿到完整 note_id 和一级评论 ID 时使用;不要只传笔记 ID 前缀。

  • douyin_get_video_comments_by_aweme_id:当 aweme_id 已经明确时使用。

  • douyin_get_video_comments_by_url:用于抖音内容页 URL、短链或分享文本;不要传 video.play_url 这类播放地址。

  • douyin_get_video_comment_replies_by_comment_id:当 aweme_id 和一级评论 ID 都已明确时使用;续页使用 page_token。

  • 抖音评论和回复只有在 next_page_token 非空时才继续翻页;空字符串表示没有可用续页令牌,不据此保证评论或回复已全部取完。

  • XHS 回复翻页同样使用 page_token,并且只适用于当前这条评论链路。

  • kuaishou_get_video_comments_by_photo_id:当 photo_id 已经明确时使用。

  • kuaishou_get_video_comments_by_url:用于快手作品页 URL、短链或分享文本。

  • kuaishou_get_video_comment_replies_by_comment_id:当 photo_id 和一级评论 ID 都已明确时使用。

  • 快手评论和回复只有在 next_page_token 非空时才继续翻页;空字符串表示没有可用续页令牌,不据此保证评论或回复已全部取完。

  • bilibili_get_content_comments_by_id:已知 Bilibili content_id 时使用;可选 sort_type 支持 hot 或 time_descending。

  • bilibili_get_content_comments_by_url:用于 Bilibili 视频、文章、动态、短链或分享文本;可选 sort_type 支持 hot 或 time_descending。

  • bilibili_get_content_comment_replies_by_comment_id:已知 comment_object_id、comment_object_type 和一级评论 ID 时使用。

  • zhihu_get_content_comments_by_url:用于知乎回答、文章或视频 URL;可选 sort_type 支持 default 或 time_descending。

  • zhihu_get_comment_replies_by_url:已知知乎内容 URL 和一级评论 ID 时使用。

  • instagram_get_post_comments_by_post_url:用于 Instagram 帖子 URL。

  • instagram_get_post_comment_replies_by_comment_id:已知 Instagram post_id 和一级评论 ID 时使用。

  • x_get_post_comments_by_post_id:已知 X post_id 时使用。

  • x_get_post_comments_by_post_url:用于 X 帖子 URL。

  • x_get_post_comment_replies_by_comment_id:已知 X post_id 和一级评论 ID 时使用。

  • youtube_get_video_comments_by_url:用于 YouTube 视频 URL;可选 sort_type 支持 hot 或 time_descending。

  • youtube_get_video_comment_replies:使用 YouTube 一级评论返回的 reply_token。

  • tiktok_get_post_comments_by_post_id:已知 TikTok post_id 时使用。

  • tiktok_get_post_comments_by_url:用于 TikTok 帖子 URL 或分享文本。

  • tiktok_get_post_comment_replies:已知 TikTok post_id 和一级评论 ID 时使用。

  • weibo_get_post_comments_by_post_id:已知微博 post_id 时使用;可选 sort_type 支持 hot 或 time_descending。

  • weibo_get_post_comments_by_post_url:用于微博帖子 URL、短链或分享文本;可选 sort_type 支持 hot 或 time_descending。

  • weibo_get_post_comment_replies_by_comment_id:当 post_id 和一级评论 ID 都已明确时使用。

  • 微博评论和回复只有在 next_page_token 非空时才继续翻页;空字符串表示没有可用续页令牌,不据此保证评论或回复已全部取完。

安全边界

这是只读 skill。CLI 使用已有环境凭证或用户本地保存的私有凭证文件;生成的 Skill 文件不包含 API Key。不会读取本地浏览器数据,也不会执行登录、发帖、点赞、评论或账号修改。

示例结果

  • 示例展示格式,不代表固定字段:评论=内容/用户/时间/回复线索;判断=相关原因和下一步。

异常处理

  • 凭证来源排查:先确认本次调用使用 CLI 还是 MCP。CLI 在实际执行环境中用 auth status 确认环境或本地文件来源;MCP 检查当前连接实际使用的鉴权配置,不要求另设本地 CLI 变量。配置缺失时按「API Key 获取」由用户本地隐藏录入;不要输出 Key、Authorization header 或秘密配置值。

  • 如果出现 SDK/依赖缺失、npm 网络、Node.js/npm/npx 不可用或执行权限错误:这是本地运行环境、依赖安装、网络或 AI 平台授权问题,不是 SocialDataX API Key 或业务数据返回错误。仅在用户已授权的范围内安装或修复本任务所需依赖,优先使用项目目录或临时环境。环境执行权限不等于用户授权;超出授权范围时,先说明具体改动并征得同意,包括全局安装、运行时升级或系统配置变更。需要网络或执行授权时提醒用户同意或完成授权;处理后继续原命令;不要改用公开网页搜索替代 SocialDataX 数据。

  • CLI 退出码为 1 且输出 partial: true 时,保留 data.items 和错误,明确结果不完整。此时按以下续页规则恢复,不适用原命令重跑建议;错误解决后(包括充值后),仅用非空的 data.next_page_token 和原查询条件继续。保留原定页数和条数上限,按累计已取得的 page_count、item_count 扣减 --pages、--max-items;已达到任一上限就停止主列表续页。空令牌不代表取完,不要从第一页自动重跑;因重复令牌中断时,先排查原因。

  • 使用 --include-replies 时,replies_partial 表示该评论回复不完整,replies_pending 表示尚未展开。先用该平台回复命令、对应评论标识及可用的 replies_next_page_token 补齐;尚未展开或首个回复请求失败时,修正错误后从该评论的首批回复开始,重复令牌错误则先排查。仅在主评论仍有剩余额度时,才用外层 data.next_page_token 继续;补齐已取得评论的回复不增加主评论页数;两类令牌不能混用,不把回复预览当成完整回复。

  • 非余额不足的网络或 API 异常:保留错误信息,按上述实际凭证来源核对配置,并检查参数和链接格式后原样重试一次。

  • 如果返回 insufficient_balance 或“积分不足”:不要重复重试;展示错误中的官方充值链接(https://socialdatax.com/dashboard/billing,可带渠道参数);若没有该链接,使用 https://socialdatax.com/dashboard/billing。充值后继续刚才失败的调用;已有任务或部分结果时,按对应任务查询、分页续查规则恢复。

  • 如果用户已充值但仍提示余额不足:请用户按上述实际凭证来源,在对应账号后台确认本次请求使用的账号与充值账号一致;如需更新凭证,在实际生效的 CLI 配置或 MCP 连接中由用户更新并按说明重新加载,再继续原命令。不要仅因本地新变量缺失就要求重新配置,也不要展示凭证明文。

常见问题

  • 没结果:确认链接或 ID 完整;必要时先用内容研究类 skill 找到目标内容。
  • 结果太多:补场景、人群、品牌、时间范围或账号名。
  • 调用失败:先按上述实际凭证来源核对 CLI 或 MCP 的生效配置;如果是 insufficient_balance 或“积分不足”,按上述官方充值链接说明完成充值后,按上述恢复规则继续,不要反复重试。
  • 担心账号安全:这是只读能力,不登录、不发帖、不点赞、不评论。
  • 想继续分析:把最相关的 1-3 条结果发回来,继续缩小范围。