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

# Get comments for article (public)

> Paginated list of approved, non-deleted comments for the article, each with the author (`firstName`, `lastName`, `avatar`) and the caller's own reaction. When comments are disabled for the article, category, or sub-category, an empty list is returned with 200 instead of an error.



## OpenAPI

````yaml /api-reference/ai-cms/openapi.json get /articles/{id}/comments
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /articles/{id}/comments:
    get:
      tags:
        - Articles
      summary: Get comments for article (public)
      description: >-
        Paginated list of approved, non-deleted comments for the article, each
        with the author (`firstName`, `lastName`, `avatar`) and the caller's own
        reaction. When comments are disabled for the article, category, or
        sub-category, an empty list is returned with 200 instead of an error.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
            example: '{{objectId}}'
        - in: query
          name: page
          schema:
            type: integer
            example: 1
            minimum: 1
        - in: query
          name: limit
          description: Defaults to 20, capped at 100
          schema:
            type: integer
            example: 20
            minimum: 1
            maximum: 100
        - in: query
          name: sortOrder
          description: >-
            Sort by creation time. Any value other than `asc` means newest
            first.
          schema:
            type: string
            enum:
              - asc
              - desc
            example: desc
        - in: query
          name: parentId
          description: >-
            Return only replies to this comment. Takes precedence over
            `rootOnly`.
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
            example: '{{objectId}}'
        - in: query
          name: rootOnly
          description: >-
            Set to `true` to return only top-level comments. Ignored when
            `parentId` is provided.
          schema:
            type: string
            example: 'true'
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Comments retrieved successfully
                data:
                  comments:
                    - _id: '{{objectId}}'
                      articleId: '{{objectId}}'
                      actorType: user
                      actorKey: u:{{objectId}}
                      userId:
                        _id: '{{objectId}}'
                        firstName: Ada
                        lastName: Lovelace
                        avatar: https://cdn.example.com/a.jpg
                      parentId: null
                      content: Great write-up, thanks for sharing.
                      likes: 2
                      dislikes: 0
                      status: approved
                      isDeleted: false
                      createdAt: '2025-05-22T21:42:41.596Z'
                      updatedAt: '2025-05-22T21:42:41.596Z'
                      userReaction: like
                  pagination:
                    total: 1
                    page: 1
                    limit: 20
                    totalPages: 1
        '400':
          description: Bad request (invalid article id, or invalid parentId)
          content:
            application/json:
              example:
                success: false
                statusCode: 400
                message: Invalid parentId
                data: null
        '404':
          description: Article not found
          content:
            application/json:
              example:
                success: false
                statusCode: 404
                message: Article not found
                data: null
        '500':
          description: Server error
          content:
            application/json:
              example:
                success: false
                statusCode: 500
                message: Server Error
                data: null
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````