Skip to content

Douyin (TikTok China) Video Comments API (V1) ​

GET
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...

Retrieves top-level comments for a Douyin (TikTok China) video by aweme ID with page-based pagination. Use it to review audience feedback or analyze discussion around a known video.

Parameters ​

NameInTypeRequiredDefaultDescription
tokenquerystringYes-Access token for this API service.
awemeIdquerystringYes-The unique video identifier (aweme_id).
pagequeryintegerNo1Page number (starting from 1).

Code Samples ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE'
text
I want to use the "Video Comments (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE
API Endpoint: BASE_URL + /api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/douyin-tiktok-china/video-comments-v1-en.json

Parameters:
- token (query): Access token for this API service. (Required)
- awemeId (query): The unique video identifier (aweme_id). (Required)
- page (query): Page number (starting from 1).

Return format: safely handle JSON or text according to the actual Content-Type.

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
python
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

url = BASE_URL + "/api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
js
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
        final String url = BASE_URL + "/api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
go
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/douyin/get-video-comment/v1?token=YOUR_API_KEY&awemeId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}

Response Fields ​

Key fields in a successful response (code = 0).

Comment overview7 fields

data.comments[]

One top-level comment on the video.

FieldTypeDescription
cidstringComment ID as text.
aweme_idstringID of the Douyin video associated with the comment, as text.
textstringText of the comment. Comments with media can have empty text.
create_timeintegerComment publication time as a Unix timestamp in seconds.
ip_labelstringDisplayed IP-location label for the comment, when present.
content_typeintegerNumeric content type code reported for this comment.
statusintegerNumeric status code reported for this comment.
Engagement and labels13 fields

data.comments[]

FieldTypeDescription
digg_countintegerReported like count for this comment.
is_hotbooleanWhether this comment is marked as popular.
is_foldedbooleanWhether this comment is marked as folded.
is_author_diggedbooleanWhether the video author liked this comment.
user_diggedintegerNumeric like status reported for the viewer context.
can_collectbooleanWhether the response marks the comment as available to save.
can_sharebooleanWhether the response marks the comment as available to share.
label_textstringComment label text, which may be empty.
label_typeintegerNumeric type code reported for the comment label.
label_listarray | nullList of labels returned with this comment. The field can be null.
label_list[]objectOne label attached to the comment.
label_list[].typeintegerNumeric type code reported for the comment label.
label_list[].textstringDisplayed text for this label.
Comment author17 fields

data.comments[].user

Public account information for the comment author.

FieldTypeDescription
uidstringDouyin account ID as text.
sec_uidstringPublic Douyin account identifier used in profile links.
short_idstringShort account identifier reported by Douyin.
unique_idstringPublic Douyin handle, when available.
nicknamestringDisplay name of the comment author.
avatar_thumbobjectThumbnail avatar asset.
avatar_thumb.uristringPlatform resource identifier for this asset.
avatar_thumb.url_listarrayURLs returned for this asset.
avatar_thumb.url_list[]stringOne URL for this asset.
avatar_thumb.widthintegerReported width of this asset in pixels.
avatar_thumb.heightintegerReported height of this asset in pixels.
avatar_mediumobjectMedium-size avatar asset.
avatar_medium.uristringPlatform resource identifier for this asset.
avatar_medium.url_listarrayURLs returned for this asset.
avatar_medium.url_list[]stringOne URL for this asset.
avatar_medium.widthintegerReported width of this asset in pixels.
avatar_medium.heightintegerReported height of this asset in pixels.
Reply previews26 fields

data.comments[]

FieldTypeDescription
reply_comment_totalintegerReported reply count for this comment. Preview replies can cover only part of that count.
reply_idstringReported parent comment ID. A top-level comment can return "0".
reply_to_reply_idstringReported ID for a reply-to-reply target. This can be "0".
reply_commentarray | nullOptional preview replies included with this comment. Use the Comment Replies endpoint for the paginated reply list.
reply_comment[]objectOne reply included in a comment preview.
reply_comment[].cidstringComment ID as text.
reply_comment[].aweme_idstringID of the Douyin video associated with the comment, as text.
reply_comment[].textstringText of the comment. Comments with media can have empty text.
reply_comment[].create_timeintegerComment publication time as a Unix timestamp in seconds.
reply_comment[].digg_countintegerReported like count for this comment.
reply_comment[].reply_idstringReported parent comment ID. A top-level comment can return "0".
reply_comment[].reply_to_reply_idstringReported ID for a reply-to-reply target. This can be "0".
reply_comment[].is_author_diggedbooleanWhether the video author liked this comment.
reply_comment[].label_textstringComment label text, which may be empty.
reply_comment[].userobjectPublic account information for the reply author.
reply_comment[].user.uidstringDouyin account ID as text.
reply_comment[].user.sec_uidstringPublic Douyin account identifier used in profile links.
reply_comment[].user.short_idstringShort account identifier reported by Douyin.
reply_comment[].user.unique_idstringPublic Douyin handle, when available.
reply_comment[].user.nicknamestringDisplay name of the comment author.
reply_comment[].user.avatar_thumbobjectThumbnail avatar asset.
reply_comment[].user.avatar_thumb.uristringPlatform resource identifier for this asset.
reply_comment[].user.avatar_thumb.url_listarrayURLs returned for this asset.
reply_comment[].user.avatar_thumb.url_list[]stringOne URL for this asset.
reply_comment[].user.avatar_thumb.widthintegerReported width of this asset in pixels.
reply_comment[].user.avatar_thumb.heightintegerReported height of this asset in pixels.
Comment images32 fields

