> ## 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 comment replies

> Get a list of replies to a comment. Requires obtaining the comment ID via fetch_post_comments first. Supports paginated retrieval.

<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">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/instagram/fetch_comment_replies.

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/instagram/fetch_comment_replies

Description: Get a list of replies to a comment. Requires obtaining the comment ID via fetch_post_comments first. Supports paginated retrieval.

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

Parameters:
- code_or_url (Optional): Post shortcode or post URL. Example: DRhvwVLAHAG
- comment_id (Optional): Comment ID. Example: 18067775592012345
- pagination_token (Optional): Pagination token, taken from the previous response

Example Response:
{
"code": 0,
"message": "success",
"data": {
"data": {
  "additional_data": []
},
"pagination_token": null
},
"requestId": "50fafb3b-adde-4f5b-9751-241bfa29460b"
}`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/instagram.openapi.json GET /v1/instagram/fetch_comment_replies
openapi: 3.0.1
info:
  title: Instagram API english documentation
  description: >-
    The english reference documentation of the Instagram 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:
  - JWT Bearer: []
tags: []
paths:
  /v1/instagram/fetch_comment_replies:
    get:
      tags: []
      summary: Get comment replies
      description: >-
        Get a list of replies to a comment. Requires obtaining the comment ID
        via fetch_post_comments first. Supports paginated retrieval.
      parameters:
        - name: code_or_url
          in: query
          description: Post shortcode or post URL
          required: true
          example: COgeEJWLfhn
          schema:
            type: string
            example: COgeEJWLfhn
        - name: comment_id
          in: query
          description: Comment ID
          required: true
          example: '18067775592012345'
          schema:
            type: string
            example: '17884651670198873'
        - name: pagination_token
          in: query
          description: Pagination token, taken from the previous response
          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: 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/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: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````