Quickstart
Set your Apify token, submit the input and receive an array of Dataset rows.
https://api.apify.com/v2/acts/meka.im~tiktok-comments-scraper/run-sync-get-dataset-itemsSet APIFY_TOKEN in your server environment and send Authorization: Bearer. Runs execute under your Apify account.
curl -X POST 'https://api.apify.com/v2/acts/meka.im~tiktok-comments-scraper/run-sync-get-dataset-items' \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"postURLs":["https://www.tiktok.com/@nike/video/7693986066830839054"],"commentsPerPost":20,"topLevelCommentsPerPost":10,"maxRepliesPerComment":5,"maxConcurrency":1}'Examples run on your server. Executing an Actor may incur charges under your Apify account. View Actor details
Input parameters
Send a JSON object as the request body.
| Field | Type | Description |
|---|---|---|
postURLsOptional | array | Up to 100 full public TikTok video URLs. Use Profile usernames below for profiles; invalid video URLs are skipped independently. Default: []. |
commentsPerPostOptional | integer | Maximum total delivered comments and replies for each video. Default: 100. Range: 1–10000. |
topLevelCommentsPerPostOptional | integer | Maximum top-level comments collected for each video. Default: 100. Range: 1–10000. |
maxRepliesPerCommentOptional | integer | Per-parent reply upper bound, default 0. Delivers main comments first; explicitly set this to collect replies. Default: 0. Range: 0–500. |
profilesOptional | array | Up to 100 usernames, optional @. Videos and public reposts supported. Default: []. |
resultsPerPageOptional | integer | Default 1. Upper bound on discovered posts per profile, not comment rows. Default: 1. Range: 1–100. |
profileSortingOptional | string | Default latest. Native video discovery order: latest, popular or oldest. Reposts retain upstream repost order. Default: "latest". |
profileScrapeSectionsOptional | array | Default [videos]. Select videos, reposts or both. Each section uses native upstream pagination; profileSorting applies to videos. resultsPerPage caps unique posts across selected sections. Default: ["videos"]. |
oldestPostDateUnifiedOptional | string | Inclusive UTC publication lower bound: valid YYYY-MM-DD or integer string 1..36500 (1=today, 2=yesterday). Relative days freeze at each profile unit first request, before discovery. |
newestPostDateOptional | string | YYYY-MM-DD UTC video publication date; inclusive calendar day. Applies to profile discovery before comment collection. |
excludePinnedPostsOptional | boolean | Default false. Profile discovery only. Default: false. |
maxConcurrencyOptional | integer | Process 1–16 video or profile targets at once. Each profile processes its videos sequentially. Output can arrive in completion order; this is not a requests-per-second setting. Default: 16. Range: 1–16. |
Response fields
The synchronous endpoint returns a JSON array. Each row follows the Actor’s published Dataset contract.
| Field | Type | Description |
|---|---|---|
cid | string | Verified comment ID. |
text | null | string | Public comment or reply text; null if unavailable. |
createTime | null | integer | Unix seconds when supplied. |
createTimeISO | null | string | Corresponding ISO UTC creation time. |
diggCount | null | integer | Source-reported comment likes; null is unknown. |
replyCommentTotal | null | integer | Source-reported reply count, not a completeness guarantee. |
uid | null | string | Public author ID when available. |
uniqueId | null | string | Public author username when available. |
repliesToId | null | string | Null for top-level comments; directed reply target when supplied, otherwise parent. Target may be outside the sample. |
avatarThumbnail | null | string | Public author image URL reference; may expire. |
likedByAuthor | null | boolean | Verified source flag when supplied. |
pinnedByAuthor | null | boolean | Verified source pin flag, or null when unknown. |
mentions | null | array | Empty array for verified absence; otherwise null when handles cannot be verified. |
detailedMentions | null | array | Verified Tag-contract identities with id; name, nickName and profileUrl remain null. Unknown or unverified metadata stays null. |
videoWebUrl | string | Canonical full TikTok video URL. |
submittedVideoUrl | string | Actual video URL used for collection, including profile-discovered videos. |
input | string | Actual video input URL. |
_anyfetch | object | Protected contractVersion, inputHash and video-ID:comment-ID recovery identity; no cookies or credentials. |
Example response
Historical recordingSelected fields from the Actor README’s October 11, 2026 recording. This is an excerpt, not a full Dataset row or a guarantee of future values.
[
{
"cid": "7694035405498286869",
"createTimeISO": "2026-10-07T21:07:14.000Z",
"diggCount": 5062,
"replyCommentTotal": 2,
"repliesToId": null,
"videoWebUrl": "https://www.tiktok.com/@nike/video/7693986066830839054"
}
]Errors & limitations
Run lifecycle
The synchronous endpoint waits at most 300 seconds. For larger batches, start an asynchronous Actor run, wait for completion and retrieve the Dataset and run key-value records. Inspect OUTPUT before interpreting partial delivery as complete.
Public source availability
Removed, restricted, unavailable or changing source content can produce fewer rows or errors. Successful platform status alone does not prove complete collection. No login credentials, private content or media downloads are supported.
For HTTP errors and run lifecycle handling, see the Apify API reference.
Traversal and Dataset v1
The published Actor accepts profile discovery controls without requiring apiVersion in Actor input. Do not send the internal Data API plan/page envelope. The Dataset remains contract v1.
postURLs accepts full public TikTok video URLs. The Actor normalizes supported URL forms to HTTPS and removes query strings and fragments before collection. Profile usernames belong in profiles. Invalid video URLs are skipped independently, and repeated IDs retain their first valid occurrence. Empty API input returns no rows.
Replies count toward commentsPerPost. Defaults collect 100 top-level rows and zero replies. To allow replies, set maxRepliesPerComment above zero and leave room below the total cap. Results are ceilings, not guaranteed counts.
Profile discovery and recovery
Profile date filters apply to video publication dates before collecting comments. oldestPostDateUnified accepts YYYY-MM-DD or an integer string 1–36500; 1 means today. Relative dates freeze at each profile unit first request. Reposts retain upstream order; profileSorting controls videos.
Photos are skipped and reported. Explicit video targets are excluded from profile discovery; overlapping rows are deduplicated before delivery and charging. Each profile processes videos sequentially. Concurrent targets can complete out of input order; maxConcurrency:1 preserves direct-video order.
The OUTPUT summary reports source errors, delivered and charged rows, skipped and duplicate inputs and budget completion. Verified partial rows remain in the Dataset. Pins and mentions use verified metadata; no text-based mention inference is performed.
Frequently asked questions
How do I collect replies?
Set maxRepliesPerComment above zero and keep the top-level cap below commentsPerPost. Every reply consumes the total per-video cap.
Can I sort or filter comments?
There is no custom comment sort or keyword filter. Profile sort and date controls select videos before comment collection, not comments.