Skip to content

抖音 API - 评论回复 (V1)

prod-global
GET
/api/douyin/get-video-sub-comment/v1

获取抖音视频下特定顶级评论的回复,包括回复内容、用户信息、时间戳和点赞数。

典型使用场景:

  • 深入探讨特定讨论串
  • 详细的社区反馈分析

请求参数

参数名位置类型必填说明
tokenquerystring此 API 服务的访问令牌。
commentIdquerystring顶级评论的唯一标识符。
pagequeryinteger页码(从1开始)。

代码示例

💡 环境说明

默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择

bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUE"
text
我想使用 Just One API 提供的“评论回复 (V1)”接口。
接口地址: https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/douyin-apis/comment-replies-v1-zh.json

请求参数说明:
- token (query): 此 API 服务的访问令牌。 (必填)
- commentId (query): 顶级评论的唯一标识符。 (必填)
- page (query): 页码(从1开始)。

返回格式: JSON

响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败,请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 余额不足

请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。
python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUE"
response = requests.get(url)
print(response.json())
js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
php
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

响应结果

json
{
  "code": 0,
  "data": {
    "status_code": 0,
    "comments": [
      {
        "cid": "7251536675678782265",
        "text": "兄弟那你得多补补橱窗牡蛎精安排吧[暗中观察]",
        "aweme_id": "7251517975340027197",
        "create_time": 1688379962,
        "digg_count": 23,
        "status": 1,
        "user": {
          "uid": "74470874573",
          "short_id": "115170456",
          "nickname": "史密斯夫妇💑",
          "signature": "",
          "avatar_larger": {
            "uri": "",
            "url_list": [],
            "width": 720,
            "height": 720
          },
          "avatar_thumb": {
            "uri": "100x100/aweme-avatar/tos-cn-avt-0015_8288a7a3715746c68094a09e88b2affd",
            "url_list": [
              "https://p26.douyinpic.com/aweme-avatar/tos-cn-avt-0015_8288a7a3715746c68094a09e88b2affd~tplv-dy-shri..."
            ],
            "width": 720,
            "height": 720
          },
          "avatar_medium": {
            "uri": "720x720/aweme-avatar/tos-cn-avt-0015_8288a7a3715746c68094a09e88b2affd",
            "url_list": [
              "https://p26.douyinpic.com/aweme-avatar/tos-cn-avt-0015_8288a7a3715746c68094a09e88b2affd~tplv-dy-shri..."
            ],
            "width": 720,
            "height": 720
          },
          "is_verified": true,
          "follow_status": 0,
          "aweme_count": 0,
          "following_count": 0,
          "follower_count": 0,
          "favoriting_count": 0,
          "total_favorited": 0,
          "is_block": false,
          "hide_search": false,
          "constellation": 8,
          "location": "",
          "hide_location": false,
          "weibo_verify": "",
          "custom_verify": "",
          "unique_id": "GMJ_1116",
          "bind_phone": "",
          "special_lock": 0,
          "need_recommend": 0,
          "is_binded_weibo": false,
          "weibo_name": "",
          "weibo_schema": "",
          "weibo_url": "",
          "story_open": false,
          "story_count": 0,
          "has_facebook_token": false,
          "has_twitter_token": false,
          "fb_expire_time": 0,
          "tw_expire_time": 0,
          "has_youtube_token": false,
          "youtube_expire_time": 0,
          "room_id": 0,
          "live_verify": 0,
          "authority_status": 0,
          "verify_info": "",
          "shield_follow_notice": 0,
          "shield_digg_notice": 0,
          "shield_comment_notice": 0,
          "school_name": "",
          "school_poi_id": "",
          "school_type": 0,
          "with_commerce_entry": false,
          "verification_type": 1,
          "enterprise_verify_reason": "",
          "is_ad_fake": false,
          "followers_detail": null,
          "region": "CN",
          "account_region": "",
          "sync_to_toutiao": 0,
          "live_agreement": 0,
          "platform_sync_info": null,
          "with_shop_entry": false,
          "secret": 0,
          "has_orders": false,
          "prevent_download": false,
          "show_image_bubble": false,
          "geofencing": [],
          "unique_id_modify_time": 1773064800,
          "video_icon": {
            "uri": "",
            "url_list": [],
            "width": 720,
            "height": 720
          },
          "ins_id": "",
          "google_account": "",
          "youtube_channel_id": "",
          "youtube_channel_title": "",
          "apple_account": 0,
          "with_dou_entry": false,
          "with_fusion_shop_entry": false,
          "is_phone_binded": false,
          "accept_private_policy": false,
          "twitter_id": "",
          "twitter_name": "",
          "user_canceled": false,
          "has_email": false,
          "is_gov_media_vip": false,
          "live_agreement_time": 0,
          "status": 1,
          "avatar_uri": "aweme-avatar/tos-cn-avt-0015_8288a7a3715746c68094a09e88b2affd",
          "follower_status": 0,
          "neiguang_shield": 0,
          "comment_setting": 0,
          "duet_setting": 0,
          "reflow_page_gid": 0,
          "reflow_page_uid": 0,
          "user_rate": 1,
          "download_setting": -1,
          "download_prompt_ts": 0,
          "react_setting": 0,
          "live_commerce": false,
          "cover_url": [],
          "show_gender_strategy": 1,
          "language": "zh-Hans",
          "has_insights": false,
          "item_list": null,
          "user_mode": 0,
          "user_period": 0,
          "has_unread_story": false,
          "new_story_cover": null,
          "is_star": false,
          "cv_level": "",
          "type_label": null,
          "ad_cover_url": null,
          "comment_filter_status": 0,
          "avatar_168x168": {
            "uri": "",
            "url_list": [],
            "width": 720,
            "height": 720
          },
          "avatar_300x300": {
            "uri": "",
            "url_list": [],
            "width": 720,
            "height": 720
          },
          "relative_users": null,
          "cha_list": null,
          "sec_uid": "MS4wLjABAAAA6KxayaNDf8hvL5Nti7fsnlJIMQRpUQQexZGW8GTIgqk",
          "urge_detail": {
            "user_urged": 0
          },
          "need_points": null,
          "homepage_bottom_toast": null,
          "can_set_geofencing": null,
          "room_id_str": "0",
          "white_cover_url": null,
          "user_tags": null,
          "stitch_setting": 0,
          "is_mix_user": false,
          "enable_nearby_visible": false,
          "ban_user_functions": [],
          "aweme_control": {
            "can_forward": true,
            "can_share": true,
            "can_comment": true,
            "can_show_comment": true
          },
          "user_not_show": 1,
          "ky_only_predict": 0,
          "user_not_see": 0,
          "card_entries": null,
          "signature_display_lines": 5,
          "display_info": null,
          "follower_request_status": 0,
          "live_status": 0,
          "is_not_show": false,
          "card_entries_not_display": null,
          "card_sort_priority": null,
          "show_nearby_active": false,
          "interest_tags": null,
          "school_category": 1,
          "search_impr": {
            "entity_id": "74470874573"
          },
          "link_item_list": null,
          "user_permissions": null,
          "offline_info_list": null,
          "is_cf": 0,
          "is_blocking_v2": false,
          "is_blocked_v2": false,
          "close_friend_type": 0,
          "signature_extra": null,
          "max_follower_count": 0,
          "personal_tag_list": null,
          "cf_list": null,
          "im_role_ids": null,
          "not_seen_item_id_list": null,
          "user_age": -1,
          "contacts_status": 2,
          "risk_notice_text": "",
          "follower_list_secondary_information_struct": null,
          "endorsement_info_list": null,
          "text_extra": null,
          "contrail_list": null,
          "data_label_list": null,
          "not_seen_item_id_list_v2": null,
          "is_ban": false,
          "special_people_labels": null,
          "special_follow_status": 0,
          "familiar_visitor_user": null,
          "live_high_value": 0,
          "avatar_schema_list": null,
          "profile_mob_params": null,
          "disable_image_comment_saved": 0,
          "verification_permission_ids": null,
          "batch_unfollow_relation_desc": null,
          "batch_unfollow_contain_tabs": null,
          "creator_tag_list": null,
          "private_relation_list": null,
          "mate_relation": {
            "mate_status": 0,
            "mate_apply_forward": 0,
            "mate_apply_reverse": 0
          },
          "mate_add_permission": 1,
          "familiar_confidence": 0,
          "mate_count": 0,
          "follower_count_str": "",
          "social_real_relation_type": 0,
          "identity_labels": null,
          "profile_component_disabled": null,
          "story_ttl": 0,
          "story_interactive": 0,
          "house_talent_info": 0,
          "allow_story_normal_like": false,
          "story25_comment": 0
        },
        "reply_id": "7251524159191958327",
        "user_digged": 0,
        "reply_comment": null,
        "text_extra": [],
        "label_text": "",
        "label_type": -1,
        "reply_to_reply_id": "7251535176281932602",
        "reply_to_username": "小虎",
        "reply_to_userid": "63868108170",
        "is_author_digged": true,
        "user_buried": false,
        "label_list": [
          {
            "type": 20,
            "text": "作者赞过"
          }
        ],
        "reply_to_user_sec_id": "MS4wLjABAAAAybe4m-k7fxjK1XQ3SjN3IyECt5Cde__ILrAC79bJSSg",
        "is_hot": false,
        "text_music_info": null,
        "image_list": null,
        "is_note_comment": 0,
        "level": 2,
        "comment_reply_total": 117,
        "video_list": null,
        "content_type": 1,
        "is_folded": false,
        "decorated_emoji_info": null
      }
    ],
    "cursor": 10,
    "has_more": 1,
    "total": 117,
    "extra": {
      "now": 1773064800000,
      "fatal_item_ids": null,
      "scenes": null
    },
    "log_pb": {
      "impr_id": "202603092200008BB27969FB0AD053B5B4"
    },
    "merge_cursor": ""
  }
}

💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。