TikTok Comments API and Comment Scraper
Send a TikTok video URL, a short link or a video id and get its public comments as JSON: the text, the like count, how many replies each one has, whether the creator liked or pinned it, and who wrote it. Load the replies of any comment with a second call.
Request
GET /v1/tiktok/comments ·
2 credits per successful call
curl "https://api.igramapi.com/v1/tiktok/comments?url=https%3A%2F%2Fwww.tiktok.com%2F%40example_creator%2Fvideo%2F7401234567890123456&limit=2" \
-H "Authorization: Bearer YOUR_API_KEY" import requests
response = requests.get(
"https://api.igramapi.com/v1/tiktok/comments?url=https%3A%2F%2Fwww.tiktok.com%2F%40example_creator%2Fvideo%2F7401234567890123456&limit=2",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
print(response.json()) const response = await fetch("https://api.igramapi.com/v1/tiktok/comments?url=https%3A%2F%2Fwww.tiktok.com%2F%40example_creator%2Fvideo%2F7401234567890123456&limit=2", {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
if (!response.ok) throw new Error((await response.json()).error.message);
console.log(await response.json()); <?php
$ch = curl_init("https://api.igramapi.com/v1/tiktok/comments?url=https%3A%2F%2Fwww.tiktok.com%2F%40example_creator%2Fvideo%2F7401234567890123456&limit=2");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data); Response
{
"video_id": "7401234567890123456",
"total_comments": 4120,
"items": [
{
"id": "7401299900000000001",
"text": "The second stall had the best momos",
"created_at": 1761903600,
"like_count": 1840,
"reply_count": 12,
"parent_comment_id": null,
"is_author_liked": true,
"is_pinned": false,
"image_url": null,
"author": {
"id": "6900000000000000001",
"username": "foodie_ravi",
"nickname": "Ravi",
"avatar": "https://v16-webapp-prime.tiktok.com/video/tos/example/ravi.jpeg",
"is_verified": false
}
},
{
"id": "7401299900000000002",
"text": "Which city is this?",
"created_at": 1761905000,
"like_count": 230,
"reply_count": 3,
"parent_comment_id": null,
"is_author_liked": false,
"is_pinned": false,
"image_url": null,
"author": {
"id": "6900000000000000002",
"username": "meera.travels",
"nickname": "Meera",
"avatar": "https://v16-webapp-prime.tiktok.com/video/tos/example/meera.jpeg",
"is_verified": false
}
}
],
"page": {
"has_next_page": true,
"end_cursor": "2"
},
"cached": false
} All values above are made-up examples. Media links are temporary TikTok CDN addresses.
Parameters
| Name | In | Description |
|---|---|---|
urlrequired | query | A video URL, a vm.tiktok.com or vt.tiktok.com short link, or the numeric video id. |
cursor | query | page.end_cursor from the previous response. |
limit | query | Comments per page, 1 to 50. Default 20. |
video_id | path | Alternative: GET /v1/tiktok/videos/{video_id}/comments with the numeric id. Same response and price. |
Response fields
| Field | Type | Description |
|---|---|---|
video_id / total_comments | string / integer | null | The video and TikTok's comment count for it. |
items[].id / text | string | Comment id and text. |
items[].created_at | integer | null | Unix time the comment was posted. |
items[].like_count / reply_count | integer | Likes, and TikTok's reply count. |
items[].is_author_liked / is_pinned | boolean | Liked or pinned by the creator. |
items[].image_url | string | null | Sticker or image attached to the comment (temporary link). |
items[].parent_comment_id | string | null | Set on replies: the comment they answer. |
items[].author | object | id, username, nickname, avatar and is_verified of the commenter. |
page.has_next_page / end_cursor | boolean / string | null | Pagination. |
cached | boolean | True when served from the short-lived cache (up to 5 minutes). |
Text, likes and replies
Each comment has its text, like_count, reply_count, the time it was posted and its author.
Creator signals
is_author_liked and is_pinned show which comments the creator liked or pinned. Sticker and image comments carry image_url.
Threaded replies
Load the replies of any comment with GET /v1/tiktok/comments/{comment_id}/replies for 1 credit per page.
Any link works
Pass a full URL, a short link from the app or the numeric video id.
Comments and replies
A page of comments costs 2 credits and holds up to 50. The response has video_id, total_comments (TikTok's count for the video), items and page. Pass page.end_cursor as cursor for the next page.
For the replies of a comment, call GET /v1/tiktok/comments/{comment_id}/replies?video_id={video_id}: 1 credit per page of up to 50, each reply with parent_comment_id set to the comment.
Two things to know
TikTok ranks comments differently from one request to the next. When you page through a long thread, a comment can show up on two pages or be skipped, so de-duplicate by id and treat a full export as a large sample rather than an exact copy.
reply_count is TikTok's own figure and can include replies TikTok does not show to the public. The replies endpoint returns the replies TikTok lists, which can be fewer, or none.
Frequently asked questions
Is this a TikTok comment scraper?
It returns what a TikTok comment scraper collects (comment text, likes, reply counts, authors and the replies themselves for a public video) as JSON with a cursor, so you do not run or maintain a scraper yourself.
How do I get the replies to a comment?
Call GET /v1/tiktok/comments/{comment_id}/replies with the comment's id and video_id. It costs 1 credit per page of up to 50 replies.
Can I export every comment of a video?
You can page through them with the cursor, 50 at a time. TikTok's ranking shifts between requests, so de-duplicate by id, and expect a large sample rather than an exact copy of a very long thread.
Why does a comment with replies return none?
reply_count is TikTok's own figure and can include replies TikTok does not show publicly. The replies endpoint returns only what TikTok lists.
What does a page cost?
2 credits for up to 50 comments, 1 credit for up to 50 replies. Invalid requests, such as a malformed cursor, are not charged.
What if the video is gone?
Videos that were deleted, are private or are restricted return video_unavailable (HTTP 404).
Our errors cost nothing. Failures on our side (status 500 or above) and invalid requests (400, 422) are refunded, and every error has the same shape. See error handling and credits and rate limits.
Try the TikTok Comments API free
Create a key and make your first request in minutes. 100 free credits every month.