← 返回 Skills 市场
futurizerush

Apify TikTok Comment Scraper

作者 Futurize Rush · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
100
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install apify-tiktok-comments
功能描述
This skill should be used when the user asks to "scrape TikTok comments", "get TikTok post comments", "extract comments from a TikTok video", "get TikTok rep...
使用说明 (SKILL.md)

TikTok Comment Scraper with Apify

Extract comments and replies from TikTok video and photo posts. Supports both top-level comments and threaded replies. No login required.

Actor: futurizerush/tiktok-comment-scraper

Prerequisites

Set APIFY_API_TOKEN in environment. Get a token at console.apify.com/account/integrations.

Execution Flow

Apify runs are asynchronous. Every request follows 3 steps:

  1. Start a run -- POST to the actor API, receive a run ID and dataset ID
  2. Poll until done -- GET the run status, wait for SUCCEEDED
  3. Fetch results -- GET the dataset items (returns a JSON array)

Typical run time: 15-60 seconds depending on comment count.

Input Parameters

Parameter Type Required Description
videoUrls array of strings Yes TikTok post URLs (video, photo, or short links). Max 50, must be unique.
maxCommentsPerVideo integer No Max top-level comments per post. Default: 100. Min: 1, Max: 5000
includeReplies boolean No Collect threaded replies. Default: true
maxRepliesPerComment integer No Max replies per comment. Default: 50. Min: 1, Max: 500

Complete Example (Python)

import requests, os, time

TOKEN = os.environ["APIFY_API_TOKEN"]
BASE = "https://api.apify.com/v2"

# Step 1: Start the run
response = requests.post(
    f"{BASE}/acts/futurizerush~tiktok-comment-scraper/runs?token={TOKEN}",
    json={
        "videoUrls": [
            "https://www.tiktok.com/@bellapoarch/video/6862153058223197445"
        ],
        "maxCommentsPerVideo": 20,
        "includeReplies": True,
        "maxRepliesPerComment": 10,
    },
)
response.raise_for_status()
run = response.json()["data"]
run_id = run["id"]
dataset_id = run["defaultDatasetId"]

# Step 2: Poll until done
while True:
    status = requests.get(
        f"{BASE}/actor-runs/{run_id}?token={TOKEN}"
    ).json()["data"]["status"]
    if status == "SUCCEEDED":
        break
    if status in ("FAILED", "ABORTED", "TIMED-OUT"):
        raise RuntimeError(f"Run failed: {status}")
    time.sleep(5)

# Step 3: Fetch results (JSON array)
items = requests.get(
    f"{BASE}/datasets/{dataset_id}/items?token={TOKEN}"
).json()

# Separate comments from replies
for item in items:
    prefix = "  Reply" if item["isReply"] else "Comment"
    print(f"{prefix} by @{item['username']}: {item['text'][:80]}")
    print(f"  likes={item['likeCount']} replies={item['replyCount']}")

Multiple videos

requests.post(
    f"{BASE}/acts/futurizerush~tiktok-comment-scraper/runs?token={TOKEN}",
    json={
        "videoUrls": [
            "https://www.tiktok.com/@bellapoarch/video/6862153058223197445",
            "https://www.tiktok.com/@charlidamelio/video/EXAMPLE123",
        ],
        "maxCommentsPerVideo": 50,
    },
)

Complete Example (bash)

# Step 1: Start the run
RUN_RESPONSE=$(curl -s -X POST \
  "https://api.apify.com/v2/acts/futurizerush~tiktok-comment-scraper/runs?token=$APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://www.tiktok.com/@bellapoarch/video/6862153058223197445"], "maxCommentsPerVideo": 20, "includeReplies": true}')

RUN_ID=$(echo "$RUN_RESPONSE" | jq -r '.data.id')
DATASET_ID=$(echo "$RUN_RESPONSE" | jq -r '.data.defaultDatasetId')

