> ## 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.

# HarvestAPI: Get Post Comments

> List the comments (commenters and text) on one LinkedIn post by post URL, as an engagement signal. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List the comments (commenters and text) on one LinkedIn post by post URL, as an engagement signal.

> [!NOTE]
>
> Tool ID: `harvestapi_get_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(
  'harvestapi_get_post_comments',
  {
    "post": "example",
    "sortBy": "example",
    "page": 1
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute harvestapi_get_post_comments --input '{
  "post": "example",
  "sortBy": "example",
  "page": 1
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "elements": [
      {
        "id": "id_123",
        "linkedinUrl": "https://example.com/resource",
        "commentary": "example",
        "createdAt": "2026-01-15T12:00:00Z",
        "numComments": 123,
        "postId": "post_123",
        "actor": {
          "id": "id_123",
          "name": "Example",
          "linkedinUrl": "https://example.com/resource",
          "author": true
        },
        "createdAtTimestamp": 123,
        "pinned": true,
        "contributed": true,
        "edited": true
      }
    ],
    "pagination": {
      "totalPages": 123,
      "totalElements": 123,
      "pageNumber": 123
    },
    "status": 1
  }
}
```

Use `deepline describe harvestapi_get_post_comments --json` for the latest machine-readable contract.

## Input reference

