> ## 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 by comment 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">4 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 need to call the following KeyAPI endpoint. Please generate a complete and directly runnable Python example based on the API information provided below.

## API Information

Endpoint: GET https://api.keyapi.ai/v1/facebook/comment_by_id
Summary: Get comment by comment id

Required Headers:
- Authorization: Bearer <YOUR_API_KEY>

Parameters:
- comment_id (Required): No description. Example: 2815848835278004

## Code Requirements

- Use the Python \`requests\` library
- Provide a complete and directly runnable example
- Handle HTTP request errors, timeouts, and non-2xx responses
- Handle JSON parsing errors
- Prefer the Example values provided in the API information for sample parameters
- Keep the code simple and avoid unnecessary abstractions or complexity`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml /en/facebook.openapi.json get /v1/facebook/comment_by_id
openapi: 3.0.1
info:
  title: Facebook API English documentation
  description: >-
    The english reference documentation of the Facebook 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-KeyAPI
security:
  - JWT Bearer: []
tags:
  - name: Pages
  - name: Prefiles
  - name: Groups
  - name: Posts and comments
  - name: Evebts
  - name: Ads Library
  - name: Search
  - name: Marketplace
  - name: Games
paths:
  /v1/facebook/comment_by_id:
    get:
      tags:
        - Posts and comments
      summary: Get comment by comment id
      parameters:
        - name: comment_id
          in: query
          description: ''
          required: true
          example: '2815848835278004'
          schema:
            type: string
            example: '2815848835278004'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  result:
                    type: comment
                    comment_id: Y29tbWVudDoxMDExNzA1MjM2ODUyODU3MV8yODE1ODQ4ODM1Mjc4MDA0
                    legacy_comment_id: '2815848835278004'
                    depth: 0
                    parent_comment_id: null
                    created_time: 1762672282
                    message: >-
                      Those eyes have seen things probably terrible things and
                      never looked away once. These or sharks dressed as
                      guppie’s.
                    author:
                      id: >-
                        pfbid02DxzCkEh3RRirizTUi3SGnKA7zUh1V46SiZ7xVDrA2DCWYK3Z6R8Dz4AHe9ZVvEvQl
                      name: Andy Green
                      gender: MALE
                      url: https://www.facebook.com/andy.green.165033
                      profile_image: >-
                        https://scontent-phl2-1.xx.fbcdn.net/v/t39.30808-1/703065035_10174848245965623_5965657632068434044_n.jpg?stp=cp6_dst-jpg_tt6&cstp=mx1149x1150&ctp=s64x64&_nc_cat=100&ccb=1-7&_nc_sid=e99d92&_nc_ohc=-OdzNWKSCIwQ7kNvwFxNusJ&_nc_oc=Adp-zsKlQyWvAUrhV74caw5nHSxe4G4mb0wlPxiH_b82cW9HhGVGMhkW0dvMi4Pf_OlyLIjwukYeLdSbVPMhHwfZ&_nc_zt=24&_nc_ht=scontent-phl2-1.xx&_nc_gid=e6a9C5vcRFNN-v6q2x8oQA&_nc_ss=7d289&oh=00_AQK4HAy-YoCpu6SmbDEV3KkitvRbv1KroVn6EEk2i4Cl0w&oe=6AB81A14
                    replies_count: 92
                    reactions_count: 1.5K
                    expansion_token: >-
                      MjoxNzkwMDY5NTc5OgF_MrRr3d98oGYdWhO72LD-1y9mQpLHBBSKE7oLiS_tGrqFeQFQTGhV50QWJjZKm-a0zbeC34dJHRYoVFABf2JWyVpb93Rr0-a-0RX9GXC4SbfP4Tzkk28SJVo24PGApISuoSvwqkscvlSaUyac9ePlD8tKllKTUDvKBh1J-OMlkJo28glJF_Ss42Em1Pqi8rQkwKL1jPnvzlSzA6harY_yOPqNILKTthPfOC914jSsLlgNQv1c6gxyWWITv0qJQpgLGNYdMsgPQfwvn9pm1Q-UpHXw0enGYq3yyzkP9a6u06yHW1pkAzOaNTqkt7v_Zazvxm_CsC3UI7VIxY7MiODINEPlO4nw4CLooFAvB1m-OfxG5J9nNrH909ci-FGzH_riEYCxiHzZzz1lqyohDZMuj9yXL72V7rJtW2suwt1GqWNpH_FjzhN3eWS_R6gYX-eWuZTELUBu4PVvMaWZgKUkOSh6mQTaPS7-O6GD_tOr8Teii9mDw3W0qGUYBKuN-x9xY26i3vfFvu6HRo2MFXrzudYU4SfjgRVlURM8Pq2ETT3OqyiFeQ1D5oLB-fhlkHJLHcC5lptABJuW1j0mCgzqQdR3Wpj7duUF01An6eRPZ3QEi8eauT-eVBA_KAtQcEVKf1Mxswy-m6b2LeG9sKCNBQqnqNiRFjvek2dQEQLv8A
                    is_sticker: false
                    sticker: null
                    is_gif: false
                    gif: null
                    image: null
                    video: null
                requestId: 58de1bd9-0c06-4616-a23d-e54b3159bec4
          headers: {}
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '402':
          $ref: '#/components/responses/402'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      deprecated: false
      security:
        - JWT Bearer: []
components:
  responses:
    '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
  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).

````