浏览器

scraping-tiktok-comments

试用

Scrapes comments from any TikTok video using apidojo's TikTok Comments scraper on Apify. Triggers when the user asks to: get all comments on a TikTok video, export TikTok comment data, scrape what viewers are saying on a TikTok post, fetch comment text and likes from a TikTok URL, collect TikTok comment threads for analysis, or download comments from a viral TikTok video. Returns commenter username, comment text, like count, reply count, and timestamp per comment. Ideal for sentiment analysts, brand monitors, and content researchers.

它能做什么

Scrapes comments from any TikTok video using apidojo's TikTok Comments scraper on Apify. Triggers when the user asks to: get all comments on a TikTok video, export TikTok comment data, scrape what viewers are saying on a TikTok post, fetch comment text and likes from a TikTok URL, collect TikTok comment threads for analysis, or download comments from a viral TikTok video. Returns commenter username, comment text, like count, reply count, and timestamp per comment. Ideal for sentiment analysts, brand monitors, and content researchers.

技能文档

Scraping TikTok Comments

Exports all comments from any TikTok video URL. Returns the raw comment dataset for sentiment analysis, community research, or product feedback extraction.

Prerequisites

  • APIFY_TOKEN environment variable set
  • Optional: Apify MCP server installed

Inputs

ParameterTypeRequiredDefaultNotes
startUrlsarray[]TikTok video URLs to scrape comments from
includeRepliesbooleanOptionalfalseInclude reply comments (nested)
maxItemsnumberOptionalUnlimitedMaximum comments to return
customMapFunctionstringOptionalJavaScript function to transform each output object

Workflow

Progress:
- [ ] Step 1: Validate video URLs
- [ ] Step 2: Run tiktok-comments-scraper
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Deliver comment dataset

Step 2: Run the Actor

Recommended — run_actor.js (handles waiting, output, and file saving automatically):

# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~tiktok-comments-scraper" \
  --input '{"param": "value"}'

# Save as CSV
node scripts/run_actor.js \
  --actor "apidojo~tiktok-comments-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.csv --format csv

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~tiktok-comments-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.json --format json

APIFY_TOKEN must be set in environment or .env file.

If Apify MCP is available:

Tool: apify:run-actor
Actor: "apidojo~tiktok-comments-scraper"
Input:
{
  "videoUrls": ["https://www.tiktok.com/@user/video/123456"],
  "maxItems": 200,
  "includeReplies": false
}

REST API fallback:

curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tiktok-comments-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": [""], "maxItems": 200}'

Save id as RUN_ID. Poll until status = SUCCEEDED:

curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'

Fetch results:

curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"

Step 3: Handle Edge Cases

  • 0 comments: Video may have comments disabled or be private. Report to user.
  • Video deleted or unavailable: Actor returns error — remove URL from batch and notify.
  • Comment count less than expected: TikTok filters spam comments server-side; this is expected.

Output Format

# TikTok Comment Dataset
Video:  | Comments collected: N | Includes replies: YES/NO

| Comment ID | Author | Text | Likes | Replies | Timestamp |
|------------|--------|------|-------|---------|-----------|
| ...        | ...    | ...  | ...   | ...     | ...       |

Available fields: id, text, authorUsername, diggCount, replyCount, createTime,
isReply, parentCommentId

Troubleshooting

Comments disabled: Creator has disabled comments — no workaround. Truncated comments: Some comments may be cut off by TikTok's API; full text available via video page.

相关技能

Extracts and analyzes TikTok comments from any video or creator using apidojo's TikTok Comments scraper on Apify. Triggers when the user asks to: scrape TikTok comments from a video, analyze what viewers say about a TikTok post, extract comment data for sentiment analysis, find top comments on a viral TikTok video, collect TikTok user feedback from comments, build a dataset of TikTok community reactions, study audience sentiment on TikTok content, or research what a target audience cares about from TikTok comments. Returns commenter username, comment text, likes on comment, reply count, and timestamp. Ideal for market researchers, brand managers, content creators, and academic researchers.

1 次安装

Scrapes comments from any YouTube video using apidojo's YouTube scraper on Apify. Triggers when the user asks to: get all comments on a YouTube video, export YouTube comment data, scrape what viewers say about a YouTube video, fetch comment text and likes from a YouTube URL, collect comment threads from a YouTube video, or download audience feedback from a YouTube video. Returns commenter username, comment text, like count, reply count, and timestamp per comment. Ideal for sentiment researchers, product teams, and content analysts.

1 次安装

Scrapes TikTok videos for any hashtag or keyword using apidojo's TikTok scraper on Apify. Triggers when the user asks to: get all TikTok videos for a hashtag, scrape TikTok content by topic or tag, export TikTok video data for a keyword, fetch TikTok posts under a challenge or trend, collect TikTok video metrics for a hashtag, or download TikTok video metadata by tag. Returns video URL, view count, like count, comment count, share count, author handle, caption, and timestamp per video. Ideal for trend researchers, data analysts, and social media teams.

1 次安装

Scrapes detailed TikTok user data and recent video history using apidojo's TikTok User scraper on Apify. Triggers when the user asks to: get all videos from a TikTok account, fetch a TikTok creator's recent posts and stats, export a TikTok user's video history, scrape all TikTok content from a specific creator, get TikTok post data by username, or collect video-level metrics from a TikTok profile. Returns per-video view count, likes, comments, shares, captions, and timestamps for a given account. Ideal for creator analysis, content auditing, and competitive benchmarking.

1 次安装

Look up TikTok profiles, search videos and users, explore hashtags, read comments, and traverse the social graph (followers/followings). Eleven endpoints, all at 1 credit per request.

Get TikTok video detail data and comments from a known TikTok video URL with the official Gecho Bridge MCP tool. Use when the user wants one video's metadata, comments, replies, or engagement context, not keyword video search.

1 次安装