Skip to content

抖音 API - 视频评论 (V1)

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

根据 awemeId 获取抖音视频的评论列表。 返回评论内容、作者信息、点赞数、回复数和发布时间。

典型应用场景:

  • 情感分析与社区反馈监控
  • 收集特定视频的用户互动数据

请求参数

参数名位置类型必填说明
tokenquerystring此 API 服务的访问令牌。
awemeIdquerystring视频唯一标识符(aweme_id)。
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-comment/v1?token=YOUR_API_KEY&awemeId=VALUE"
text
我想使用 Just One API 提供的“视频评论 (V1)”接口。
接口地址: https://api.justoneapi.com/api/douyin/get-video-comment/v1
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/douyin-apis/video-comments-v1-zh.json

请求参数说明:
- token (query): 此 API 服务的访问令牌。 (必填)
- awemeId (query): 视频唯一标识符(aweme_id)。 (必填)
- 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-comment/v1?token=YOUR_API_KEY&awemeId=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-comment/v1?token=YOUR_API_KEY&awemeId=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-comment/v1?token=YOUR_API_KEY&awemeId=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-comment/v1?token=YOUR_API_KEY&awemeId=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-comment/v1?token=YOUR_API_KEY&awemeId=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": "7610966321379246906",
        "text": "买黄金",
        "aweme_id": "7588740680004963593",
        "create_time": 1772066189,
        "digg_count": 0,
        "status": 1,
        "user": {
          "uid": "2082921180570139",
          "short_id": "72369325753",
          "nickname": "雨雨在摸鱼",
          "signature": "",
          "avatar_larger": {
            "uri": "",
            "url_list": [],
            "width": 720,
            "height": 720
          },
          "avatar_thumb": {
            "uri": "100x100/aweme-avatar/tos-cn-i-0813c000-ce_osHA9AfopEeAAAEiDEgFYC1EICDASdAO3wfyXB",
            "url_list": [
              "https://p26.douyinpic.com/aweme-avatar/tos-cn-i-0813c000-ce_osHA9AfopEeAAAEiDEgFYC1EICDASdAO3wfyXB~t..."
            ],
            "width": 720,
            "height": 720
          },
          "avatar_medium": {
            "uri": "720x720/aweme-avatar/tos-cn-i-0813c000-ce_osHA9AfopEeAAAEiDEgFYC1EICDASdAO3wfyXB",
            "url_list": [
              "https://p26.douyinpic.com/aweme-avatar/tos-cn-i-0813c000-ce_osHA9AfopEeAAAEiDEgFYC1EICDASdAO3wfyXB~t..."
            ],
            "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": 4,
          "location": "",
          "hide_location": false,
          "weibo_verify": "",
          "custom_verify": "",
          "unique_id": "72369325753",
          "bind_phone": "",
          "special_lock": 1,
          "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": 1773067328,
          "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-i-0813c000-ce_osHA9AfopEeAAAEiDEgFYC1EICDASdAO3wfyXB",
          "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": 0,
          "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": "MS4wLjABAAAA7kJiiyarGiyYgrTIrxqrAnImtp3xLhcguIqr1l4VgWj_A3fvWIOoyFAm93nWpqhI",
          "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": true,
          "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": "2082921180570139"
          },
          "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": 1,
          "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": 0,
          "familiar_confidence": 0,
          "mate_count": 0,
          "follower_count_str": "",
          "social_real_relation_type": 0,
          "identity_labels": null,
          "profile_component_disabled": null,
          "story_ttl": 7,
          "story_interactive": 4,
          "house_talent_info": 0,
          "allow_story_normal_like": false,
          "story25_comment": 1
        },
        "reply_id": "0",
        "user_digged": 0,
        "reply_comment": null,
        "text_extra": [],
        "label_text": "",
        "label_type": -1,
        "reply_comment_total": 0,
        "reply_to_reply_id": "0",
        "is_author_digged": false,
        "stick_position": 0,
        "user_buried": false,
        "label_list": null,
        "is_hot": false,
        "text_music_info": null,
        "image_list": null,
        "is_note_comment": 0,
        "can_share": true,
        "item_comment_total": 746,
        "level": 1,
        "video_list": null,
        "sort_tags": "{\"time\":1}",
        "is_user_tend_to_reply": false,
        "content_type": 1,
        "is_folded": false,
        "enter_from": "homepage_hot",
        "decorated_emoji_info": null,
        "ent_parachute_tip": 0
      }
    ],
    "cursor": 60,
    "has_more": 1,
    "reply_style": 2,
    "total": 746,
    "extra": {
      "now": 1773067328000,
      "fatal_item_ids": null,
      "scenes": null
    },
    "log_pb": {
      "impr_id": "2026030922420803324E7983CF6F5B2B78"
    },
    "hotsoon_filtered_count": 0,
    "user_commented": 0,
    "fast_response_comment": {
      "constant_response_words": [
        "赞"
      ],
      "timed_response_words": [
        "早上好"
      ]
    },
    "comment_config": {},
    "general_comment_config": {},
    "show_management_entry_point": 0,
    "folded_comment_count": 0
  }
}

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