Get comments of LinkedIn post by post URL.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.post` | `string` | No | — | URL of the LinkedIn post (required) Minimum length: 1. |
| `payload.sortBy` | `string` | No | — | Sort comments by field. Supported values: 'relevance', 'date' |
| `payload.page` | `integer` | No | `1` | Page number for pagination. Default is 1 |
| `payload.paginationToken` | `string` | No | — | Required only if sortBy is 'relevance' and page > 1. Use this token from the previous page response. Format: `nullable`. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Get comments of LinkedIn post by post URL.",
    "properties": {
      "post": {
        "type": "string",
        "description": "URL of the LinkedIn post (required)",
        "minLength": 1
      },
      "sortBy": {
        "type": "string",
        "description": "Sort comments by field. Supported values: 'relevance', 'date'"
      },
      "page": {
        "type": "integer",
        "description": "Page number for pagination. Default is 1",
        "default": 1
      },
      "paginationToken": {
        "type": "string",
        "description": "Required only if sortBy is 'relevance' and page > 1. Use this token from the previous page response.",
        "format": "nullable"
      }
    },
    "required": [],
    "allOf": [
      {
        "anyOf": [
          {
            "required": [
              "post"
            ]
          }
        ]
      }
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.elements` | `array` | No | — | — |
| `result.data.elements[].id` | `string` | Yes | — | The unique identifier for the comment. |
| `result.data.elements[].linkedinUrl` | `string` | Yes | — | The direct URL to the comment on LinkedIn. Format: `uri`. |
| `result.data.elements[].commentary` | `string` | Yes | — | The text content of the comment. |
| `result.data.elements[].createdAt` | `string` | Yes | — | The ISO 8601 timestamp of when the comment was created. Format: `date-time`. |
| `result.data.elements[].numComments` | `integer` | Yes | — | The number of replies to this comment. |
| `result.data.elements[].numShares` | `integer \| null` | No | — | The number of times this comment has been shared (often null for comments). |
| `result.data.elements[].numImpressions` | `integer \| null` | No | — | The number of impressions for this comment (often null). |
| `result.data.elements[].reactionTypeCounts` | `array` | No | — | A list of reaction types and their counts for this comment. |
| `result.data.elements[].reactionTypeCounts[].type` | `"LIKE" \| "EMPATHY" \| "PRAISE" \| "INTEREST" \| "MAYBE"` | Yes | — | The type of reaction. Allowed: `LIKE`, `EMPATHY`, `PRAISE`, `INTEREST`, `MAYBE`. |
| `result.data.elements[].reactionTypeCounts[].count` | `integer` | Yes | — | The number of this type of reaction. |
| `result.data.elements[].postId` | `string` | Yes | — | The ID of the post to which this comment belongs. |
| `result.data.elements[].actor` | `object` | Yes | — | — |
| `result.data.elements[].actor.id` | `string` | Yes | — | The unique identifier for the actor who made the comment. |
| `result.data.elements[].actor.name` | `string` | Yes | — | The name of the actor. |
| `result.data.elements[].actor.linkedinUrl` | `string` | Yes | — | The LinkedIn profile URL of the actor. Format: `uri`. |
| `result.data.elements[].actor.position` | `string` | No | — | The current position or headline of the actor. |
| `result.data.elements[].actor.pictureUrl` | `string` | No | — | The URL of the actor's profile picture. Format: `uri`. |
| `result.data.elements[].actor.picture` | `object` | No | — | — |
| `result.data.elements[].actor.picture.url` | `string` | Yes | — | The URL of the picture. Format: `uri`. |
| `result.data.elements[].actor.picture.width` | `integer` | Yes | — | The width of the picture in pixels. |
| `result.data.elements[].actor.picture.height` | `integer` | Yes | — | The height of the picture in pixels. |
| `result.data.elements[].actor.picture.expiresAt` | `integer` | Yes | — | The expiration timestamp of the picture URL in milliseconds since epoch. Format: `int64`. |
| `result.data.elements[].actor.author` | `boolean` | Yes | — | Indicates if the actor is the original author of the parent post. |
| `result.data.elements[].createdAtTimestamp` | `integer` | Yes | — | The timestamp of when the comment was created, in milliseconds since epoch. Format: `int64`. |
| `result.data.elements[].pinned` | `boolean` | Yes | — | Indicates if the comment is pinned. |
| `result.data.elements[].contributed` | `boolean` | Yes | — | Indicates if the actor is a contributor to the content (e.g., a group admin or page role). |
| `result.data.elements[].edited` | `boolean` | Yes | — | Indicates if the comment has been edited. |
| `result.data.pagination` | `object` | No | — | — |
| `result.data.pagination.totalPages` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.totalElements` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.pageNumber` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.previousElements` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.pageSize` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.paginationToken` | `string` | No | — | Format: `nullable`. |
| `result.data.status` | `string \| integer` | No | — | — |
| `result.data.error` | `string \| null` | No | — | — |
| `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": {
          "elements": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The unique identifier for the comment."
                },
                "linkedinUrl": {
                  "type": "string",
                  "description": "The direct URL to the comment on LinkedIn.",
                  "format": "uri"
                },
                "commentary": {
                  "type": "string",
                  "description": "The text content of the comment."
                },
                "createdAt": {
                  "type": "string",
                  "description": "The ISO 8601 timestamp of when the comment was created.",
                  "format": "date-time"
                },
                "numComments": {
                  "type": "integer",
                  "description": "The number of replies to this comment."
                },
                "numShares": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The number of times this comment has been shared (often null for comments)."
                },
                "numImpressions": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The number of impressions for this comment (often null)."
                },
                "reactionTypeCounts": {
                  "type": "array",
                  "description": "A list of reaction types and their counts for this comment.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "The type of reaction.",
                        "enum": [
                          "LIKE",
                          "EMPATHY",
                          "PRAISE",
                          "INTEREST",
                          "MAYBE"
                        ]
                      },
                      "count": {
                        "type": "integer",
                        "description": "The number of this type of reaction."
                      }
                    },
                    "required": [
                      "type",
                      "count"
                    ],
                    "additionalProperties": false
                  }
                },
                "postId": {
                  "type": "string",
                  "description": "The ID of the post to which this comment belongs."
                },
                "actor": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The unique identifier for the actor who made the comment."
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the actor."
                    },
                    "linkedinUrl": {
                      "type": "string",
                      "description": "The LinkedIn profile URL of the actor.",
                      "format": "uri"
                    },
                    "position": {
                      "type": "string",
                      "description": "The current position or headline of the actor."
                    },
                    "pictureUrl": {
                      "type": "string",
                      "description": "The URL of the actor's profile picture.",
                      "format": "uri"
                    },
                    "picture": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "The URL of the picture.",
                          "format": "uri"
                        },
                        "width": {
                          "type": "integer",
                          "description": "The width of the picture in pixels."
                        },
                        "height": {
                          "type": "integer",
                          "description": "The height of the picture in pixels."
                        },
                        "expiresAt": {
                          "type": "integer",
                          "description": "The expiration timestamp of the picture URL in milliseconds since epoch.",
                          "format": "int64"
                        }
                      },
                      "required": [
                        "url",
                        "width",
                        "height",
                        "expiresAt"
                      ],
                      "additionalProperties": false
                    },
                    "author": {
                      "type": "boolean",
                      "description": "Indicates if the actor is the original author of the parent post."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "linkedinUrl",
                    "author"
                  ],
                  "additionalProperties": false
                },
                "createdAtTimestamp": {
                  "type": "integer",
                  "description": "The timestamp of when the comment was created, in milliseconds since epoch.",
                  "format": "int64"
                },
                "pinned": {
                  "type": "boolean",
                  "description": "Indicates if the comment is pinned."
                },
                "contributed": {
                  "type": "boolean",
                  "description": "Indicates if the actor is a contributor to the content (e.g., a group admin or page role)."
                },
                "edited": {
                  "type": "boolean",
                  "description": "Indicates if the comment has been edited."
                }
              },
              "required": [
                "id",
                "linkedinUrl",
                "commentary",
                "createdAt",
                "numComments",
                "postId",
                "actor",
                "createdAtTimestamp",
                "pinned",
                "contributed",
                "edited"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "totalPages": {
                "type": "integer",
                "format": "int32"
              },
              "totalElements": {
                "type": "integer",
                "format": "int32"
              },
              "pageNumber": {
                "type": "integer",
                "format": "int32"
              },
              "previousElements": {
                "type": "integer",
                "format": "int32"
              },
              "pageSize": {
                "type": "integer",
                "format": "int32"
              },
              "paginationToken": {
                "type": "string",
                "format": "nullable"
              }
            },
            "additionalProperties": false
          },
          "status": {
            "type": [
              "string",
              "integer"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.03` per pricing unit.

## Related documentation

* [HarvestAPI provider guide](https://deepline.com/docs/providers/harvestapi/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.