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

# Get Comments

> Retrieve comments for a post

## Path Parameters

<ParamField path="id" type="string" required>
  The post ID.
</ParamField>

## Query Parameters

<ParamField query="limit" type="number" default="50">
  Number of comments to return (max 100).
</ParamField>

<ParamField query="offset" type="number" default="0">
  Number of comments to skip for pagination.
</ParamField>

## Response

<ResponseField name="data" type="array">
  Array of comment objects.
</ResponseField>

<ResponseField name="total" type="number">
  Total number of comments.
</ResponseField>

<ResponseField name="hasMore" type="boolean">
  Whether there are more comments beyond this page.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.infinipost.co/v1/posts/post_abc123/comments?limit=10', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": [
      {
        "id": "cmt_xyz789",
        "postId": "post_abc123",
        "username": "user123",
        "text": "Amazing content! 🔥",
        "likes": 45,
        "replies": 3,
        "createdAt": "2024-04-21T20:25:00Z"
      },
      {
        "id": "cmt_abc456",
        "postId": "post_abc123",
        "username": "user456",
        "text": "Love this!",
        "likes": 12,
        "replies": 0,
        "createdAt": "2024-04-21T20:26:00Z"
      }
    ],
    "total": 47,
    "hasMore": true
  }
  ```
</ResponseExample>
