> ## 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 Company Posts

> List posts published by one LinkedIn company page, by company URL, ID, or universal name. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List posts published by one LinkedIn company page, by company URL, ID, or universal name.

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

## 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_company_posts',
  {
    "company": "Example Corp",
    "companyId": "company_123",
    "companyUniversalName": "Example"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute harvestapi_get_company_posts --input '{
  "company": "Example Corp",
  "companyId": "company_123",
  "companyUniversalName": "Example"
}' --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"
      }
    ],
    "pagination": {
      "totalPages": 123,
      "totalElements": 123,
      "pageNumber": 123
    },
    "status": 1
  }
}
```

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

## Input reference

Get LinkedIn company posts by company URL, ID, or universal name.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.company` | `string` | No | — | Filter posts by this company URL Minimum length: 1. |
| `payload.companyId` | `string` | No | — | Filter posts by company ID. It's faster to search by ID Minimum length: 1. |
| `payload.companyUniversalName` | `string` | No | — | Filter posts by company universal name (last part in the URL) Minimum length: 1. |
| `payload.postedLimit` | `string` | No | — | Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. Since LinkedIn doesn't offer a way to filter by date, the filtering will be done on our side, due to that the pagination might have incorrect values, because pagination is returned by LinkedIn without applying the postedLimit filter |
| `payload.scrapePostedLimit` | `string` | No | — | Post-Filter posts by maximum posted date. Supported values: '1h', '24h', 'week','month', '3months', '6months', 'year'. This parameter will be applied after receiving results from LinkedIn, the filtering will be done on our side |
| `payload.page` | `integer` | No | `1` | Page number for pagination |
| `payload.paginationToken` | `string` | No | — | Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn't apply for all queries, usually profile posts return this token Format: `nullable`. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Get LinkedIn company posts by company URL, ID, or universal name.",
    "properties": {
      "company": {
        "type": "string",
        "description": "Filter posts by this company URL",
        "minLength": 1
      },
      "companyId": {
        "type": "string",
        "description": "Filter posts by company ID. It's faster to search by ID",
        "minLength": 1
      },
      "companyUniversalName": {
        "type": "string",
        "description": "Filter posts by company universal name (last part in the URL)",
        "minLength": 1
      },
      "postedLimit": {
        "type": "string",
        "description": "Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. Since LinkedIn doesn't offer a way to filter by date, the filtering will be done on our side, due to that the pagination might have incorrect values, because pagination is returned by LinkedIn without applying the postedLimit filter"
      },
      "scrapePostedLimit": {
        "type": "string",
        "description": "Post-Filter posts by maximum posted date. Supported values: '1h', '24h', 'week','month', '3months', '6months', 'year'. This parameter will be applied after receiving results from LinkedIn, the filtering will be done on our side"
      },
      "page": {
        "type": "integer",
        "description": "Page number for pagination",
        "default": 1
      },
      "paginationToken": {
        "type": "string",
        "description": "Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn't apply for all queries, usually profile posts return this token",
        "format": "nullable"
      }
    },
    "required": [],
    "allOf": [
      {
        "anyOf": [
          {
            "required": [
              "company"
            ]
          },
          {
            "required": [
              "companyId"
            ]
          },
          {
            "required": [
              "companyUniversalName"
            ]
          }
        ]
      }
    ],
    "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 | — | — |
