> ## 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.

# 获取评论回复

> 获取评论的回复列表，需要先通过fetch_post_comments获取评论ID，支持分页获取

<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">2 credits</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">每次请求</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">🤖 让 AI 帮你写调用代码</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">点击按钮复制一段结构化提示词，可直接交给 ChatGPT、Claude 或其他 AI 助手生成接口调用代码。</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("我想调用 KeyAPI 接口：GET https://api.keyapi.ai/v1/instagram/fetch_comment_replies\n\n请帮我编写调用代码，并包含必要的错误处理、参数校验和响应处理逻辑。\n\n接口信息：\n\nEndpoint: GET https://api.keyapi.ai/v1/instagram/fetch_comment_replies\n\nDescription: Instagram 的「评论回复」接口用于查询评论内容、作者信息、互动指标和分页信息。常用必填参数包括 code_or_url、comment_id。\n\nRequired Headers:\n--header 'Authorization: Bearer <YOUR_API_KEY>'\n\nParameters:\n- code_or_url (Required): code_or_url 参数. Example: COgeEJWLfhn\n- comment_id (Required): comment_id 标识符. Example: 18067775592012345\n- pagination_token (Optional): 分页游标，用于继续获取后续数据\n\nExample Response:\n{\n  \"code\": 0,\n  \"message\": \"success\",\n  \"data\": {\n    \"data\": {\n      \"additional_data\": {\n        \"comment_like_count\": 1,\n        \"content_type\": \"comment\",\n        \"created_at\": 1620349526,\n        \"created_at_for_fb_app\": 1620349526,\n        \"created_at_utc\": 1620349526,\n        \"did_report_as_spam\": false,\n        \"has_disliked_comment\": false,\n        \"id\": \"17884651670198873\",\n        \"is_covered\": false,\n        \"is_edited\": false,\n        \"is_photo_comments_enabled_for_comment_author\": false,\n        \"is_ranked_comment\": false,\n        \"is_text_editable\": false,\n        \"liked_by_media_coauthors\": [],\n        \"liked_by_media_owner_badge_enabled\": true,\n        \"media_id\": \"2567184013910210663\",\n        \"private_reply_status\": 0,\n        \"share_enabled\": true,\n        \"text\": \"Cool shot @javan !\",\n        \"type\": 0,\n        \"user\": {\n          \"fbid_v2\": \"17841400140730091\",\n          \"full_name\": \"N.L.\",\n          \"id\": \"5828691\",\n          \"is_mentionable\": true,\n          \"is_private\": false,\n          \"is_verified\": false,\n          \"latest_reel_media\": 0,\n          \"profile_pic_id\": \"2961856036463206483\",\n          \"profile_pic_url\": \"https://scontent-bos5-1.cdninstagram.com/v/t51.2885-19/313331663_135932802553598_4689213423647997323_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_cat=109&ig_cache_key=GM8PrRL_1mhSoXsAAIs9iKjDbhNBbkULAAAB1501500j-ccb7-5&ccb=7-5&_nc_sid=669407&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=QpxSdiLnIlMQ7kNvwFSnCDG&_nc_oc=AdlhF1rX4zyDdlHrYZashTqUFy2l9pCAJ_x1gV_r6vmQzAejevQudceTJsjYZZPi9CA&_nc_ad=z-m&_nc_cid=0&_nc_zt=24&_nc_ht=scontent-bos5-1.cdninstagram.com&_nc_ss=1a&oh=00_AfwTzCZHszqrsVwPbriV3ZFsEO-5ySlfPTbSADZuZ8gQuQ&oe=69B82E50\",\n          \"username\": \"soundscapist\"\n        }\n      },\n      \"count\": 1,\n      \"items\": [\n        {\n          \"child_comment_index\": 0,\n          \"comment_like_count\": 0,\n          \"content_type\": \"comment\",\n          \"created_at\": 1620361987,\n          \"created_at_for_fb_app\": 1620361987,\n          \"created_at_utc\": 1620361987,\n          \"did_report_as_spam\": false,\n          \"has_disliked_comment\": false,\n          \"hashtags\": [],\n          \"id\": \"17884679318298937\",\n          \"is_covered\": false,\n          \"is_edited\": false,\n          \"is_photo_comments_enabled_for_comment_author\": false,\n          \"is_ranked_comment\": false,\n          \"is_text_editable\": false,\n          \"liked_by_media_coauthors\": [],\n          \"media_id\": \"2567184013910210663\",\n          \"mentions\": [\n            \"@soundscapist\"\n          ],\n          \"parent_comment_id\": \"17884651670198873\",\n          \"private_reply_status\": 0,\n          \"replied_to_comment_id\": \"17884651670198873\",\n          \"share_enabled\": true,\n          \"status\": \"Active\",\n          \"text\": \"@soundscapist Thanks bro!\",\n          \"type\": 2,\n          \"user\": {\n            \"fbid_v2\": \"17841400555810000\",\n            \"full_name\": \"Javan Ng\",\n            \"id\": \"18527\",\n            \"is_mentionable\": true,\n            \"is_private\": false,\n            \"is_verified\": false,\n            \"latest_reel_media\": 1773228407,\n            \"profile_pic_id\": \"3459147014560655728\",\n            \"profile_pic_url\": \"https://scontent-bos5-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_cat=111&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500j-ccb7-5&ccb=7-5&_nc_sid=669407&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=ZUnKRgSAB7UQ7kNvwHf0VhK&_nc_oc=AdnXuCdOx3Zi0lzcRP6EPa47VRj1sjjoVzKS4mWomSF0UddZ0JtcgfOqGYXZVfnMTUw&_nc_ad=z-m&_nc_cid=0&_nc_zt=24&_nc_ht=scontent-bos5-1.cdninstagram.com&_nc_ss=1a&oh=00_Afyi9j3RzRRHO4leSChggRATMa_C_CaYmNH0DzkHsm15rw&oe=69B8463F\",\n            \"username\": \"javan\"\n          }\n        }\n      ],\n      \"total\": 1\n    },\n    \"pagination_token\": null\n  },\n  \"requestId\": \"50fafb3b-adde-4f5b-9751-241bfa29460b\"\n}\n\n请根据以上信息给出可直接运行的示例代码。")}>
      ✨ 复制给 AI
    </button>
  </div>
