---
title: "TikTok Comment Replies API (V1)"
description: "Retrieves replies to a specific comment on a TikTok post with cursor pagination. Use it to inspect threaded discussions and continue through reply pages for a known post comment."
aiUsagePrompt: true
---

# TikTok Comment Replies API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/tiktok/get-post-sub-comment/v1\"")'
  :summary='JSON.parse("\"Comment Replies (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/tiktok/comment-replies-v1-en.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Security token for API access.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"awemeId\",\"in\":\"query\",\"description\":\"The unique ID of the TikTok post.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"commentId\",\"in\":\"query\",\"description\":\"The unique ID of the comment to retrieve replies for.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"cursor\",\"in\":\"query\",\"description\":\"Pagination cursor. Start with &#39;0&#39;.\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"0\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Replies to the requested TikTok post comment, with pagination information.\",\"properties\":{\"comments\":{\"type\":\"array\",\"description\":\"Replies returned on the current page.\",\"items\":{\"type\":\"object\",\"description\":\"One reply returned for the requested parent comment.\",\"properties\":{\"cid\":{\"type\":\"string\",\"description\":\"TikTok identifier of this comment.\"},\"aweme_id\":{\"type\":\"string\",\"description\":\"TikTok post identifier associated with this comment.\"},\"reply_id\":{\"type\":\"string\",\"description\":\"ID of the parent comment whose replies were requested.\"},\"reply_to_reply_id\":{\"type\":\"string\",\"description\":\"ID of the reply directly addressed by this entry. The string 0 was observed for replies directly to the parent comment.\"},\"reply_to_userid\":{\"type\":\"string\",\"description\":\"TikTok user ID of the directly addressed reply author, when supplied.\"},\"reply_to_username\":{\"type\":\"string\",\"description\":\"Public username of the directly addressed reply author, when supplied.\"},\"reply_to_nickname\":{\"type\":\"string\",\"description\":\"Display name of the directly addressed reply author, when supplied.\"},\"thread_id\":{\"type\":\"integer\",\"description\":\"Numeric thread identifier reported for this reply.\"},\"thread_has_more\":{\"type\":\"boolean\",\"description\":\"Thread-level flag reported for this reply. Use response-level has_more to decide whether to request another reply-list page.\"},\"text\":{\"type\":\"string\",\"description\":\"Text of the comment.\"},\"create_time\":{\"type\":\"integer\",\"description\":\"Comment creation time as a Unix timestamp in seconds.\"},\"comment_language\":{\"type\":\"string\",\"description\":\"Reported language code of the comment.\"},\"content_type\":{\"type\":\"integer\",\"description\":\"Numeric content type reported for the comment.\"},\"text_extra\":{\"type\":\"array\",\"description\":\"Supplementary text annotations for the comment. This array can be empty.\",\"items\":{\"type\":\"object\",\"description\":\"One annotation attached to the reply text.\",\"properties\":{\"start\":{\"type\":\"integer\",\"description\":\"Zero-based start of the annotation in UTF-16 code units.\"},\"end\":{\"type\":\"integer\",\"description\":\"Zero-based exclusive end of the annotation in UTF-16 code units.\"},\"type\":{\"type\":\"integer\",\"description\":\"Numeric annotation type. Type 0 was observed for user mentions.\"},\"user_id\":{\"type\":\"string\",\"description\":\"TikTok user identifier reported for a user mention.\"},\"sec_uid\":{\"type\":\"string\",\"description\":\"Secondary TikTok user identifier reported for a user mention.\"}}}},\"image_list\":{\"description\":\"Comment image attachment field. The verified responses returned null.\"},\"label_list\":{\"description\":\"Labels attached to the comment. Observed responses returned null.\"},\"reply_comment\":{\"description\":\"Nested reply preview for this record. Observed responses returned null.\"},\"digg_count\":{\"type\":\"integer\",\"description\":\"Reported number of likes on the comment.\"},\"is_author_digged\":{\"type\":\"boolean\",\"description\":\"Whether the post author liked the comment.\"},\"is_comment_translatable\":{\"type\":\"boolean\",\"description\":\"Whether TikTok marks the comment as translatable.\"},\"status\":{\"type\":\"integer\",\"description\":\"Numeric status reported for the comment.\"},\"share_info\":{\"type\":\"object\",\"description\":\"Share information associated with the comment.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Title in the comment share information.\"},\"desc\":{\"type\":\"string\",\"description\":\"Description in the comment share information.\"},\"url\":{\"type\":\"string\",\"description\":\"URL in the comment share information.\"}}},\"user\":{\"type\":\"object\",\"description\":\"Public profile of the user who wrote the reply.\",\"properties\":{\"uid\":{\"type\":\"string\",\"description\":\"TikTok user ID.\"},\"sec_uid\":{\"type\":\"string\",\"description\":\"Secondary TikTok user identifier.\"},\"unique_id\":{\"type\":\"string\",\"description\":\"Public username of the TikTok user.\"},\"nickname\":{\"type\":\"string\",\"description\":\"Display name of the TikTok user.\"},\"avatar_uri\":{\"type\":\"string\",\"description\":\"Image reference for the user avatar.\"},\"avatar_thumb\":{\"type\":\"object\",\"description\":\"Thumbnail avatar and its available image URLs.\",\"properties\":{\"uri\":{\"type\":\"string\",\"description\":\"Image reference for the avatar thumbnail.\"},\"width\":{\"type\":\"integer\",\"description\":\"Avatar thumbnail width in pixels.\"},\"height\":{\"type\":\"integer\",\"description\":\"Avatar thumbnail height in pixels.\"},\"url_list\":{\"type\":\"array\",\"description\":\"Available URLs of the avatar thumbnail.\",\"items\":{\"type\":\"string\",\"description\":\"URL of the avatar thumbnail.\"}}}},\"region\":{\"type\":\"string\",\"description\":\"Region code reported with this user profile.\"},\"language\":{\"type\":\"string\",\"description\":\"Language code reported with this user profile.\"}}}}}},\"cursor\":{\"type\":\"integer\",\"description\":\"Cursor returned for reply pagination. When has_more is 1, pass this integer as exact decimal text in cursor using the same awemeId and commentId.\"},\"has_more\":{\"type\":\"integer\",\"description\":\"Reported reply pagination flag. The value 1 indicates another page. Stop when the value is 0, even if cursor is populated.\"},\"total\":{\"type\":\"integer\",\"description\":\"Reported total replies to the requested parent comment. The current page can contain fewer replies.\"},\"status_code\":{\"type\":\"integer\",\"description\":\"Numeric status code in the TikTok comment payload.\"},\"status_msg\":{\"type\":\"string\",\"description\":\"Status message in the TikTok comment payload. It can be an empty string.\"}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Invalid request parameters or body\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Invalid or inactive access token\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Permission denied\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Request rate or daily quota limit exceeded\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Internal server error\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Service temporarily unavailable\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"Global production API (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/tiktok/get-post-sub-comment/v1\"")' />