| `result.data.elements[].content` | `string` | No | — | — |
| `result.data.elements[].linkedinUrl` | `string` | No | — | — |
| `result.data.elements[].author` | `object` | No | — | — |
| `result.data.elements[].author.id` | `string` | No | — | — |
| `result.data.elements[].author.urn` | `string` | No | — | — |
| `result.data.elements[].author.publicIdentifier` | `string` | No | — | — |
| `result.data.elements[].author.universalName` | `string` | No | — | — |
| `result.data.elements[].author.name` | `string` | No | — | — |
| `result.data.elements[].author.linkedinUrl` | `string` | No | — | — |
| `result.data.elements[].author.type` | `boolean` | No | — | — |
| `result.data.elements[].author.info` | `boolean` | No | — | — |
| `result.data.elements[].author.website` | `boolean` | No | — | — |
| `result.data.elements[].author.websiteLabel` | `boolean` | No | — | — |
| `result.data.elements[].author.avatar` | `object` | No | — | — |
| `result.data.elements[].author.avatar.url` | `string` | No | — | — |
| `result.data.elements[].author.avatar.width` | `integer` | No | — | Format: `int32`. |
| `result.data.elements[].author.avatar.height` | `integer` | No | — | Format: `int32`. |
| `result.data.elements[].author.avatar.expiresAt` | `integer` | No | — | Format: `int64`. |
| `result.data.elements[].postedAt` | `object` | No | — | — |
| `result.data.elements[].postedAt.timestamp` | `integer` | No | — | — |
| `result.data.elements[].postedAt.date` | `string` | No | — | — |
| `result.data.elements[].postedAt.postedAgoShort` | `string` | No | — | — |
| `result.data.elements[].postedAt.postedAgoText` | `string` | No | — | — |
| `result.data.elements[].postImages` | `array` | No | — | — |
| `result.data.elements[].postImages[].url` | `string` | No | — | — |
| `result.data.elements[].postImages[].width` | `integer` | No | — | Format: `int32`. |
| `result.data.elements[].postImages[].height` | `integer` | No | — | Format: `int32`. |
| `result.data.elements[].postImages[].expiresAt` | `integer` | No | — | Format: `int64`. |
| `result.data.elements[].postVideo` | `object` | No | — | — |
| `result.data.elements[].postVideo.thumbnailUrl` | `string` | No | — | — |
| `result.data.elements[].postVideo.videoUrl` | `string` | No | — | — |
| `result.data.elements[].article` | `object` | No | — | — |
| `result.data.elements[].article.title` | `string` | No | — | — |
| `result.data.elements[].article.subtitle` | `string` | No | — | — |
| `result.data.elements[].article.link` | `string` | No | — | — |
| `result.data.elements[].article.linkLabel` | `string` | No | — | — |
| `result.data.elements[].article.description` | `string` | No | — | — |
| `result.data.elements[].article.image` | `object` | No | — | — |
| `result.data.elements[].article.image.url` | `string` | No | — | — |
| `result.data.elements[].article.image.width` | `integer` | No | — | Format: `int32`. |
| `result.data.elements[].article.image.height` | `integer` | No | — | Format: `int32`. |
| `result.data.elements[].article.image.expiresAt` | `integer` | No | — | Format: `int64`. |
| `result.data.elements[].repostId` | `string` | No | — | Format: `nullable`. |
| `result.data.elements[].repost` | `record` | No | — | — |
| `result.data.elements[].repostedBy` | `object` | No | — | — |
| `result.data.elements[].repostedBy.publicIdentifier` | `string` | No | — | — |
| `result.data.elements[].repostedBy.name` | `string` | No | — | — |

The table shows the first 50 fields. Expand the raw schema below for every field.

<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"
                },
                "content": {
                  "type": "string"
                },
                "linkedinUrl": {
                  "type": "string"
                },
                "author": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "urn": {
                      "type": "string"
                    },
                    "publicIdentifier": {
                      "type": "string"
                    },
                    "universalName": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "linkedinUrl": {
                      "type": "string"
                    },
                    "type": {
                      "type": "boolean"
                    },
                    "info": {
                      "type": "boolean"
                    },
                    "website": {
                      "type": "boolean"
                    },
                    "websiteLabel": {
                      "type": "boolean"
                    },
                    "avatar": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "width": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "height": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "expiresAt": {
                          "type": "integer",
                          "format": "int64"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                },
                "postedAt": {
                  "type": "object",
                  "properties": {
                    "timestamp": {
                      "type": "integer"
                    },
                    "date": {
                      "type": "string"
                    },
                    "postedAgoShort": {
                      "type": "string"
                    },
                    "postedAgoText": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "postImages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "width": {
                        "type": "integer",
                        "format": "int32"
                      },
                      "height": {
                        "type": "integer",
                        "format": "int32"
                      },
                      "expiresAt": {
                        "type": "integer",
                        "format": "int64"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "postVideo": {
                  "type": "object",
                  "properties": {
                    "thumbnailUrl": {
                      "type": "string"
                    },
                    "videoUrl": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "article": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "subtitle": {
                      "type": "string"
                    },
                    "link": {
                      "type": "string"
                    },
                    "linkLabel": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "image": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "width": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "height": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "expiresAt": {
                          "type": "integer",
                          "format": "int64"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                },
                "repostId": {
                  "type": "string",
                  "format": "nullable"
                },
                "repost": {
                  "type": "object"
                },
                "repostedBy": {
                  "type": "object",
                  "properties": {
                    "publicIdentifier": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "linkedinUrl": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "newsletterUrl": {
                  "type": "string"
                },
                "newsletterTitle": {
                  "type": "string"
                },
                "socialContent": {
                  "type": "object",
                  "properties": {
                    "hideCommentsCount": {
                      "type": "boolean"
                    },
                    "hideReactionsCount": {
                      "type": "boolean"
                    },
                    "hideSocialActivityCounts": {
                      "type": "boolean"
                    },
                    "hideShareAction": {
                      "type": "boolean"
                    },
                    "hideSendAction": {
                      "type": "boolean"
                    },
                    "hideRepostsCount": {
                      "type": "boolean"
                    },
                    "hideViewsCount": {
                      "type": "boolean"
                    },
                    "hideReactAction": {
                      "type": "boolean"
                    },
                    "hideCommentAction": {
                      "type": "boolean"
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "showContributionExperience": {
                      "type": "boolean"
                    },
                    "showSocialDetail": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "engagement": {
                  "type": "object",
                  "properties": {
                    "likes": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "comments": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "shares": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer",
                            "format": "int32"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "id"
              ],
              "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.