TikTok Comments Scraper 💬
Pricing
Pay per usage
TikTok Comments Scraper 💬
Scrape TikTok comments from videos to analyze audience reactions, spot trends, and track engagement. Collect comment text, usernames, likes, reply counts, and timestamps, then review the data in an Apify dataset. Useful for creators, marketers, and social media researchers.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Shahid Irfan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 days ago
Last modified
Categories
Features
Share
What does TikTok Comments Scraper do?
TikTok Comments Scraper collects the comments under TikTok videos. Paste one or more direct video URLs, choose how many comments you want from each video, and the Actor saves one dataset row per top-level comment: author, comment text, likes, reply count, and posting time.
Why use TikTok Comments Scraper?
- Many videos, one run - Paste a list of video links instead of opening each video by hand.
- Structured output - Every comment becomes one row with the same field names, ready for CSV, Excel, or the Apify API.
- Top-level comments only - Replies are not expanded, so a run stays fast and predictable.
- Repeatable - Schedule runs or call the Actor through the Apify API.
How it works
The Actor reads comments from the public comment endpoint used by TikTok download services (tikwm.com/api/comment/list). It requests comments page by page until maxComments is reached, so a run takes a couple of seconds per video.
If that endpoint refuses the run's IP address, the Actor falls back to opening the video page in a stealth browser and reading the rendered comment panel. The fallback is slower, and TikTok may hide the panel from logged-out visitors, in which case the video is logged as empty.
The free endpoint throttles bursts, so the Actor spaces requests about seven seconds apart and waits 30 seconds before retrying a blocked response. A 100-comment video takes roughly 35 seconds because of this pacing.
Input
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
videoUrls | Array of strings | Yes | One @tiktok video | Direct TikTok video URLs, e.g. https://www.tiktok.com/@user/video/1234567890 |
maxComments | Integer | No | 50 | Maximum top-level comments per video |
proxyConfiguration | Object | No | no proxy | Apify Proxy or custom proxy URLs |
Short links such as https://vt.tiktok.com/... are rejected because the video id cannot be read from them. Open the short link in a browser and use the full tiktok.com/@user/video/... URL.
The comment endpoint blocks some networks. If a run returns no comments, retry with an Apify Proxy enabled so the request leaves from a different IP.
Output
| Field | Type | Description |
|---|---|---|
video_id | String | Numeric TikTok video id |
video_url | String | Video URL that was scraped |
comment_id | String | Numeric comment id, when the comment endpoint provides it |
comment_rank | Number | Position of the comment in the list, starting at 1 |
username | String | Comment author's username, without @ |
nickname | String | Comment author's display name |
text | String | Comment text |
likes | Number | Likes on the comment at collection time |
replies | Number | Replies shown under the comment |
posted_at | String | ISO 8601 posting time, when available |
time_posted | String | Relative posting label from the browser fallback, e.g. 2d ago |
collected_at | String | ISO timestamp for when the row was saved |
Comments are saved in the order TikTok returns them, up to maxComments per video. Fields that a source cannot provide are null.
Usage examples
One video, 100 comments
{"videoUrls": ["https://www.tiktok.com/@example_creator/video/7311111111111111111"],"maxComments": 100}
Several videos with a proxy
{"videoUrls": ["https://www.tiktok.com/@example_creator/video/7311111111111111111","https://www.tiktok.com/@another_creator/video/7322222222222222222"],"maxComments": 50,"proxyConfiguration": {"useApifyProxy": true}}
Run locally
pip install -r requirements.txtapify runpython -m unittest discover -s tests
Notes and limits
- Only public videos can be read. Private or removed videos are logged and skipped.
- Replies under a comment are counted (
replies) but not saved as separate rows. - The comment endpoint is a third-party service. If it changes or goes offline, the browser fallback takes over.
- The browser fallback parses the current TikTok web markup. If TikTok changes its page structure, comment text or like counts can come back empty until the selectors are updated.