# Step 2: Poll until done
while true; do
  STATUS=$(curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_API_TOKEN" \
    | jq -r '.data.status')
  [ "$STATUS" = "SUCCEEDED" ] && break
  [ "$STATUS" = "FAILED" ] || [ "$STATUS" = "ABORTED" ] && echo "Failed: $STATUS" && exit 1
  sleep 5
done

# Step 3: Fetch results
curl -s "https://api.apify.com/v2/datasets/$DATASET_ID/items?token=$APIFY_API_TOKEN" | jq '.'

Output Format

Each item in the results array (field names verified from real API output on 2026-04-11):

Comment item:

{
  "commentId": "7604380245148189453",
  "text": "It happened, Leah Healton got more likes.",
  "createTime": "2026-02-08T06:39:49.000Z",
  "likeCount": 160671,
  "replyCount": 0,
  "isPinned": false,
  "isAuthorLiked": false,
  "userId": "7189081523688309806",
  "username": "kdarr1013",
  "nickname": "レイヴン",
  "avatarUrl": "https://p16-common-sign.tiktokcdn-us.com/...",
  "profileUrl": "https://www.tiktok.com/@kdarr1013",
  "isVerified": false,
  "parentCommentId": null,
  "isReply": false,
  "videoId": "6862153058223197445",
  "videoUrl": "https://www.tiktok.com/@bellapoarch/video/6862153058223197445",
  "collectedAt": "2026-04-11T06:07:23.985Z"
}

Reply item (same fields, different values):

{
  "commentId": "7192662943740297989",
  "text": "Hi! I'm from 2023",
  "parentCommentId": "6941063376386686982",
  "isReply": true,
  "likeCount": 1182,
  "replyCount": 0
}

Note: Field names use camelCase. Distinguish comments from replies using isReply. Replies have a non-null parentCommentId linking them to the parent comment.

Error Handling

Error Cause Fix
401 Unauthorized Invalid or missing API token Check APIFY_API_TOKEN
FAILED: "post(s) appear unavailable or private" Video is private or deleted Verify the video URL is public
No results Video has comments disabled Try a different video

Tips

  • Use isReply: false to filter top-level comments only.
  • Use parentCommentId to reconstruct comment threads.
  • Use isPinned: true to find creator-pinned comments.
  • Use isAuthorLiked: true to find comments the creator liked.
  • Supports video posts, photo posts, and short links (vm.tiktok.com).
  • URLs must be unique (no duplicates allowed).
  • No login or session ID required.

Links

安全使用建议
This skill appears to be what it says (it uses an Apify actor to scrape TikTok comments), but the SKILL.md requires an APIFY_API_TOKEN while the registry metadata incorrectly lists no required env vars. Before installing: (1) be prepared to provide an APIFY_API_TOKEN; (2) verify the Apify actor owner and review the actor's page and terms (futurizerush/futurizerush~tiktok-comment-scraper) to understand data retention, billing, and what exactly is scraped; (3) consider using a token scoped/limited to your needs and avoid providing other credentials; (4) test with non-sensitive public videos first; and (5) confirm legal/privacy implications of scraping TikTok content in your jurisdiction. The main issue here is metadata inaccuracy (missing credential declaration) rather than obviously malicious behavior.
功能分析
Type: OpenClaw Skill Name: apify-tiktok-comments Version: 0.1.0 The skill is a standard integration for the Apify platform to scrape TikTok comments using the 'futurizerush/tiktok-comment-scraper' actor. It follows legitimate API patterns (POST to start, GET to poll and fetch) using the official 'api.apify.com' endpoint and requires a user-provided 'APIFY_API_TOKEN'. No malicious code, obfuscation, or harmful prompt injection attempts were detected.
能力评估
Purpose & Capability
The name and description (TikTok comment scraping) match the SKILL.md content which documents calling an Apify actor (futurizerush/tiktok-comment-scraper). Requiring an Apify API token is consistent with calling Apify actors, so the capability aligns with the purpose. However, the registry metadata does not declare the APIFY_API_TOKEN requirement, which is an incoherence.
Instruction Scope
SKILL.md gives concrete, narrow instructions: start an Apify actor run, poll its status, and fetch dataset items from Apify. The instructions do not ask to read arbitrary local files or other credentials. Minor contradiction: the doc header says "No login required" (likely referring to TikTok), but the Prerequisites section explicitly requires APIFY_API_TOKEN — this should be clarified.
Install Mechanism
This is instruction-only with no install spec and no code files, so nothing is written to disk and no external packages are installed by the skill itself.
Credentials
The instructions require the APIFY_API_TOKEN (sensitive credential) to call Apify, which is reasonable for this integration. The problem is that the skill's declared requirements list does not include this env var — the manifest claims "Required env vars: none" but the runtime docs and examples rely on APIFY_API_TOKEN. That mismatch is a concrete coherence issue and a potential user-surprise / privilege concern.
Persistence & Privilege
The skill is not marked always:true and is user-invocable only. It does not request persistent system privileges or modify other skills. Autonomous invocation is allowed by platform default, which is expected — no additional persistence privileges are requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install apify-tiktok-comments
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /apify-tiktok-comments 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release. Extract comments and replies from TikTok posts.
元数据
Slug apify-tiktok-comments
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Apify TikTok Comment Scraper 是什么?

This skill should be used when the user asks to "scrape TikTok comments", "get TikTok post comments", "extract comments from a TikTok video", "get TikTok rep... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 100 次。

如何安装 Apify TikTok Comment Scraper?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install apify-tiktok-comments」即可一键安装,无需额外配置。

Apify TikTok Comment Scraper 是免费的吗?

是的,Apify TikTok Comment Scraper 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Apify TikTok Comment Scraper 支持哪些平台?

Apify TikTok Comment Scraper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Apify TikTok Comment Scraper?

由 Futurize Rush(@futurizerush)开发并维护,当前版本 v0.1.0。

💬 留言讨论