Skip to content

TikTok Video Comments

POST /api/v1/tiktok/comments — 1 credit per page with comments

Read one page of the comments on a public TikTok video or photo post, in TikTok’s own comment shape. Pass a comment’s cid as comment_id to read the replies to that comment instead. Query parameters only, no JSON body.

Method Path Returns
POST /api/v1/tiktok/comments One page of comments, or of one comment’s replies
Name Type Required Description
url string Yes The post: a video URL (https://www.tiktok.com/@<handle>/video/<id>), a photo post URL (/photo/<id>), the post’s numeric id, or a share link (vt.tiktok.com, vm.tiktok.com, tiktok.com/t/). A profile, sound or any other URL is a 400 that names what it is
cursor string No The next_cursor of the previous response, digits only, at most 12. It is an offset (how many comments to skip), not a page number: the second page is cursor=20, the third cursor=40. Empty or 0 is the first page
comment_id string No A comment’s cid from a previous response. Returns the replies to that comment; cursor and has_more then page through the replies
trim boolean No true for a smaller comment: id, text, time, like and reply counts, and the author’s id, handle, name and picture

A page holds up to 20 comments (it can hold fewer, because TikTok leaves some out). You cannot ask for more. To walk the list, send each response’s next_cursor back as cursor until has_more is 0. For example ?url=<post>&cursor=20 is the second page, and ?url=<post>&comment_id=<cid> lists the replies to that comment. A post’s comments and one comment’s replies are separate lists, each with its own cursor.

Field Type Description
success boolean true on a 200
credits_charged integer 1 for a page with comments. 0 for a page with none, and for a page your key already paid for
credits_remaining integer Your balance after this request
cached_at string Cached answers only: when the answer was fetched
comments array The page’s comments in TikTok’s order. [] past the end of the list
comments[].cid string The comment’s id. Send it as comment_id to read its replies
comments[].text string The comment’s text. Empty for a comment that is only an image or a sticker
comments[].digg_count integer Likes
comments[].reply_comment_total integer How many replies TikTok says it has. The replies call can list fewer
comments[].user object uid, unique_id (the handle), nickname and avatar_thumb
offset integer Where this page starts in the list: 0 for the first page, 20 for the second. It is the cursor you sent
page_size integer How many comments a page holds: 20, fixed. A page can hold fewer
has_more integer 1 if there is a next page, else 0
next_cursor integer Send it back as cursor for the next page. Present when has_more is 1
cursor integer The same value as next_cursor, kept for existing callers. It is the next page’s offset, not this page’s
total integer TikTok’s own count of the comments (or replies). Approximate: the pages can add up to less

Only a 200 with comments on the page is charged. A 200 past the end of a list, and a 404 for a post whose first page has no comments, are free.

Terminal window
curl -X POST "https://api.megomi.my.id/api/v1/tiktok/comments?url=https://www.tiktok.com/@creator/video/7123456789012345678" \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"credits_charged": 1,
"credits_remaining": 999,
"comments": [
{
"cid": "740000000000000001",
"aweme_id": "7463250363559218474",
"text": "this is the best thing I've seen all week",
"create_time": 1737679448,
"digg_count": 5453,
"reply_comment_total": 15,
"reply_id": "0",
"reply_to_reply_id": "0",
"comment_language": "en",
"content_type": 1,
"author_pin": false,
"is_author_digged": false,
"is_comment_translatable": true,
"no_show": false,
"user_buried": false,
"user_digged": 0,
"collect_stat": 0,
"stick_position": 0,
"status": 1,
"trans_btn_style": 0,
"sort_tags": "{}",
"sort_extra_score": {
"reply_score": 0.000003,
"show_more_score": 0.02044
},
"share_info": {
"acl": {
"add_to_story_code": 0,
"code": 0,
"extra": "{}"
},
"desc": "User 1's comment: this is the best thing I've seen all week",
"title": "A day at the launch pad",
"url": "https://t.tiktok.com/i18n/share/video/7463250363559218474/?_d=fixture&comment_author_id=v9000000000000001&share_comment_id=740000000000000001&share_item_id=7463250363559218474&sharer_language=en&source=h5_t&u_code=0"
},
"user": {
"uid": "v9000000000000001",
"unique_id": "user_1",
"nickname": "User 1",
"sec_uid": "MS4wLjABAAAAfixturev001",
"avatar_thumb": {
"uri": "tos-fake-avt-0000/fixtureavatarv1",
"url_list": [
"https://p16-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv1~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture",
"https://p19-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv1~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture"
]
}
}
},
{
"cid": "740000000000000002",
"aweme_id": "7463250363559218474",
"text": "okay but where is this? I need to go",
"create_time": 1737674553,
"digg_count": 4434,
"reply_comment_total": 6,
"reply_id": "0",
"reply_to_reply_id": "0",
"comment_language": "en",
"content_type": 1,
"author_pin": false,
"is_author_digged": false,
"is_comment_translatable": true,
"no_show": false,
"user_buried": false,
"user_digged": 0,
"collect_stat": 0,
"stick_position": 0,
"status": 1,
"trans_btn_style": 0,
"sort_tags": "{}",
"sort_extra_score": {
"reply_score": 0.000068,
"show_more_score": 0.122961
},
"share_info": {
"acl": {
"add_to_story_code": 0,
"code": 0,
"extra": "{}"
},
"desc": "User 2's comment: okay but where is this? I need to go",
"title": "A day at the launch pad",
"url": "https://t.tiktok.com/i18n/share/video/7463250363559218474/?_d=fixture&comment_author_id=v9000000000000002&share_comment_id=740000000000000002&share_item_id=7463250363559218474&sharer_language=en&source=h5_t&u_code=0"
},
"user": {
"uid": "v9000000000000002",
"unique_id": "user_2",
"nickname": "User 2",
"sec_uid": "MS4wLjABAAAAfixturev002",
"avatar_thumb": {
"uri": "tos-fake-avt-0000/fixtureavatarv2",
"url_list": [
"https://p16-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv2~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture",
"https://p19-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv2~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture"
]
}
}
},
{
"cid": "740000000000000003",
"aweme_id": "7463250363559218474",
"text": "first time here and I'm already hooked",
"create_time": 1737675637,
"digg_count": 4395,
"reply_comment_total": 2,
"reply_id": "0",
"reply_to_reply_id": "0",
"comment_language": "en",
"content_type": 1,
"author_pin": false,
"is_author_digged": false,
"is_comment_translatable": true,
"no_show": false,
"user_buried": false,
"user_digged": 0,
"collect_stat": 0,
"stick_position": 0,
"status": 1,
"trans_btn_style": 0,
"sort_tags": "{}",
"sort_extra_score": {
"reply_score": 0.000012,
"show_more_score": 0.041143
},
"share_info": {
"acl": {
"add_to_story_code": 0,
"code": 0,
"extra": "{}"
},
"desc": "User 3's comment: first time here and I'm already hooked",
"title": "A day at the launch pad",
"url": "https://t.tiktok.com/i18n/share/video/7463250363559218474/?_d=fixture&comment_author_id=v9000000000000003&share_comment_id=740000000000000003&share_item_id=7463250363559218474&sharer_language=en&source=h5_t&u_code=0"
},
"user": {
"uid": "v9000000000000003",
"unique_id": "user_3",
"nickname": "User 3",
"sec_uid": "MS4wLjABAAAAfixturev003",
"avatar_thumb": {
"uri": "tos-fake-avt-0000/fixtureavatarv3",
"url_list": [
"https://p16-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv3~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture",
"https://p19-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv3~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture"
]
}
}
},
{
"cid": "740000000000000004",
"aweme_id": "7463250363559218474",
"text": "the ending got me",
"create_time": 1737687428,
"digg_count": 2920,
"reply_comment_total": 2,
"reply_id": "0",
"reply_to_reply_id": "0",
"comment_language": "en",
"content_type": 1,
"author_pin": false,
"is_author_digged": false,
"is_comment_translatable": true,
"no_show": false,
"user_buried": false,
"user_digged": 0,
"collect_stat": 0,
"stick_position": 0,
"status": 1,
"trans_btn_style": 0,
"sort_tags": "{}",
"sort_extra_score": {
"reply_score": 0.000003,
"show_more_score": 0.005785
},
"share_info": {
"acl": {
"add_to_story_code": 0,
"code": 0,
"extra": "{}"
},
"desc": "User 4's comment: the ending got me",
"title": "A day at the launch pad",
"url": "https://t.tiktok.com/i18n/share/video/7463250363559218474/?_d=fixture&comment_author_id=v9000000000000004&share_comment_id=740000000000000004&share_item_id=7463250363559218474&sharer_language=en&source=h5_t&u_code=0"
},
"user": {
"uid": "v9000000000000004",
"unique_id": "user_4",
"nickname": "User 4",
"sec_uid": "MS4wLjABAAAAfixturev004",
"avatar_thumb": {
"uri": "tos-fake-avt-0000/fixtureavatarv4",
"url_list": [
"https://p16-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv4~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture",
"https://p19-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv4~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture"
]
}
}
},
{
"cid": "740000000000000005",
"aweme_id": "7463250363559218474",
"text": "sending this to everyone I know",
"create_time": 1737675134,
"digg_count": 2013,
"reply_comment_total": 2,
"reply_id": "0",
"reply_to_reply_id": "0",
"comment_language": "en",
"content_type": 1,
"author_pin": false,
"is_author_digged": false,
"is_comment_translatable": true,
"no_show": false,
"user_buried": false,
"user_digged": 0,
"collect_stat": 0,
"stick_position": 0,
"status": 1,
"trans_btn_style": 0,
"sort_tags": "{}",
"sort_extra_score": {
"reply_score": 0.000011,
"show_more_score": 0.014418
},
"share_info": {
"acl": {
"add_to_story_code": 0,
"code": 0,
"extra": "{}"
},
"desc": "User 5's comment: sending this to everyone I know",
"title": "A day at the launch pad",
"url": "https://t.tiktok.com/i18n/share/video/7463250363559218474/?_d=fixture&comment_author_id=v9000000000000005&share_comment_id=740000000000000005&share_item_id=7463250363559218474&sharer_language=en&source=h5_t&u_code=0"
},
"user": {
"uid": "v9000000000000005",
"unique_id": "user_5",
"nickname": "User 5",
"sec_uid": "MS4wLjABAAAAfixturev005",
"avatar_thumb": {
"uri": "tos-fake-avt-0000/fixtureavatarv5",
"url_list": [
"https://p16-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv5~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture",
"https://p19-common-sign.tiktokcdn.com/tos-fake-avt-0000/fixtureavatarv5~c5_100x100.jpeg?lk3s=fixture&x-expires=1900000000&x-signature=fixture"
]
}
}
}
],
"offset": 0,
"page_size": 20,
"next_cursor": 20,
"cursor": 20,
"has_more": 1,
"total": 579,
"status_code": 0,
"status_msg": ""
}

After about 10 minutes with no lookups, the lookup worker puts its TikTok page to sleep, and the next request wakes it. TikTok refuses comments from a freshly woken page until it has been open for about 30 to 50 seconds, so the first request after a quiet stretch:

  • usually answers 200, taking 30 to 50 seconds instead of about a second. That is why this endpoint waits up to 55 seconds, longer than the others, so set your client timeout above that;
  • otherwise answers 503 with finishReason: worker-cold-start-timeout and Retry-After: 15. You were not charged, and the worker keeps waking meanwhile, so a retry after the Retry-After normally answers in about a second.

A request to an awake worker is unaffected. A captcha there is still a 403 captcha-challenge.