> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Video Comments

> Retrieve the comment list for a TikTok video, including comment text, author info, and like counts.

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">1 credit</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/tiktok/video/comments.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/tiktok/video/comments

Description: Retrieve the comment list for a TikTok video, including comment text, author info, and like counts.

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- video_id (Required): Video unique ID. Example: 7560802497552567582
- offset (Optional): When has_more=1, use cursor for the next pagination. Example: 0
- count (Optional). Example: 20

Example Response:
{
"code": 0,
"message": "success",
"data": {
"status_code": 0,
"comments": [
  {
    "cid": "7571269780301513502",
    "text": "My anxiety",
    "aweme_id": "7560802497552567582",
    "create_time": 1762823639,
    "digg_count": 0,
    "status": 1,
    "user": {
      "uid": "7324932749109888042",
      "short_id": "0",
      "nickname": "Lynzee",
      "signature": "",
      "avatar_thumb": {
        "uri": "tos-maliva-avt-0068/9106a043d067becb5bb74ebb30a35cc8",
        "url_list": [
          "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/9106a043d067becb5bb74ebb30a35cc8~tplv-tiktokx-cropcenter-q:100:100:q70.heic?dr=9606&idc=no1a&ps=87d6e48a&refresh_token=6bce6ce1&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1763002800&x-signature=WXQYMW4dceSP9q%2BIknFFcH5jzNc%3D",
          "https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/9106a043d067becb5bb74ebb30a35cc8~tplv-tiktokx-cropcenter-q:100:100:q70.heic?dr=9606&idc=no1a&ps=87d6e48a&refresh_token=a4bd93fd&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1763002800&x-signature=TNYkuNeuj1mAf%2F4YPh5UtLgtC7Y%3D"
        ],
        "width": 720,
        "height": 720,
        "url_prefix": null
      },
      "follow_status": 0,
      "aweme_count": 0,
      "following_count": 0,
      "follower_count": 0,
      "favoriting_count": 0,
      "tota
... (truncated)`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/tiktok.openapi.json GET /v1/tiktok/video/comments
openapi: 3.0.1
info:
  title: Tiktok API english documentation
  description: >-
    The english reference documentation of the Tiktok API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security: []
tags:
  - name: TikTok Influencer
  - name: TikTok Shop
  - name: TikTok Content
  - name: TikTok Intelligence
paths:
  /v1/tiktok/video/comments:
    get:
      tags:
        - TikTok Content
      summary: Get Video Comments
      description: >-
        Retrieve the comment list for a TikTok video, including comment text,
        author info, and like counts.
      operationId: get_api_v3_realtime_video_comments
      parameters:
        - name: video_id
          in: query
          required: true
          schema:
            type: string
            example: '7560802497552567582'
            default: '7560802497552567582'
          example: '7560802497552567582'
          description: Video unique ID
        - name: offset
          in: query
          description: When has_more=1, use cursor for the next pagination
          required: false
          schema:
            type: string
            example: '0'
            default: '0'
          example: '0'
        - name: count
          in: query
          required: false
          schema:
            type: string
            example: '20'
            default: '20'
          example: '20'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties: {}
                example:
                  code: 0
                  message: success
                  data:
                    status_code: 0
                    comments:
                      - cid: '7571269780301513502'
                        text: My anxiety
                        aweme_id: '7560802497552567582'
                        create_time: 1762823639
                        digg_count: 0
                        status: 1
                        user:
                          uid: '7324932749109888042'
                          short_id: '0'
                          nickname: Lynzee
                          signature: ''
                          avatar_thumb:
                            uri: >-
                              tos-maliva-avt-0068/9106a043d067becb5bb74ebb30a35cc8
                            url_list:
                              - >-
                                https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/9106a043d067becb5bb74ebb30a35cc8~tplv-tiktokx-cropcenter-q:100:100:q70.heic?dr=9606&idc=no1a&ps=87d6e48a&refresh_token=6bce6ce1&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1763002800&x-signature=WXQYMW4dceSP9q%2BIknFFcH5jzNc%3D
                              - >-
                                https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/9106a043d067becb5bb74ebb30a35cc8~tplv-tiktokx-cropcenter-q:100:100:q70.heic?dr=9606&idc=no1a&ps=87d6e48a&refresh_token=a4bd93fd&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1763002800&x-signature=TNYkuNeuj1mAf%2F4YPh5UtLgtC7Y%3D
                            width: 720
                            height: 720
                            url_prefix: null
                          follow_status: 0
                          aweme_count: 0
                          following_count: 0
                          follower_count: 0
                          favoriting_count: 0
                          total_favorited: 0
                          is_block: false
                          hide_search: false
                          custom_verify: ''
                          unique_id: lynzee539
                          bind_phone: ''
                          special_lock: 1
                          need_recommend: 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
                          with_commerce_entry: false
                          verification_type: 1
                          enterprise_verify_reason: ''
                          is_ad_fake: false
                          followers_detail: null
                          region: US
                          account_region: ''
                          commerce_user_level: 0
                          live_agreement: 0
                          platform_sync_info: null
                          with_shop_entry: false
                          is_discipline_member: false
                          secret: 0
                          has_orders: false
                          prevent_download: false
                          show_image_bubble: false
                          geofencing: null
                          unique_id_modify_time: 1762917047
                          video_icon:
                            uri: ''
                            url_list: []
                            width: 720
                            height: 720
                            url_prefix: null
                          ins_id: ''
                          google_account: ''
                          youtube_channel_id: ''
                          youtube_channel_title: ''
                          apple_account: 0
                          is_phone_binded: false
                          accept_private_policy: false
                          twitter_id: ''
                          twitter_name: ''
                          user_canceled: false
                          has_email: false
                          status: 1
                          create_time: 0
                          avatar_uri: tos-maliva-avt-0068/9106a043d067becb5bb74ebb30a35cc8
                          follower_status: 0
                          comment_setting: 0
                          duet_setting: 0
                          user_rate: 1
                          download_setting: 0
                          download_prompt_ts: 0
                          react_setting: 0
                          live_commerce: false
                          cover_url: []
                          language: en
                          has_insights: false
                          item_list: null
                          user_mode: 1
                          user_period: 0
                          is_star: false
                          cv_level: ''
                          type_label: null
                          ad_cover_url: null
                          comment_filter_status: 0
                          relative_users: null
                          cha_list: null
                          sec_uid: >-
                            MS4wLjABAAAAudeAhq4so7UHKT1H6bS484pynD2Quy6zWMotOFXZiD-3_9CNXG9lhkpADy0SuAjB
                          need_points: null
                          homepage_bottom_toast: null
                          can_set_geofencing: null
                          white_cover_url: null
                          user_tags: null
                          stitch_setting: 0
                          bold_fields: null
                          search_highlight: null
                          mutual_relation_avatars: null
                          events: null
                          story_status: 0
                          predicted_age_group: ''
                          advance_feature_item_order: null
                          mention_status: 1
                          special_account:
                            special_account_list: null
                          advanced_feature_info: null
                          user_profile_guide: null
                          shield_edit_field_info: null
                          friends_status: 0
                          can_message_follow_status_list:
                            - 0
                            - 1
                            - 2
                            - 4
                          matched_friend_available: false
                          account_labels: null
                          user_now_pack_info: {}
                          fake_data_info: {}
                          is_mute: 0
                          reply_with_video_flag: 4
                          user_spark_info: {}
                          is_mute_non_story_post: 0
                          is_mute_story: 0
                          is_mute_lives: 0
                          enabled_filter_all_comments: false
                        reply_id: '0'
                        user_digged: 0
                        reply_comment:
                          - cid: '7571283919682585375'
                            text: Haha sorry about that. But atleast it works! ☺️
                            aweme_id: '7560802497552567582'
                            create_time: 1762826944
                            digg_count: 0
                            status: 1
                            user:
                              uid: '7112623291400160298'
                              short_id: '0'
                              nickname: Tiff’s Affordable Trends
                              signature: |-
                                Sharing Affordable Trends
                                All Things Family
                                Tiffany@covingtonconscious.com
                              avatar_thumb:
                                uri: >-
                                  tos-maliva-avt-0068/542004caaec33b2c4bdbc6b672dcbeeb
                                url_list:
                                  - >-
                                    https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/542004caaec33b2c4bdbc6b672dcbeeb~tplv-tiktokx-cropcenter-q:100:100:q70.heic?dr=9606&idc=no1a&ps=87d6e48a&refresh_token=9596f1b8&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1763002800&x-signature=gyvdoKP8oyrcEPm9F1E0b8N037w%3D
                                  - >-
                                    https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/542004caaec33b2c4bdbc6b672dcbeeb~tplv-tiktokx-cropcenter-q:100:100:q70.heic?dr=9606&idc=no1a&ps=87d6e48a&refresh_token=ce812a18&s=COMMENT_LIST&sc=avatar&shcp=ff37627b&shp=30310797&t=223449c4&x-expires=1763002800&x-signature=ddB6EHk4HD9dBA4VatR5NUNO1MY%3D
                                width: 720
                                height: 720
                                url_prefix: null
                              follow_status: 0
                              aweme_count: 0
                              following_count: 0
                              follower_count: 0
                              favoriting_count: 0
                              total_favorited: 0
                              is_block: false
                              hide_search: false
                              custom_verify: ''
                              unique_id: tiff.picks
                              bind_phone: ''
                              special_lock: 1
                              need_recommend: 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
                              with_commerce_entry: false
                              verification_type: 1
                              enterprise_verify_reason: ''
                              is_ad_fake: false
                              followers_detail: null
                              region: US
                              account_region: ''
                              commerce_user_level: 0
                              live_agreement: 0
                              platform_sync_info: null
                              with_shop_entry: false
                              is_discipline_member: false
                              secret: 0
                              has_orders: false
                              prevent_download: false
                              show_image_bubble: false
                              geofencing: null
                              unique_id_modify_time: 1762917047
                              video_icon:
                                uri: ''
                                url_list: []
                                width: 720
                                height: 720
                                url_prefix: null
                              ins_id: ''
                              google_account: ''
                              youtube_channel_id: UCt3r0IK7NUimQf1Itio3Svw
                              youtube_channel_title: CovingtonCashConscious
                              apple_account: 0
                              is_phone_binded: false
                              accept_private_policy: false
                              twitter_id: ''
                              twitter_name: ''
                              user_canceled: false
                              has_email: false
                              status: 1
                              create_time: 0
                              avatar_uri: >-
                                tos-maliva-avt-0068/542004caaec33b2c4bdbc6b672dcbeeb
                              follower_status: 0
                              comment_setting: 0
                              duet_setting: 0
                              user_rate: 1
                              download_setting: 0
                              download_prompt_ts: 0
                              react_setting: 0
                              live_commerce: false
                              cover_url: []
                              language: en
                              has_insights: false
                              item_list: null
                              user_mode: 1
                              user_period: 0
                              is_star: false
                              cv_level: ''
                              type_label: null
                              ad_cover_url: null
                              comment_filter_status: 0
                              relative_users: null
                              cha_list: null
                              sec_uid: >-
                                MS4wLjABAAAAT06XtyJeNgAI3FirhD4tZXjfBXUmJ2gUXJADvzFqKBJf9Ty0aRSHXx4YPVQyozxm
                              need_points: null
                              homepage_bottom_toast: null
                              can_set_geofencing: null
                              white_cover_url: null
                              user_tags: null
                              stitch_setting: 0
                              bold_fields: null
                              search_highlight: null
                              mutual_relation_avatars: null
                              events: null
                              story_status: 0
                              predicted_age_group: '4'
                              advance_feature_item_order: null
                              mention_status: 1
                              special_account:
                                special_account_list: null
                              advanced_feature_info: null
                              user_profile_guide: null
                              shield_edit_field_info: null
                              friends_status: 0
                              can_message_follow_status_list:
                                - 0
                                - 1
                                - 2
                                - 4
                              matched_friend_available: false
                              account_labels: null
                              user_now_pack_info: {}
                              fake_data_info: {}
                              is_mute: 0
                              reply_with_video_flag: 4
                              user_spark_info: {}
                              is_mute_non_story_post: 0
                              is_mute_story: 0
                              is_mute_lives: 0
                              enabled_filter_all_comments: false
                            reply_id: '7571269780301513502'
                            user_digged: 0
                            reply_comment: null
                            text_extra: []
                            label_text: Creator
                            label_type: 1
                            reply_to_reply_id: '0'
                            is_author_digged: false
                            stick_position: 0
                            user_buried: false
                            label_list:
                              - type: 1
                                text: Creator
                            author_pin: false
                            no_show: false
                            collect_stat: 0
                            trans_btn_style: 1
                            share_info:
                              acl:
                                code: 0
                                extra: '{}'
                              need_confirm: true
                              desc_tpl: 'Commento di '
                            comment_language: en
                            image_list: null
                            comment_post_item_ids: null
                            forbid_reply_with_video: false
                            is_comment_translatable: true
                            is_high_purchase_intent: false
                            allow_download_photo: true
                        text_extra: []
                        reply_comment_total: 1
                        reply_to_reply_id: '0'
                        is_author_digged: false
                        stick_position: 0
                        user_buried: false
                        label_list: null
                        author_pin: false
                        no_show: false
                        collect_stat: 0
                        trans_btn_style: 1
                        share_info:
                          acl:
                            code: 0
                            extra: '{}'
                          need_confirm: true
                          desc_tpl: 'Commento di '
                        comment_language: en
                        image_list: null
                        comment_post_item_ids: null
                        forbid_reply_with_video: false
                        is_comment_translatable: true
                        sort_extra_score:
                          reply_score: 0.000104
                          show_more_score: 0.000274
                        sort_tags: '{"author_reply":1,"top_list":1}'
                        is_high_purchase_intent: false
                        allow_download_photo: true
                    cursor: 1
                    has_more: 1
                    reply_style: 2
                    total: 7102
                    extra:
                      now: 1762917047000
                      fatal_item_ids: null
                      api_debug_info: null
                    log_pb:
                      impr_id: 202511120310475A0766D788E9F89C583A
                    top_gifts: null
                    has_filtered_comments: 0
                    alias_comment_deleted: false
                    status_msg: ''
                  requestId: aac551b2-7a94-4cef-aa23-a6463c64643a
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/tiktok/video/comments?video_id=7560802497552567582&offset=0&count=20' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/tiktok/video/comments',
                params={"video_id": "7560802497552567582", "offset": "0", "count": "20"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"video_id":
            "7560802497552567582", "offset": "0", "count": "20"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/tiktok/video/comments?${params}`, {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````