TikTok Comments Scraper avatar

TikTok Comments Scraper

Pricing

from $0.20 / 1,000 results

Go to Apify Store
TikTok Comments Scraper

TikTok Comments Scraper

Scrape comments from TikTok videos by URL, one row per comment with text, likes, reply count and author, in Clockworks TikTok Comments Scraper field names. Includes TikTok's purchase-intent flags where Tokfluence captured them.

Pricing

from $0.20 / 1,000 results

Rating

0.0

(0)

Developer

Tokfluence Tiktok API

Tokfluence Tiktok API

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Give it TikTok video URLs and it returns the comments on those videos, one row per comment. Rows use the same field names as Clockworks' TikTok Comments Scraper (cid, text, diggCount, uniqueId, repliesToId, ...). Full reply threads, profile inputs and error rows are not supported, so read the sections below before you point an existing pipeline at it.

What it returns

One comment row per comment, in the Clockworks comment row shape. Filled when we have the comment:

  • cid, text, createTime, createTimeISO
  • diggCount (likes) and replyCommentTotal (replies TikTok reports for the comment)
  • uid, uniqueId and avatarThumbnail for the comment's author
  • likedByAuthor and pinnedByAuthor
  • mentions (as @handle) and detailedMentions
  • videoWebUrl, plus submittedVideoUrl and input, which echo the URL you entered
  • repliesToId on a reply: the id of the comment it sits under

TikTok's purchase-intent flags

TikTok tags some comments with purchase-intent signals. Tokfluence captures them when it scrapes a comment; Clockworks' rows do not include them. They sit under tokfluence:

  • tokfluence.is_high_purchase_intent: TikTok's own high-purchase-intent flag on the comment
  • tokfluence.ecom_intent: TikTok marked a search keyword in the comment as e-commerce intent

These are TikTok's labels, passed through as they were when we scraped the comment. We do not add our own classification. Treat them as a signal to filter on, not a verdict. They are null for comments stored before we captured them.

The other tokfluence fields:

  • tokfluence.is_author_reply: the video's creator wrote this comment
  • tokfluence.text_language: the comment's language as TikTok reports it
  • tokfluence.scraped_at: when Tokfluence scraped this comment, so you can judge how fresh it is

Inputs

  • TikTok video URLs (postURLs): up to 20 per run, in the full https://www.tiktok.com/@user/video/<id> form. Short links (vm.tiktok.com/...) are not supported yet; the run names any it could not use.
  • Maximum comments per post (commentsPerPost, default 100, up to 1000): replies count toward it, as on Clockworks. See "Which comments you get" below.
  • Maximum replies per comment (maxRepliesPerComment, default 0): see Replies below.
  • Max results (maxResults): a cap on the whole run, across all videos.

Clockworks' topLevelCommentsPerPost and its profile inputs (scraping comments from a creator's latest videos) are not supported.

Which comments you get

For each post you get the comments we hold, oldest first, up to Maximum comments per post. Replies are in that count even when Maximum replies per comment is 0: they take their place in the per-post limit first and are dropped afterwards, so a post can return fewer top-level comments than the limit you set.

Replies

Not fully supported yet. When TikTok loads a video's comments it includes the first few replies under each one, and those are what we return. We do not open each comment's full reply thread. So maxRepliesPerComment caps what we have, but a comment with 40 replies can come back with far fewer. When you ask for replies and the run comes back short, its status message says this is why. replyCommentTotal still shows TikTok's full reply count.

Fresh or fast: the Mode setting

Under Advanced, mode trades freshness for speed:

  • auto (default): serves comments Tokfluence already stores when they were scraped in the last 7 days, and scrapes TikTok live for the rest. Most runs want this.
  • database: fastest. Never scrapes. It only covers videos whose comments Tokfluence has already scraped; any other video is reported as not found. What you get is as old as our last scrape (check tokfluence.scraped_at).
  • live: always scrapes TikTok now. Freshest, and slow.

Live comment scraping is slow. We load comments the way a browser does, scrolling the comment panel, for up to 12 minutes per video, and stop early when TikTok stops loading more. Videos are scraped one after another, on Tokfluence's shared scraping workers, behind other live requests, so a live run over several videos can take a long time. Raise the run's timeout for live runs over many videos. A video whose comments do not all load within the 12 minutes comes back partial.

If a live scrape outlasts the run's timeout, the run fails with the request id. The scrape keeps going and is stored when it finishes, so a database run shortly afterwards returns those comments without scraping again.

Fields that can be null

This actor never fills a gap itself: when we do not have a field it is null, not 0, false or an empty string. One exception comes from how Tokfluence stores comments: diggCount and replyCommentTotal are 0, and likedByAuthor and pinnedByAuthor are false, when TikTok's comment data left them out.

Always null today:

  • detailedMentions[].nickName and detailedMentions[].postUrl: not captured

Sometimes null:

  • detailedMentions[].id and detailedMentions[].secUid: filled only when TikTok tagged the mention with the account
  • tokfluence.is_high_purchase_intent, tokfluence.ecom_intent, likedByAuthor, pinnedByAuthor: null on comments stored before we captured them
  • uid, uniqueId, avatarThumbnail: null if TikTok returned no author for the comment

avatarThumbnail is TikTok's signed image URL and stops working after a while; copy the image if you need to keep it.

Zero or short results

When a run returns nothing, or fewer comments than maxResults, it still succeeds, but it logs a warning and sets the run's status message to the likely cause: videos we could not find, database mode (which never scrapes), a short link we could not use, a per-post limit too low to reach maxResults, replies, or a live scrape that stopped early. Fix the one it names and run again.

The actor uses one Tokfluence account for every run. If that account is out of API credits, or Tokfluence's scrape service is down, the run fails with a message saying so. You are charged only for rows already in the dataset.

What Tokfluence keeps from a run

Tokfluence logs every request the actor makes: the URLs, the mode, where each row was served from, and a reference made of a one-way hash of your Apify user id plus the run id. Every TikTok handle and hashtag in your URLs and in the returned comments, commenters included, is recorded as a candidate for Tokfluence's creator discovery. Every video scraped live is stored in Tokfluence with its comments like any other scrape, and later runs, anyone's, can be served that stored copy.

Memory

The actor defaults to 256 MB and allows up to 512 MB. It makes one API call, maps the rows and writes them to the dataset in batches of 100.

Pricing

PLACEHOLDER (Daniel): pay per result, one result event per dataset row. Price to be set in Console at publish.

If your plan's remaining budget covers fewer rows than you asked for, the actor collects up to that ceiling, says so in the log, and stops cleanly rather than returning a silently short list.

Notes

Data comes from public TikTok pages, scraped and stored by Tokfluence. You are the data controller for anything you export; follow GDPR and any local rules that apply to you. More at Tokfluence.