</div>


## OpenAPI

````yaml zh/instagram.zh.openapi.json GET /v1/instagram/fetch_comment_replies
openapi: 3.0.1
info:
  title: Instagram API 中文文档
  description: Instagram API 的中文参考文档，包含接口用途、参数说明、响应状态和示例结构。
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security:
  - JWT Bearer: []
tags: []
paths:
  /v1/instagram/fetch_comment_replies:
    get:
      tags: []
      summary: 获取评论回复
      description: 获取评论的回复列表，需要先通过fetch_post_comments获取评论ID，支持分页获取
      parameters:
        - name: code_or_url
          in: query
          description: 帖子Shortcode或完整URL
          required: true
          example: COgeEJWLfhn
          schema:
            type: string
            example: COgeEJWLfhn
        - name: comment_id
          in: query
          description: 评论ID
          required: true
          example: '18067775592012345'
          schema:
            type: string
            example: '17884651670198873'
        - name: pagination_token
          in: query
          description: 分页token，从上一次响应获取
          required: false
          schema:
            type: string
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  data:
                    additional_data:
                      comment_like_count: 1
                      content_type: comment
                      created_at: 1620349526
                      created_at_for_fb_app: 1620349526
                      created_at_utc: 1620349526
                      did_report_as_spam: false
                      has_disliked_comment: false
                      id: '17884651670198873'
                      is_covered: false
                      is_edited: false
                      is_photo_comments_enabled_for_comment_author: false
                      is_ranked_comment: false
                      is_text_editable: false
                      liked_by_media_coauthors: []
                      liked_by_media_owner_badge_enabled: true
                      media_id: '2567184013910210663'
                      private_reply_status: 0
                      share_enabled: true
                      text: Cool shot @javan !
                      type: 0
                      user:
                        fbid_v2: '17841400140730091'
                        full_name: N.L.
                        id: '5828691'
                        is_mentionable: true
                        is_private: false
                        is_verified: false
                        latest_reel_media: 0
                        profile_pic_id: '2961856036463206483'
                        profile_pic_url: >-
                          https://scontent-bos5-1.cdninstagram.com/v/t51.2885-19/313331663_135932802553598_4689213423647997323_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_cat=109&ig_cache_key=GM8PrRL_1mhSoXsAAIs9iKjDbhNBbkULAAAB1501500j-ccb7-5&ccb=7-5&_nc_sid=669407&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=QpxSdiLnIlMQ7kNvwFSnCDG&_nc_oc=AdlhF1rX4zyDdlHrYZashTqUFy2l9pCAJ_x1gV_r6vmQzAejevQudceTJsjYZZPi9CA&_nc_ad=z-m&_nc_cid=0&_nc_zt=24&_nc_ht=scontent-bos5-1.cdninstagram.com&_nc_ss=1a&oh=00_AfwTzCZHszqrsVwPbriV3ZFsEO-5ySlfPTbSADZuZ8gQuQ&oe=69B82E50
                        username: soundscapist
                    count: 1
                    items:
                      - child_comment_index: 0
                        comment_like_count: 0
                        content_type: comment
                        created_at: 1620361987
                        created_at_for_fb_app: 1620361987
                        created_at_utc: 1620361987
                        did_report_as_spam: false
                        has_disliked_comment: false
                        hashtags: []
                        id: '17884679318298937'
                        is_covered: false
                        is_edited: false
                        is_photo_comments_enabled_for_comment_author: false
                        is_ranked_comment: false
                        is_text_editable: false
                        liked_by_media_coauthors: []
                        media_id: '2567184013910210663'
                        mentions:
                          - '@soundscapist'
                        parent_comment_id: '17884651670198873'
                        private_reply_status: 0
                        replied_to_comment_id: '17884651670198873'
                        share_enabled: true
                        status: Active
                        text: '@soundscapist Thanks bro!'
                        type: 2
                        user:
                          fbid_v2: '17841400555810000'
                          full_name: Javan Ng
                          id: '18527'
                          is_mentionable: true
                          is_private: false
                          is_verified: false
                          latest_reel_media: 1773228407
                          profile_pic_id: '3459147014560655728'
                          profile_pic_url: >-
                            https://scontent-bos5-1.cdninstagram.com/v/t51.2885-19/460170653_852233457013406_8133149038171915885_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_cat=111&ig_cache_key=GJ2lbRuekngQGgcDAG0GjH31v95wbkULAAAB1501500j-ccb7-5&ccb=7-5&_nc_sid=669407&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy4xMDgwLkMzIn0%3D&_nc_ohc=ZUnKRgSAB7UQ7kNvwHf0VhK&_nc_oc=AdnXuCdOx3Zi0lzcRP6EPa47VRj1sjjoVzKS4mWomSF0UddZ0JtcgfOqGYXZVfnMTUw&_nc_ad=z-m&_nc_cid=0&_nc_zt=24&_nc_ht=scontent-bos5-1.cdninstagram.com&_nc_ss=1a&oh=00_Afyi9j3RzRRHO4leSChggRATMa_C_CaYmNH0DzkHsm15rw&oe=69B8463F
                          username: javan
                    total: 1
                  pagination_token: null
                requestId: 50fafb3b-adde-4f5b-9751-241bfa29460b
          headers: {}
        '400':
          description: 请求参数错误，请检查必填字段和参数格式
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: 鉴权失败，请检查 Authorization Header 中的 Bearer Token 或 API Key 是否有效
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: 账户余额或额度不足
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: 请求过于频繁，已触发限流
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: 服务器内部错误，请稍后重试
          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/instagram/fetch_comment_replies?code_or_url=DRhvwVLAHAG&comment_id=18067775592012345' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/instagram/fetch_comment_replies',
                params={"code_or_url": "DRhvwVLAHAG", "comment_id": "18067775592012345"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"code_or_url": "DRhvwVLAHAG",
            "comment_id": "18067775592012345"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/instagram/fetch_comment_replies?${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: |-
        接口鉴权凭证。请在请求 Header 中传入 `Authorization: Bearer <YOUR_API_KEY>`。
        可在 [Dashboard](https://keyapi.ai/app/dashboard) 获取你的 API Key。

````