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

# Unipile: List Post Comments

> List the comments on a post, or the replies to one comment. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

List the comments on a post, or the replies to one comment.

> [!NOTE]
>
> Tool ID: `unipile_list_post_comments`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'unipile_list_post_comments',
  {
    "account_id": "123456789",
    "post_id": "post_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute unipile_list_post_comments --input '{
  "account_id": "123456789",
  "post_id": "post_123"
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe unipile_list_post_comments --json` for the complete live contract.

## Input reference

Returns a list of either comments on a given post or replies on a given comment.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.cursor` | `string` | No | — | A cursor for pagination purposes. To get the next page of entries, you need to make a new request and fulfill this field with the cursor received in the preceding request. This process should be repeated until all entries have been retrieved. Minimum length: 1. |
| `payload.limit` | `integer` | No | — | A limit for the number of items returned in the response. The value can be set between 1 and 100. Minimum: 1. Maximum: 100. |
| `payload.sort_by` | `"MOST_RECENT" \| "MOST_RELEVANT"` | No | — | The sort method for the post comments. Default is MOST\_RECENT. Allowed: `MOST_RECENT`, `MOST_RELEVANT`. |
| `payload.comment_id` | `string` | No | — | The id of the comment to get replies from. `Linkedin`: use the comment `id` returned by the comments list. |
| `payload.account_id` | `string` | Yes | — | The id of the account to perform the request from. |
| `payload.post_id` | `string` | Yes | — | The ID of the associated post. `Linkedin`: use the `social_id` from the post object (GET post or list posts). The post id visible in url will not work in all case, you can refer here for more details : [https://developer.unipile.com/docs/posts-and-comments](https://developer.unipile.com/docs/posts-and-comments) `Instagram`: Need to use the **provider\_id**. Short code cannot be used here (***[www.instagram.com/p/SHORTCODE](http://www.instagram.com/p/SHORTCODE)***) |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns a list of either comments on a given post or replies on a given comment.",
    "properties": {
      "cursor": {
        "type": "string",
        "description": "A cursor for pagination purposes. To get the next page of entries, you need to make a new request and fulfill this field with the cursor received in the preceding request. This process should be repeated until all entries have been retrieved.",
        "minLength": 1
      },
      "limit": {
        "type": "integer",
        "description": "A limit for the number of items returned in the response. The value can be set between 1 and 100.",
        "minimum": 1,
        "maximum": 100
      },
      "sort_by": {
        "type": "string",
        "description": "The sort method for the post comments. Default is MOST_RECENT.",
        "enum": [
          "MOST_RECENT",
          "MOST_RELEVANT"
        ]
      },
      "comment_id": {
        "type": "string",
        "description": "The id of the comment to get replies from. `Linkedin`: use the comment `id` returned by the comments list."
      },
      "account_id": {
        "type": "string",
        "description": "The id of the account to perform the request from."
      },
      "post_id": {
        "type": "string",
        "description": "The ID of the associated post. `Linkedin`: use the `social_id` from the post object (GET post or list posts). The post id visible in url will not work in all case, you can refer here for more details : https://developer.unipile.com/docs/posts-and-comments `Instagram`: Need to use the **provider_id**. Short code cannot be used here (***www.instagram.com/p/SHORTCODE***)"
      }
    },
    "required": [
      "account_id",
      "post_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"CommentList"` | Yes | — | Allowed: `CommentList`. |
| `result.data.items` | `array` | Yes | — | — |
| `result.data.items[].object` | `"Comment"` | Yes | — | — |
| `result.data.items[].id` | `string` | Yes | — | A unique identifier. |
| `result.data.items[].post_id` | `string` | Yes | — | A unique identifier. |
| `result.data.items[].post_urn` | `string` | Yes | — | A unique identifier. |
| `result.data.items[].thread_id` | `string` | No | — | — |
| `result.data.items[].author` | `string \| null` | Yes | — | — |
| `result.data.items[].author_details` | `object` | Yes | — | — |
| `result.data.items[].author_details.id` | `string \| null` | Yes | — | — |
| `result.data.items[].author_details.headline` | `string \| null` | Yes | — | — |
| `result.data.items[].author_details.profile_url` | `string \| null` | Yes | — | — |
| `result.data.items[].author_details.profile_picture_url` | `string \| null` | Yes | — | — |
| `result.data.items[].author_details.network_distance` | `"FIRST_DEGREE" \| "SECOND_DEGREE" \| "THIRD_DEGREE" \| "OUT_OF_NETWORK" \| null` | Yes | — | — |
| `result.data.items[].date` | `string` | Yes | — | — |
| `result.data.items[].text` | `string` | Yes | — | — |
| `result.data.items[].picture_url` | `string` | No | — | — |
| `result.data.items[].reaction_counter` | `number` | Yes | — | — |
| `result.data.items[].reply_counter` | `number` | Yes | — | — |
| `result.data.items[].impressions_counter` | `number` | No | — | — |
| `result.data.items[].user_reacted` | `"LIKE" \| "PRAISE" \| "APPRECIATION" \| "EMPATHY" \| "INTEREST" \| "ENTERTAINMENT"` | No | — | — |
| `result.data.items[].provider_id` | `string` | Yes | — | — |
| `result.data.items[].author.provider_id` | `string` | Yes | — | — |
| `result.data.items[].author.messaging_id` | `string` | Yes | — | — |
| `result.data.items[].author.public_identifier` | `string` | Yes | — | — |
| `result.data.items[].author.pk` | `string` | Yes | — | — |
| `result.data.items[].author.profile_pic_url` | `string` | Yes | — | — |
| `result.data.items[].author.is_verified` | `boolean` | Yes | — | — |
| `result.data.items[].created_at` | `number` | Yes | — | — |
| `result.data.items[].is_covered` | `boolean` | Yes | — | — |
| `result.data.items[].child_comment_count` | `number` | Yes | — | — |
| `result.data.items[].restricted_status` | `string \| null` | Yes | — | — |
| `result.data.items[].has_liked_comment` | `boolean` | Yes | — | — |
| `result.data.items[].giphy_media_info` | `string \| null` | Yes | — | — |
| `result.data.items[].parent_comment_id` | `string \| null` | Yes | — | — |
| `result.data.items[].comment_like_count` | `number` | Yes | — | — |
| `result.data.cursor` | `string \| null` | Yes | — | — |
| `result.data.total_items` | `number \| null` | Yes | — | — |
| `result.data.paging` | `object` | Yes | — | — |
| `result.data.paging.start` | `number \| null` | Yes | — | — |
| `result.data.paging.page_count` | `number` | Yes | — | — |
| `result.data.paging.total_count` | `number \| null` | Yes | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "CommentList"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "Comment"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "description": "A unique identifier.",
                      "minLength": 1
                    },
                    "post_id": {
                      "type": "string",
                      "description": "A unique identifier.",
                      "minLength": 1
                    },
                    "post_urn": {
                      "type": "string",
                      "description": "A unique identifier.",
                      "minLength": 1
                    },
                    "thread_id": {
                      "type": "string"
                    },
                    "author": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "author_details": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "headline": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "profile_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "profile_picture_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "network_distance": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FIRST_DEGREE"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "SECOND_DEGREE"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "THIRD_DEGREE"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "OUT_OF_NETWORK"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "headline",
                        "profile_url",
                        "profile_picture_url",
                        "network_distance"
                      ],
                      "additionalProperties": false
                    },
                    "date": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "picture_url": {
                      "type": "string"
                    },
                    "reaction_counter": {
                      "type": "number"
                    },
                    "reply_counter": {
                      "type": "number"
                    },
                    "impressions_counter": {
                      "type": "number"
                    },
                    "user_reacted": {
                      "type": "string",
                      "enum": [
                        "LIKE",
                        "PRAISE",
                        "APPRECIATION",
                        "EMPATHY",
                        "INTEREST",
                        "ENTERTAINMENT"
                      ]
                    }
                  },
                  "required": [
                    "object",
                    "id",
                    "post_id",
                    "post_urn",
                    "author",
                    "author_details",
                    "date",
                    "text",
                    "reaction_counter",
                    "reply_counter"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "Comment"
                      ]
                    },
                    "provider_id": {
                      "type": "string"
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "provider_id": {
                          "type": "string"
                        },
                        "messaging_id": {
                          "type": "string"
                        },
                        "public_identifier": {
                          "type": "string"
                        },
                        "pk": {
                          "type": "string"
                        },
                        "profile_pic_url": {
                          "type": "string"
                        },
                        "is_verified": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "provider_id",
                        "messaging_id",
                        "public_identifier",
                        "pk",
                        "profile_pic_url",
                        "is_verified"
                      ],
                      "additionalProperties": false
                    },
                    "text": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "is_covered": {
                      "type": "boolean"
                    },
                    "child_comment_count": {
                      "type": "number"
                    },
                    "restricted_status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "has_liked_comment": {
                      "type": "boolean"
                    },
                    "giphy_media_info": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "parent_comment_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "comment_like_count": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "object",
                    "provider_id",
                    "author",
                    "text",
                    "created_at",
                    "is_covered",
                    "child_comment_count",
                    "restricted_status",
                    "has_liked_comment",
                    "giphy_media_info",
                    "parent_comment_id",
                    "comment_like_count"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_items": {
            "type": [
              "number",
              "null"
            ]
          },
          "paging": {
            "type": "object",
            "properties": {
              "start": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "page_count": {
                "type": "number"
              },
              "total_count": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "start",
              "page_count",
              "total_count"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "object",
          "items",
          "cursor",
          "total_items",
          "paging"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Unipile provider guide](https://deepline.com/docs/providers/unipile/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.