TikTok Comments & Replies Scraper (API Direct)
Under maintenancePricing
from $0.20 / 1,000 comments
TikTok Comments & Replies Scraper (API Direct)
Under maintenanceScrape comments and their reply threads from public TikTok videos and photo posts with your own API Direct key (free tier available). Each reply links to its parent comment; videos that cannot be read are reported free.
Pricing
from $0.20 / 1,000 comments
Rating
0.0
(0)
Developer
ApifyActors
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Export top-level comments on public TikTok videos, and optionally the replies under them, to an Apify dataset with your own API Direct key. Give the Actor a list of video URLs or decimal video IDs. It requests comments from API Direct in TikTok's default order and writes one row per unique comment or reply, with every reply linked to its comment. Download the dataset as CSV or JSON from the run's Storage tab.
What you need
An API Direct key from apidirect.io. API Direct gives every account 50 free requests per endpoint each month, with no card on file, and bills its own usage to your key after that (see Pricing). The key goes into the input form's secret field, which Apify stores encrypted.
Run a first check
Open the Actor's input form, paste your API Direct key into the secret field, add one full video link, and set Maximum comments per video to 2. To verify your result, open Output → Comments and replies and compare the IDs and text with a known sample. Per-video summary shows what happened to each video.
Example input (replace the sample key in the form):
{"videos": ["https://www.tiktok.com/@bbcnews/video/7690902917741726979"],"maxCommentsPerVideo": 2,"apiKey": "YOUR_API_DIRECT_KEY"}
Supply 1–100 IDs or full video links; photo posts (/photo/ links) are accepted too. URL variants of the same video are collected once. Short share links (vm.tiktok.com) and profile links are not accepted: open the video and copy its full link. A link the Actor cannot read stops the run before any request is made, and the run's status names that link. The default limit is 50 unique comments per video, configurable from 1 to 450. The provider describes roughly 450 as the accessible depth and may return fewer. Reply counts are included where available.
Replies
Replies are off by default. Turn on Include replies to also export each comment's thread. The Actor then requests the replies of every comment whose reply count is above zero, one request per comment, up to Maximum replies per comment (default 50, up to 1000). API Direct bills only the pages of 50 a thread actually fills, so a higher cap costs more only on longer threads. The cap, not the comment's reply count, sets how far the Actor reads: TikTok's count can be lower than the thread. Comments without replies cost nothing extra. Each reply is its own row, linked to its comment by parentCommentId. Threads are requested five at a time.
{"videos": ["https://www.tiktok.com/@bbcnews/video/7690902917741726979"],"maxCommentsPerVideo": 50,"includeReplies": true,"maxRepliesPerComment": 50,"apiKey": "YOUR_API_DIRECT_KEY"}
Output
A comment, and a reply to it:
{"videoId": "7690902917741726979","commentId": "7516998696283505430","parentCommentId": null,"text": "Example comment","author": "example_user","likes": 12,"replyCount": 2,"createdAtUnix": 1750187654,"images": []}
{"videoId": "7690902917741726979","commentId": "7517173688660394774","parentCommentId": "7516998696283505430","text": "Example reply","author": "another_user","likes": 3,"replyCount": null,"createdAtUnix": 1750228407,"images": []}
IDs are decimal strings. Timestamps are Unix seconds. Unavailable metrics remain null. parentCommentId is null on a top-level comment; on a reply it holds the ID of the comment the reply belongs to, and the reply's own replyCount is null.
When something cannot be collected
A video or a reply thread that cannot be collected still gets a row, so a problem never looks like silence. These status rows are free. They have commentId: null and a status with a message; parentCommentId is set when the row is about one comment's replies.
{"videoId": "7690902917741726979","commentId": null,"parentCommentId": null,"status": "no_rows_returned","message": "API Direct reported 40 comments on this video but returned none."}
status | Meaning |
|---|---|
empty | API Direct returned no comments and reported none. Either the video has no comments, or the video is deleted, private or a wrong ID: API Direct answers these the same way, so check the link if you expected comments. For a reply thread: no replies. |
unavailable | API Direct answered 404. Collection continues. |
no_rows_returned | API Direct reported comments (or replies) but returned none. Worth a retry later. |
failed | A provider error: the key was refused, the credit ran out, or API Direct kept answering 429/5xx after three retries. The Actor stops sending requests and the run ends as failed. |
credit_exhausted | API Direct answered 402: your key's free requests or credit for that endpoint are used up. Free requests are counted per endpoint, so when only replies run out, comments keep coming and only the remaining threads get this status. Add credit and run what is left again. |
not_attempted | Not requested because an earlier request failed. |
charge_limit_reached | Not requested because the run reached your maximum charge. |
An empty, deleted or unavailable video or comment does not fail the run, and neither does running out of API Direct credit or reaching your maximum charge; only a provider error does. Rate limits (HTTP 429) and server errors are retried with a pause before the Actor gives up. Comment rows filter out cleanly: keep the rows whose commentId is not null.
The SUMMARY record in the default key-value store (Per-video summary) lists every input video after deduplication with its status, the number of comments exported and the provider's reported page and comment totals. With replies on, each video also gets a replies block: threads requested, the replies their comments reported against the replies exported, a count per status, threads cut by the cap, and the comment ID and reason for every thread that was not collected. A video's reported total counts replies too, so it is higher than its number of top-level comments.
If Apify restarts a run on another server, the Actor reuses every answer it already saved, so nothing is requested or charged twice. A request that was in flight at that moment is sent once more, which can bill one page twice on your API Direct key.
Pricing
You pay two parties:
- This Actor: $0.20 per 1,000 rows, the same for comments and replies (events
commentandreply, $0.0002 each), plus Apify's standard $0.00005 per run start. Status rows are free. The run stops sending requests once your maximum charge is reached, and asks API Direct only for as many comments as can still be charged. - API Direct, billed to your key: $0.006 per page of up to 50 comments or replies, after the free 50 requests per endpoint per month. Each video costs
ceil(maxCommentsPerVideo / 50)pages at most. With replies on, every comment that has replies adds at least one page, plus one page per further 50 replies. Check API Direct's dashboard for actual charges. Comments endpoint · Replies endpoint
Examples, both parties together:
| Video | API Direct | This Actor | Total |
|---|---|---|---|
| 450 comments, replies off | 9 pages, $0.054 | $0.090 | $0.144 |
| 89 comments and 21 replies in 7 threads | 2 + 7 pages, $0.054 | $0.022 | $0.076 |
| 450 comments and 600 replies in 150 threads | 9 + 150 pages, $0.954 | $0.210 | $1.164 |
Replies are the expensive part because API Direct bills each thread as its own request.
Limits
- API Direct reaches up to roughly 450 top-level comments per video, in TikTok's default order. On a video showing 1,503 comments (replies included), a run at the 450 limit returned 375 unique top-level comments.
- A comment's
replyCountcomes from TikTok and can differ slightly from the replies API Direct returns (hidden or deleted replies, replies added since). SUMMARY shows both numbers per video. - API Direct allows 10 simultaneous requests per key and endpoint. One run uses up to 5; more than two runs at once on the same key can be slowed by rate limits, which the Actor retries.
- Comment authors are returned as usernames only; profile data is outside this Actor's scope.