<p>Retrieves replies to a specific comment on a TikTok post with cursor pagination. Use it to inspect threaded discussions and continue through reply pages for a known post comment.</p>

## Parameters

<div class="api-doc-table api-doc-table--params">

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Yes | - | Security token for API access. |
| <code>awemeId</code> | query | <code>string</code> | Yes | - | The unique ID of the TikTok post. |
| <code>commentId</code> | query | <code>string</code> | Yes | - | The unique ID of the comment to retrieve replies for. |
| <code>cursor</code> | query | <code>string</code> | No | <code>0</code> | Pagination cursor. Start with '0'. |

</div>

## Code Samples

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=VALUE'
```

```text [🤖 AI Prompt]
I want to use the "Comment Replies (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=VALUE
API Endpoint: BASE_URL + /api/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/tiktok/comment-replies-v1-en.json

Parameters:
- token (query): Security token for API access. (Required)
- awemeId (query): The unique ID of the TikTok post. (Required)
- commentId (query): The unique ID of the comment to retrieve replies for. (Required)
- cursor (query): Pagination cursor. Start with '0'.

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 [🐍 Python]
import requests

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

url = BASE_URL + "/api/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=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 [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=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 [☕ 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/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=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 [🐹 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/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=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]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/tiktok/get-post-sub-comment/v1?token=YOUR_API_KEY&awemeId=VALUE&commentId=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;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/tiktok/comment-replies-v1-en.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI Definition (JSON)]</a>
</div>

## Response Fields

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

<div class="api-doc-table api-doc-table--response">

