List TikTok video comments
curl --request POST \
--url https://app.dumplingai.com/api/v1/get-tiktok-video-comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"cursor": 123,
"count": 123
}
'import requests
url = "https://app.dumplingai.com/api/v1/get-tiktok-video-comments"
payload = {
"url": "<string>",
"cursor": 123,
"count": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', cursor: 123, count: 123})
};
fetch('https://app.dumplingai.com/api/v1/get-tiktok-video-comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/get-tiktok-video-comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'cursor' => 123,
'count' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/get-tiktok-video-comments"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"cursor\": 123,\n \"count\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/get-tiktok-video-comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"cursor\": 123,\n \"count\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/get-tiktok-video-comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"cursor\": 123,\n \"count\": 123\n}"
response = http.request(request)
puts response.read_body{
"comments": [
{
"cid": "<string>",
"text": "<string>",
"create_time": 123,
"digg_count": 123,
"reply_comment_total": 123,
"user": {},
"reply_comment": [
{}
]
}
],
"cursor": 123,
"hasMore": true,
"total": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Data APIs
Get TikTok Video Comments
Retrieves comments from a TikTok video with pagination support.
POST
/
api
/
v1
/
get-tiktok-video-comments
List TikTok video comments
curl --request POST \
--url https://app.dumplingai.com/api/v1/get-tiktok-video-comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"cursor": 123,
"count": 123
}
'import requests
url = "https://app.dumplingai.com/api/v1/get-tiktok-video-comments"
payload = {
"url": "<string>",
"cursor": 123,
"count": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', cursor: 123, count: 123})
};
fetch('https://app.dumplingai.com/api/v1/get-tiktok-video-comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/get-tiktok-video-comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'cursor' => 123,
'count' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/get-tiktok-video-comments"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"cursor\": 123,\n \"count\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/get-tiktok-video-comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"cursor\": 123,\n \"count\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/get-tiktok-video-comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"cursor\": 123,\n \"count\": 123\n}"
response = http.request(request)
puts response.read_body{
"comments": [
{
"cid": "<string>",
"text": "<string>",
"create_time": 123,
"digg_count": 123,
"reply_comment_total": 123,
"user": {},
"reply_comment": [
{}
]
}
],
"cursor": 123,
"hasMore": true,
"total": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Description
This endpoint allows you to fetch comments from a specific TikTok video. It supports pagination to retrieve all comments and includes nested replies for each comment.Endpoint
POST/api/v1/get-tiktok-video-comments
Request Headers
| Header | Type | Description |
|---|---|---|
Content-Type | string | Must be application/json. |
Authorization | string | Your API key (Bearer token). e.g. Bearer sk_xxx |
Request Body
| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
url | string | The full TikTok video URL. | Yes | |
cursor | number | Optional cursor for pagination. Pass the cursor from a previous response to get the next page. | No | |
count | number | Number of comments to fetch per request. | No | API default |
requestSource | string | Optional. Source of the request (e.g., MAKE_DOT_COM, ZAPIER, API). | No | API |
The
url must be a valid TikTok video URL, e.g., https://www.tiktok.com/@username/video/1234567890 or https://vm.tiktok.com/ZMhKxyz/Responses
Success (200 OK)
Returns a JSON object containing an array of comments with user information, engagement metrics, and pagination details.{
"comments": [
{
"cid": "7123456789012345678",
"text": "Great video! 🔥",
"create_time": 1704067200,
"digg_count": 42,
"reply_comment_total": 3,
"user": {
"uid": "6987654321098765432",
"unique_id": "commenter_username",
"nickname": "Commenter Name",
"avatar_thumb": {
"url_list": ["https://...jpeg"]
},
"verified": false
},
"reply_comment": [
{
"cid": "7234567890123456789",
"text": "Thanks!",
"create_time": 1704070800,
"digg_count": 5,
"user": {
"uid": "6659752019493208069",
"unique_id": "video_author",
"nickname": "Author Name",
"verified": true
}
}
]
}
// ... more comments
],
"cursor": 20,
"hasMore": true,
"total": 234
}
Content-Type: application/json
- X-RateLimit-Limit: The rate limit for the user.
- X-RateLimit-Remaining: The remaining number of requests for the user.
Error Responses
400 Bad Request
Indicates an issue with the request parameters.{
"error": "'url' parameter is required and must be a non-empty string."
}
Invalid JSON in request body'url' parameter is required and must be a non-empty string.Invalid TikTok video URL format.The comments service could not process the provided URL.The comments service reported an issue.
401 Unauthorized
API key is missing, invalid, or inactive.{
"error": "API key is invalid or missing."
}
403 Forbidden
API key does not have enough credits.{
"error": "Insufficient credits. Please top up your account."
}
404 Not Found
Comments could not be found for the video.{
"error": "Comments not found for video URL: [url]"
}
500 Internal Server Error
An unexpected error occurred on the server.{
"error": "An unexpected server error occurred while fetching the TikTok video comments: [specific error message]"
}
Service not configured. Please contact support.Service authentication failed. Please contact support.An unexpected server error occurred...
502 Bad Gateway
Indicates an issue with an upstream service.{
"error": "Received invalid data structure from comments service."
}
The comments service is currently unavailable.Received invalid data structure from comments service.Error fetching comments data from the upstream service.
503 Service Unavailable
Rate limit exceeded with an upstream service.{
"error": "Rate limit exceeded. Please try again later."
}
Example Request
cURL
curl -X POST \
https://app.dumplingai.com/api/v1/get-tiktok-video-comments \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "url": "https://www.tiktok.com/@username/video/7321234567890123456" }'
Node.js (fetch)
async function getTikTokVideoComments(apiKey, url, cursor = null, count = null) {
const endpoint = 'https://app.dumplingai.com/api/v1/get-tiktok-video-comments';
const body = { url };
if (cursor !== null) body.cursor = cursor;
if (count !== null) body.count = count;
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
body: JSON.stringify(body)
};
try {
const response = await fetch(endpoint, options);
const data = await response.json();
if (!response.ok) {
console.error(`Error: ${response.status}`, data);
return null;
}
console.log(`Fetched ${data.comments.length} comments`);
console.log(`Has more: ${data.hasMore}`);
console.log(`Total comments: ${data.total}`);
return data;
} catch (error) {
console.error('Failed to fetch TikTok video comments:', error);
return null;
}
}
// Example usage - fetch all comments with pagination:
async function getAllComments(apiKey, url) {
let allComments = [];
let cursor = null;
let hasMore = true;
while (hasMore) {
const data = await getTikTokVideoComments(apiKey, url, cursor);
if (!data) break;
allComments = allComments.concat(data.comments);
hasMore = data.hasMore;
cursor = data.cursor;
}
console.log(`Total comments fetched: ${allComments.length}`);
return allComments;
}
// getAllComments('YOUR_API_KEY', 'https://www.tiktok.com/@username/video/7321234567890123456');
Notes
- Use the
cursorfield from the response to paginate through all comments. - The
hasMorefield indicates whether there are additional pages available. - Each comment includes engagement metrics (
digg_count= likes on the comment). - The
reply_commentarray contains nested replies to each comment. - Comments are returned in reverse chronological order (newest first) by default.
- The
totalfield provides the approximate total number of comments available.
Credit Cost
This endpoint costs 10 credits per successful request. For more details, see our Credit Costs page.Rate Limiting
This endpoint is subject to standard API rate limits. Check theX-RateLimit-Limit and X-RateLimit-Remaining headers in the response to monitor your usage.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Cursor for pagination.
Number of comments per page.
Optional identifier describing where the API request originated.
Available options:
API, WEB, MAKE_DOT_COM, ZAPIER, N8N, PLAYGROUND, DEFAULT_AUTOMATION, AGENT_PREVIEW, AGENT_LIVE, AUTOPILOT, STUDIO