data.comments[]

FieldTypeDescription
image_listarray | nullImages attached to this comment. The field can be null.
image_list[]objectOne image with its available variants.
image_list[].origin_urlobjectOriginal image variant.
image_list[].origin_url.uristringPlatform resource identifier for this asset.
image_list[].origin_url.url_listarrayURLs returned for this asset.
image_list[].origin_url.url_list[]stringOne URL for this asset.
image_list[].origin_url.widthintegerReported width of this asset in pixels.
image_list[].origin_url.heightintegerReported height of this asset in pixels.
image_list[].crop_urlobjectCropped image variant.
image_list[].crop_url.uristringPlatform resource identifier for this asset.
image_list[].crop_url.url_listarrayURLs returned for this asset.
image_list[].crop_url.url_list[]stringOne URL for this asset.
image_list[].crop_url.widthintegerReported width of this asset in pixels.
image_list[].crop_url.heightintegerReported height of this asset in pixels.
image_list[].thumb_urlobjectThumbnail image variant.
image_list[].thumb_url.uristringPlatform resource identifier for this asset.
image_list[].thumb_url.url_listarrayURLs returned for this asset.
image_list[].thumb_url.url_list[]stringOne URL for this asset.
image_list[].thumb_url.widthintegerReported width of this asset in pixels.
image_list[].thumb_url.heightintegerReported height of this asset in pixels.
image_list[].medium_urlobjectMedium-size image variant.
image_list[].medium_url.uristringPlatform resource identifier for this asset.
image_list[].medium_url.url_listarrayURLs returned for this asset.
image_list[].medium_url.url_list[]stringOne URL for this asset.
image_list[].medium_url.widthintegerReported width of this asset in pixels.
image_list[].medium_url.heightintegerReported height of this asset in pixels.
image_list[].download_urlobjectImage asset listed for download.
image_list[].download_url.uristringPlatform resource identifier for this asset.
image_list[].download_url.url_listarrayURLs returned for this asset.
image_list[].download_url.url_list[]stringOne URL for this asset.
image_list[].download_url.widthintegerReported width of this asset in pixels.
image_list[].download_url.heightintegerReported height of this asset in pixels.
Stickers20 fields

data.comments[]

FieldTypeDescription
stickerobjectSticker attached to the comment, when present.
sticker.idintegerNumeric sticker ID.
sticker.id_strstringSticker ID as text.
sticker.author_sec_uidstringPublic Douyin account identifier of the sticker author.
sticker.origin_package_idintegerID of the sticker's original pack.
sticker.sticker_typeintegerNumeric type code reported for the sticker.
sticker.widthintegerReported width of this asset in pixels.
sticker.heightintegerReported height of this asset in pixels.
sticker.static_urlobjectStatic sticker asset.
sticker.static_url.uristringPlatform resource identifier for this asset.
sticker.static_url.url_listarrayURLs returned for this asset.
sticker.static_url.url_list[]stringOne URL for this asset.
sticker.static_url.widthintegerReported width of this asset in pixels.
sticker.static_url.heightintegerReported height of this asset in pixels.
sticker.animate_urlobjectAnimated sticker asset.
sticker.animate_url.uristringPlatform resource identifier for this asset.
sticker.animate_url.url_listarrayURLs returned for this asset.
sticker.animate_url.url_list[]stringOne URL for this asset.
sticker.animate_url.widthintegerReported width of this asset in pixels.
sticker.animate_url.heightintegerReported height of this asset in pixels.
Text annotations7 fields

data.comments[]

FieldTypeDescription
text_extraarrayAnnotations associated with the comment text, such as a user mention.
text_extra[]objectOne annotation in the comment text.
text_extra[].typeintegerNumeric type code reported for the text annotation.
text_extra[].startintegerReported start offset of the annotation within the comment text.
text_extra[].endintegerReported end offset of the annotation within the comment text.
text_extra[].user_idstringDouyin account ID associated with the annotation, as text.
text_extra[].sec_uidstringPublic Douyin account identifier associated with the annotation.
Pagination and response8 fields

data

One page of top-level comments for the requested Douyin video.

FieldTypeDescription
commentsarray | nullTop-level comments on the requested page. An empty page can return null. Comments can recur across pages. Use cid to deduplicate.
comments[].item_comment_totalintegerVideo-wide comment total reported alongside this comment.
status_codeintegerInner status code reported for the comment page.
cursorintegerPagination position reported for the response. To continue, increment the request's page parameter.
has_moreintegerPagination flag. A value of 1 reports another page. A value of 0 indicates the end.
totalintegerComment total reported for this page. It can differ from the number of distinct comments retrieved across pages. An empty page can report 0.
extraobjectAdditional timing metadata for the comment page.
extra.nowintegerReported response timestamp as Unix milliseconds.

Response Example ​

Loading the response example...