| Field path | Type | Description |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Replies to the requested TikTok post comment, with pagination information. |
| <code>data.comments</code> | <code>array</code> | Replies returned on the current page. |
| <code>data.comments[]</code> | <code>object</code> | One reply returned for the requested parent comment. |
| <code>data.comments[].cid</code> | <code>string</code> | TikTok identifier of this comment. |
| <code>data.comments[].aweme_id</code> | <code>string</code> | TikTok post identifier associated with this comment. |
| <code>data.comments[].reply_id</code> | <code>string</code> | ID of the parent comment whose replies were requested. |
| <code>data.comments[].reply_to_reply_id</code> | <code>string</code> | ID of the reply directly addressed by this entry. The string 0 was observed for replies directly to the parent comment. |
| <code>data.comments[].reply_to_userid</code> | <code>string</code> | TikTok user ID of the directly addressed reply author, when supplied. |
| <code>data.comments[].reply_to_username</code> | <code>string</code> | Public username of the directly addressed reply author, when supplied. |
| <code>data.comments[].reply_to_nickname</code> | <code>string</code> | Display name of the directly addressed reply author, when supplied. |
| <code>data.comments[].thread_id</code> | <code>integer</code> | Numeric thread identifier reported for this reply. |
| <code>data.comments[].thread_has_more</code> | <code>boolean</code> | Thread-level flag reported for this reply. Use response-level has_more to decide whether to request another reply-list page. |
| <code>data.comments[].text</code> | <code>string</code> | Text of the comment. |
| <code>data.comments[].create_time</code> | <code>integer</code> | Comment creation time as a Unix timestamp in seconds. |
| <code>data.comments[].comment_language</code> | <code>string</code> | Reported language code of the comment. |
| <code>data.comments[].content_type</code> | <code>integer</code> | Numeric content type reported for the comment. |
| <code>data.comments[].text_extra</code> | <code>array</code> | Supplementary text annotations for the comment. This array can be empty. |
| <code>data.comments[].text_extra[]</code> | <code>object</code> | One annotation attached to the reply text. |
| <code>data.comments[].text_extra[].start</code> | <code>integer</code> | Zero-based start of the annotation in UTF-16 code units. |
| <code>data.comments[].text_extra[].end</code> | <code>integer</code> | Zero-based exclusive end of the annotation in UTF-16 code units. |
| <code>data.comments[].text_extra[].type</code> | <code>integer</code> | Numeric annotation type. Type 0 was observed for user mentions. |
| <code>data.comments[].text_extra[].user_id</code> | <code>string</code> | TikTok user identifier reported for a user mention. |
| <code>data.comments[].text_extra[].sec_uid</code> | <code>string</code> | Secondary TikTok user identifier reported for a user mention. |
| <code>data.comments[].image_list</code> | - | Comment image attachment field. The verified responses returned null. |
| <code>data.comments[].label_list</code> | - | Labels attached to the comment. Observed responses returned null. |
| <code>data.comments[].reply_comment</code> | - | Nested reply preview for this record. Observed responses returned null. |
| <code>data.comments[].digg_count</code> | <code>integer</code> | Reported number of likes on the comment. |
| <code>data.comments[].is_author_digged</code> | <code>boolean</code> | Whether the post author liked the comment. |
| <code>data.comments[].is_comment_translatable</code> | <code>boolean</code> | Whether TikTok marks the comment as translatable. |
| <code>data.comments[].status</code> | <code>integer</code> | Numeric status reported for the comment. |
| <code>data.comments[].share_info</code> | <code>object</code> | Share information associated with the comment. |
| <code>data.comments[].share_info.title</code> | <code>string</code> | Title in the comment share information. |
| <code>data.comments[].share_info.desc</code> | <code>string</code> | Description in the comment share information. |
| <code>data.comments[].share_info.url</code> | <code>string</code> | URL in the comment share information. |
| <code>data.comments[].user</code> | <code>object</code> | Public profile of the user who wrote the reply. |
| <code>data.comments[].user.uid</code> | <code>string</code> | TikTok user ID. |
| <code>data.comments[].user.sec_uid</code> | <code>string</code> | Secondary TikTok user identifier. |
| <code>data.comments[].user.unique_id</code> | <code>string</code> | Public username of the TikTok user. |
| <code>data.comments[].user.nickname</code> | <code>string</code> | Display name of the TikTok user. |
| <code>data.comments[].user.avatar_uri</code> | <code>string</code> | Image reference for the user avatar. |
| <code>data.comments[].user.avatar_thumb</code> | <code>object</code> | Thumbnail avatar and its available image URLs. |
| <code>data.comments[].user.avatar_thumb.uri</code> | <code>string</code> | Image reference for the avatar thumbnail. |
| <code>data.comments[].user.avatar_thumb.width</code> | <code>integer</code> | Avatar thumbnail width in pixels. |
| <code>data.comments[].user.avatar_thumb.height</code> | <code>integer</code> | Avatar thumbnail height in pixels. |
| <code>data.comments[].user.avatar_thumb.url_list</code> | <code>array</code> | Available URLs of the avatar thumbnail. |
| <code>data.comments[].user.avatar_thumb.url_list[]</code> | <code>string</code> | URL of the avatar thumbnail. |
| <code>data.comments[].user.region</code> | <code>string</code> | Region code reported with this user profile. |
| <code>data.comments[].user.language</code> | <code>string</code> | Language code reported with this user profile. |
| <code>data.cursor</code> | <code>integer</code> | Cursor returned for reply pagination. When has_more is 1, pass this integer as exact decimal text in cursor using the same awemeId and commentId. |
| <code>data.has_more</code> | <code>integer</code> | Reported reply pagination flag. The value 1 indicates another page. Stop when the value is 0, even if cursor is populated. |
| <code>data.total</code> | <code>integer</code> | Reported total replies to the requested parent comment. The current page can contain fewer replies. |
| <code>data.status_code</code> | <code>integer</code> | Numeric status code in the TikTok comment payload. |
| <code>data.status_msg</code> | <code>string</code> | Status message in the TikTok comment payload. It can be an empty string. |

</div>

## Response Example

<ApiExampleSection :api='JSON.parse("\"/api/tiktok/get-post-sub-comment/v1\"")' />

