TikTok Video Comments Scraper
Pricing
from $0.04 / 1,000 comments
TikTok Video Comments Scraper
Extract every comment of TikTok videos, with the replies, and the video details. Returns structured data: comment text, author, likes, reply count, time and replies, plus video stats (views, likes, shares).
Pricing
from $0.04 / 1,000 comments
Rating
0.0
(0)
Developer
Kai
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
15 days ago
Last modified
Categories
Features
Share
TikTok Video Comments Scraper - Comments, Replies and Video Stats
Get the comments of TikTok videos, with their replies, together with the details and stats of each video. Start with video URLs, or with profile URLs to read the videos of a profile. Each comment and each reply is one item in the Dataset. Each video also has one item in the Videos dataset, with its description, author, music, and counts of views, likes, comments, shares, and saves.
Read a sample of comments or every available comment. Run many videos in one run.
Use cases
Audience sentiment and topic research
Read what viewers say about a video. Send the comments to your own models.
{"videoUrls": ["https://www.tiktok.com/@nasa/video/7700397098994273549"],"maxCommentsPerVideo": 0}
Use text, textLanguage, likes, type, repliesToId, and createTime in
the Dataset.
Creator engagement
See which comments the creator wrote, pinned, or liked.
{"videoUrls": ["https://www.tiktok.com/@nasa/video/7700397098994273549"],"maxCommentsPerVideo": 200}
Use isByCreator, isPinned, isLikedByCreator, and mentions in the Dataset.
Creator and brand monitoring
Track how the videos of a creator grow and what viewers say. Run the same input on an Apify schedule, and compare the results over time.
{"profileUrls": ["https://www.tiktok.com/@nasa"],"videosPerProfile": 5,"maxCommentsPerVideo": 100}
Use video.stats.views, video.stats.likes, video.stats.shares,
video.stats.saves, and serverTotal in the Videos dataset. Use the cid of
each comment in the Dataset to find new comments.
Content performance comparison
Compare several videos in one run.
{"videoUrls": ["https://www.tiktok.com/@nasa/video/7700397098994273549","https://www.tiktok.com/@mrbeast/video/7296168512408603947"],"maxCommentsPerVideo": 50}
Use video.desc, video.author.uniqueId, video.stats, and serverTotal in
the Videos dataset. Use videoId to join the two datasets.
Choose what to collect
| Goal | Input | Result |
|---|---|---|
| All comments of a video | maxCommentsPerVideo set to 0 | Every available comment, with its replies |
| A sample of comments | maxCommentsPerVideo set to a number | The first comments, in TikTok's own order, with their replies |
| Comments without replies | includeReplies set to false | No reply items. replies still has the reply count |
| Comments without video details | includeVideoInfo set to false | video is null in the Videos dataset |
| Several videos | More than one entry in videoUrls | The comments of all videos in one Dataset |
| The videos of a profile | profileUrls, and videosPerProfile for the number of videos | The comments of each video of the profile |
What each comment includes
- Comment: ID (
cid), text, text language, likes, reply count, and creation time - Commenter: ID, handle, display name, verified flag, and avatar link
- Flags: whether the creator pinned the comment, liked it, or wrote it
- Extras: the users that the text mentions, the images, and the sticker
- Reply: the same fields, with
repliesToIdfor the comment that it answers, andrepliesToReplyIdwhen it answers another reply - Video, in the Videos dataset: ID, description, creation time, hashtags, author with follower counts, music, video details, and stats
- Totals, in the Videos dataset:
serverTotal, the comment count that TikTok shows, andcommentCount, the number of comments saved - Source:
inputUrl, the video URL or the profile URL from your input
Read the comments of a video
Start with one video URL:
{"videoUrls": ["https://www.tiktok.com/@nasa/video/7700397098994273549"]}
The Actor saves the video details and every available comment. Set
maxCommentsPerVideo to set an upper limit. See
Input reference.
Supported links
Use the full video URL, with /video/ and the numeric video ID:
https://www.tiktok.com/@username/video/1234567890123456789
Other links give an error item. This includes short links, such as
vm.tiktok.com, and photo posts. Open the short link, and copy the full URL that
it leads to.
Limit the comments
{"videoUrls": ["https://www.tiktok.com/@nasa/video/7700397098994273549"],"maxCommentsPerVideo": 100}
The Actor stops each video at 100 comments. The replies of those comments do not count in this number. Comments come in TikTok's own order, not by date. A limit gives the first comments in that order.
Comments without replies
{"videoUrls": ["https://www.tiktok.com/@nasa/video/7700397098994273549"],"includeReplies": false}
The Dataset has no reply items. replies still has the number of replies. This
run is faster.
Comments without video details
{"videoUrls": ["https://www.tiktok.com/@nasa/video/7700397098994273549"],"includeVideoInfo": false}
video is null in each item of the Videos dataset. The comments,
serverTotal, and commentCount stay the same.
Read the comments of a profile
{"profileUrls": ["https://www.tiktok.com/@nasa"],"videosPerProfile": 5,"maxCommentsPerVideo": 50}
The Actor reads the public videos of each profile and collects the comments of
each video like for a video URL. videosPerProfile sets the number of videos for
each profile. 0, the default, reads every public video of the profile, which
can take a long time. Each video has an item in the Videos dataset, and
inputUrl holds the profile URL from your input. A profile URL looks like
https://www.tiktok.com/@handle. You can use videoUrls and profileUrls in
the same run.
How results are ordered and limited
Order. Items of different videos can be mixed in the Dataset. Use videoId
to tell them apart. Inside one
video, the items come in TikTok's own order, and each reply follows its comment.
The order is not by date or by likes. Sort the items on createTime or likes
in your own tool.
Limit. maxCommentsPerVideo applies to each video, not to the complete run.
Replies do not count in it. videosPerProfile applies to each profile. A limit
gives the first items in TikTok's own order.
Same video twice. The Actor reads a video once. A video that two inputs point
to, such as a video URL and a profile, gives its items once. inputUrl names one
of the two inputs.
Input
Provide at least one video URL or one profile URL.
Input reference
| Parameter | Type | Default | Effect |
|---|---|---|---|
| videoUrls | string[] | empty | Full TikTok video URLs. Provide at least one video URL or one profile URL. See Supported links. |
| profileUrls | string[] | empty | TikTok profile URLs. The Actor reads the public videos of each profile and collects their comments. See Read the comments of a profile. |
| videosPerProfile | integer, 0 or more | 0 | Upper limit on the videos that the Actor reads for each profile. 0 removes the limit. |
| maxCommentsPerVideo | integer, 0 or more | 0 | Upper limit on saved comments for each video. 0 removes the limit. Replies do not count. See How many comments can I collect?. |
| includeReplies | boolean | true | Adds the replies of each comment as items in the Dataset. When false, there are no reply items. Replies add time. See Are replies included?. |
| includeVideoInfo | boolean | true | Adds the video details to each item of the Videos dataset. When false, video is null. |
| proxyConfiguration | object | {"useApifyProxy":true} | Connection settings for the run. Keep the default. |
- Use full URLs. A video URL looks like
https://www.tiktok.com/@handle/video/<ID>. A profile URL looks likehttps://www.tiktok.com/@handle. - A value that is not a URL stops the run before collection.
- Unknown input fields are ignored.
Output
The Actor writes three datasets. The Dataset holds the comments and the replies. The Videos dataset holds one item for each video. The Errors dataset holds the error items. The Output tab of the run links to all three. The Export button of the run exports only the Dataset.
Every documented field is present in every comment item. When a value is not
available, the field is null, or an empty list for mentions and images. A
comment without text has an empty text. A count that TikTok does not give is
0.
Sample items
These Dataset items are from a real run. They show a comment with one of its replies. The values of the commenters are removed.
This item of the Videos dataset is from the same run. The links are removed.
Comment fields
| Field | Type and contents |
|---|---|
cid | string. The ID of the comment or reply. |
type | string. comment or reply. |
text | string. The text. It is empty when the comment has no text, for example a sticker. |
createTime | string or null. The creation time in Unix seconds, such as "1793524282". |
likes | number. The likes of the comment or reply. |
replies | number or null. For a comment, the reply count that TikTok shows. It can differ from the number of reply items. null for a reply. |
repliesToId | string or null. For a reply, the cid of its comment. null for a comment. |
repliesToReplyId | string or null. For a reply that answers another reply, the cid of that reply. Otherwise null. |
textLanguage | string or null. The language code of the text, such as en. un means that TikTok does not know the language. |
isPinned | boolean or null. true for the comment that the creator pinned. null for a reply. |
isLikedByCreator | boolean or null. true when the creator liked the comment. |
isByCreator | boolean or null. true when the creator of the video wrote the comment. |
mentions | object[]. The users that the text mentions. Empty when there are none. |
mentions[].id | string. The ID of the mentioned user. |
mentions[].name | string. The name as the commenter wrote it after the @. It is a display name, so it can contain spaces. |
images | string[]. The links of the images in the comment. The links expire. |
sticker | string or null. The link of the sticker in the comment. The link expires. |
author.id | string. The ID of the commenter. |
author.uniqueId | string. The handle of the commenter, without @. |
author.nickname | string. The display name of the commenter. |
author.verified | boolean or null. Whether the commenter is verified. |
author.avatar | string or null. A link to the avatar image. The link expires. |
videoId | string. The ID of the video. |
videoUrl | string. The link to the video. |
inputUrl | string. The URL from your input that led to the comment: the video URL, or the profile URL. |
Videos dataset fields
The Videos dataset holds one item for each video that the Actor read. The item
holds the IDs, the counts, and video. The object video holds the details,
and video.video holds the file details of the video.
| Field | Type and contents |
|---|---|
videoId | string. The ID of the video. |
videoUrl | string. The link to the video. |
inputUrl | string. The URL from your input that led to the video: the video URL, or the profile URL. |
video | object or null. null when includeVideoInfo is false, or when the details could not be read. |
serverTotal | number. The comment count that TikTok shows for the video. See the limits. |
commentCount | number. The number of comments saved for the video. Replies are not in this number. |
video.desc | string. The description. It is empty when the video has none. |
video.descLanguage | string or null. The language code of the description, such as en. |
video.createTime | string or null. The creation time in Unix seconds, such as "1793436711". |
video.locationCreated | string or null. The country code where the video was made. Filled only for a video URL. |
video.categories | string[]. The topic labels of the video. Filled only for a video URL. |
video.hashtags | string[]. The hashtags of the description, without #. |
video.mentions | string[]. The accounts that the description mentions, without @. |
video.effects | string[]. The names of the effects that the video uses. |
video.isAd | boolean or null. true for a paid ad. |
video.isAiGenerated | boolean or null. true when the video is marked as AI generated. Filled only for a video URL. |
video.isPinned | boolean or null. true for a video that the creator pinned. Filled only for the videos of a profile. |
video.duetEnabled | boolean or null. Whether other users can make a duet with the video. |
video.stitchEnabled | boolean or null. Whether other users can stitch the video. |
video.shareEnabled | boolean or null. Whether the video can be shared. |
video.captionLanguages | string[]. The caption languages that the video offers, such as eng-US. |
video.images | string[]. The image links of a photo post. Empty for a video. |
video.video
| Field | Type and contents |
|---|---|
video.video.duration | number. The duration in seconds. |
video.video.width | number or null. The width in pixels. |
video.video.height | number or null. The height in pixels. |
video.video.ratio | string or null. The resolution label, such as 540p. |
video.video.definition | string or null. The quality label, such as 540p. |
video.video.format | string or null. The file format, such as mp4. |
video.video.codec | string or null. The video codec, such as h264. |
video.video.bitrate | number or null. The bitrate in bits per second. |
video.video.size | number or null. The file size in bytes. It is null for a video URL. |
video.video.cover | string or null. A link to the cover image. The link expires. |
video.video.originCover | string or null. A link to the original cover image. The link expires. |
video.video.dynamicCover | string or null. A link to the animated cover. The link expires. |
video.author
| Field | Type and contents |
|---|---|
video.author.id | string. The account ID. |
video.author.uniqueId | string. The handle, without @. |
video.author.nickname | string. The display name. |
video.author.verified | boolean or null. Whether the account is verified. |
video.author.signature | string or null. The bio. |
video.author.createTime | string or null. The account creation time in Unix seconds. Filled only for a video URL. |
video.author.private | boolean or null. Whether the account is private. |
video.author.seller | boolean or null. Whether the account sells in TikTok Shop. Filled only for a video URL. |
video.author.avatar | string or null. A link to the avatar image. The link expires. |
video.author.followers | number or null. The follower count. |
video.author.following | number or null. The count of accounts that the author follows. |
video.author.likes | number or null. The total likes that the account received. |
video.author.videos | number or null. The video count of the account. |
video.author.likesGiven | number or null. The count of videos that the account liked. |
video.stats
| Field | Type and contents |
|---|---|
video.stats.views | number. The play count. |
video.stats.likes | number. The like count. |
video.stats.comments | number. The comment count. |
video.stats.shares | number. The share count. |
video.stats.saves | number. The count of users who saved the video. |
video.stats.reposts | number. The repost count. |
video.music
| Field | Type and contents |
|---|---|
video.music.id | string or null. The sound ID. |
video.music.title | string or null. The sound title. |
video.music.author | string or null. The name of the sound author. |
video.music.album | string or null. The album, when the sound has one. |
video.music.duration | number or null. The duration in seconds. |
video.music.playUrl | string or null. A link to the audio file. |
video.music.cover | string or null. A link to the sound cover image. |
- The values in
video.statsare the values at the time of the run. They change over time. - TikTok rounds large counts, such as
video.author.followersof202100. - Links to avatars, covers, images, and stickers expire. A comment avatar link lasts about one day. A cover link or the avatar link of a video author lasts about two days. An image or sticker link of a comment lasts about 30 days. Download what you need soon after the run.
Which fields are empty for which input
Some fields of the Videos dataset are empty for the videos of a profile. The
Actor still saves the video and sets the field to null or an empty list. A
filled field can still be empty for one video, for example when the video has no
captions. The comment fields do not depend on the input.
| Field | profileUrls | videoUrls |
|---|---|---|
video.locationCreated, video.categories, video.isAiGenerated, video.author.createTime, video.author.seller | Empty | Filled |
video.isPinned | true or false | null |
video.video.size | Filled | null |
video.hashtags and video.mentions are filled for both inputs.
Error items
An input URL that the Actor cannot read gives one error item in the Errors dataset. The run goes on with the next URL.
{"inputUrl": "https://www.tiktok.com/@nasa/video/7000000000000000001","error": "The video is removed or private.","errorCode": "VIDEO_UNAVAILABLE"}
An error item has three fields:
| Field | Type and contents |
|---|---|
inputUrl | string. The entry from your input. |
error | string. A short sentence that says what went wrong. |
errorCode | string. One of the codes below. |
errorCode | Meaning |
|---|---|
NOT_A_VIDEO_URL | The entry of videoUrls has no /video/ and video ID, or it is not a TikTok URL. |
NOT_A_PROFILE_URL | The entry of profileUrls is not a profile URL such as https://www.tiktok.com/@handle. |
VIDEO_UNAVAILABLE | The video is removed or private. |
PROFILE_UNAVAILABLE | The profile does not exist or is not available. |
COMMENTS_OFF | The creator switched the comments off for this video. This is a result, not a failure. The Videos dataset still has the item of the video. |
READ_FAILED | The video or profile could not be read. Try again later. |
COMMENTS_OFF appears for a video in videoUrls. A video of a profile with the
comments off gives its Videos dataset item with commentCount set to 0, and no
error item.
Limits and field notes
How many comments can I collect?
maxCommentsPerVideo is an upper limit, not a required count. With 0, the
Actor saves every available comment. Each comment and each reply is its own
item. A video with thousands of comments takes minutes, so set a limit when you
need only a sample. See How fast is a run?.
A video with no comments is a result, not a failure. It gives a Videos dataset
item with commentCount set to 0, and no error item.
Are replies included?
Yes, by default. Each reply is an item in the Dataset, right after its comment.
Its type is reply, and repliesToId holds the cid of the comment.
replies in the comment item is the reply count that TikTok shows. It can
differ from the number of reply items, because the count can include replies
that are not available. Replies come in TikTok's own order, which is not
strictly by date.
Set includeReplies to false to save only the comments. A run without replies
is faster.
How do I tell comments from replies?
Use type. A comment has type set to comment and repliesToId set to
null. A reply has type set to reply, and repliesToId holds the cid of
its comment. A reply to another reply also has repliesToReplyId. In a
spreadsheet, filter on type. To build a thread, group the reply items on
repliesToId. Each reply follows its comment in the Dataset.
Does each comment appear once?
Yes. The Actor keeps each cid once in the whole Dataset.
Why is commentCount lower than serverTotal?
Both fields are in the Videos dataset. serverTotal is the comment count that
TikTok shows for the video. commentCount is the number of comments that the
Actor saved. TikTok can show a higher count than the number of comments and
replies that are available. So commentCount can be lower, even when you set no
limit.
In two test runs without a limit and with replies:
| Video | serverTotal | Comments saved | Replies saved |
|---|---|---|---|
| A small video | 139 | 112 | 9 |
| A video with a long thread | 2,992 | 1,157 | 1,354 |
How fast is a run?
A run with replies is slower than a run without them. The time can change from
run to run. In test runs, the small video
took 8 to 14 seconds with replies. The video with a long thread took 52 to 82
seconds with replies. A video with 10,744 reported comments gave 1,500 comments
in 27 to 36 seconds without replies. Set maxCommentsPerVideo for a faster run.
A video or a profile that does not exist gives its error item within seconds.
Why are some fields empty?
TikTok does not give every detail for every video or comment. Then the field is
null or an empty list. See
Which fields are empty for which input. A
comment without text has an empty text, and its images or sticker hold the
content. The name in mentions is the name as the commenter typed it.
What happens when a video fails?
The Actor retries before it gives up. When a video cannot be read in full, the
Actor saves the comments that it has for that video. It writes a warning in the
run log and goes on with the next video. When the replies of a comment cannot be
read, it saves the replies that it has and writes a warning. commentCount shows
how many comments it saved. When the video details fail, video is null and
the comments still follow. A video that cannot be read at all gives an error
item.
If no video and no profile can be read, the run fails with the message "No video or profile could be read. Check the URLs and try again." The error items stay in the Errors dataset. A profile with no public videos is not a failure. Invalid input also fails the run with a message that names the problem.
Can a comment disappear after I collect it?
Yes. Viewers and creators can delete comments at any time. Run the Actor again to
get the current comments, and compare the cid values.
Similar Actors
- TikTok Videos Scraper. The videos of TikTok profiles, hashtags, and sounds, with their stats.
- YouTube Scraper. YouTube videos, channels, playlists, comments, captions, and live chat.
- Reddit Comments Scraper. A Reddit post and every comment on it, from the post URL.
- Reddit Scraper. Reddit posts by keyword, subreddit, or user, subreddit discovery, and post comments.
- Google Maps Reviews Scraper. Google Maps reviews with place context, from place URLs or Place IDs.
- Glassdoor Reviews Scraper. Glassdoor company reviews with ratings, pros and cons, and employer responses.