# LinkedIn Company Posts (`linkedin.company_posts`)

Recent posts of a LinkedIn company page: full text, link, publish date, author, engagement with a per-reaction breakdown, articles and media.

Docs: https://primaryapi.com/docs/api-reference/linkedin/company_posts

- Endpoint: `POST https://api.primaryapi.com/v1/run/linkedin.company_posts`
- Category: Social · Platform: `linkedin` · Kind: list · Status: live
- Price: 4 credits per call; up to 26 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=linkedin.company_posts`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `url` | string | yes |  | max 2048 chars | Company page URL (https://www.linkedin.com/company/<slug>), universal name or company id. |
| `limit` | integer | no | 10 | 1–100 | Maximum number of results to return (1-100, default 10). |
| `postedLimit` | enum | no |  | one of: any, 1h, 24h, week, month, 3months, 6months, year | Only posts published within this window (default any). |
| `includeQuotePosts` | boolean | no | true |  | Include quote posts (reposts with added text). Default true. |
| `includeReposts` | boolean | no | true |  | Include plain reposts (no added text). Default true. |
| `cursor` | string | no |  |  | Opaque pagination cursor: pass the previous response's nextCursor. |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `items` | object[] |  |
| `items[].id` | string | LinkedIn activity id |
| `items[].url` | string \| null |  |
| `items[].type` | enum | post, plain repost, or quote post (repost with added text) |
| `items[].text` | string \| null |  |
| `items[].createdUtc` | integer \| null | Publish time, Unix seconds |
| `items[].shareUrl` | string \| null |  |
| `items[].author` | object \| null |  |
| `items[].author.name` | string \| null | Display name of the member or page |
| `items[].author.url` | string \| null | Profile or company page URL |
| `items[].author.publicIdentifier` | string \| null | Member public identifier (the /in/<id> part), for members |
| `items[].author.universalName` | string \| null | Company universal name (the /company/<name> part), for pages |
| `items[].author.headline` | string \| null | Member headline or page tagline shown next to the post |
| `items[].author.imageUrl` | string \| null | Avatar or logo URL (LinkedIn image URLs expire) |
| `items[].author.type` | string \| null | "profile" for a member, "company" for a page, when known |
| `items[].engagement` | object \| null |  |
| `items[].engagement.likes` | integer \| null | Total reactions |
| `items[].engagement.comments` | integer \| null |  |
| `items[].engagement.shares` | integer \| null | Reposts |
| `items[].engagement.reactions` | object[] | Per-reaction breakdown (empty when not shown) |
| `items[].engagement.reactions[].type` | string | Reaction type: LIKE, PRAISE, EMPATHY, APPRECIATION, INTEREST, ENTERTAINMENT |
| `items[].engagement.reactions[].count` | integer |  |
| `items[].articleTitle` | string \| null |  |
| `items[].articleSubtitle` | string \| null |  |
| `items[].articleUrl` | string \| null |  |
| `items[].articleLinkLabel` | string \| null |  |
| `items[].articleDescription` | string \| null |  |
| `items[].articleImage` | string \| null |  |
| `items[].articleImageWidth` | integer \| null |  |
| `items[].articleImageHeight` | integer \| null |  |
| `items[].postImages` | object[] |  |
| `items[].postImages[].url` | string |  |
| `items[].postImages[].width` | integer \| null |  |
| `items[].postImages[].height` | integer \| null |  |
| `items[].images` | string[] | Image URLs of the post |
| `items[].postVideo` | object \| null |  |
| `items[].postVideo.thumbnailUrl` | string \| null |  |
| `items[].postVideo.videoUrl` | string \| null |  |
| `items[].videoUrl` | string \| null |  |
| `items[].videoThumbnail` | string \| null |  |
| `items[].documentTitle` | string \| null | Title of an attached document (carousel/PDF) |
| `items[].documentUrl` | string \| null |  |
| `items[].newsletterTitle` | string \| null |  |
| `items[].newsletterUrl` | string \| null |  |
| `items[].publicationUrl` | string \| null |  |
| `items[].repostedBy` | object \| null |  |
| `items[].repostedBy.name` | string \| null |  |
| `items[].repostedBy.url` | string \| null |  |
| `items[].repostedBy.publicIdentifier` | string \| null |  |
| `items[].repostId` | string \| null |  |
| `items[].repostUrl` | string \| null |  |
| `items[].repostText` | string \| null |  |
| `items[].repostCreatedUtc` | integer \| null |  |
| `items[].repostAuthorId` | string \| null |  |
| `items[].repostAuthorName` | string \| null |  |
| `items[].repostAuthorHandle` | string \| null |  |
| `items[].repostAuthorUniversalName` | string \| null |  |
| `items[].repostAuthorUrl` | string \| null |  |
| `items[].repostAuthorHeadline` | string \| null |  |
| `items[].repostAuthorImage` | string \| null |  |
| `items[].repostAuthorType` | string \| null |  |
| `items[].repostImages` | string[] |  |
| `items[].repostArticleTitle` | string \| null |  |
| `items[].repostArticleSubtitle` | string \| null |  |
| `items[].repostArticleUrl` | string \| null |  |
| `items[].repostArticleDescription` | string \| null |  |
| `items[].repostArticleLinkLabel` | string \| null |  |
| `items[].repostArticleImage` | string \| null |  |
| `items[].repostArticleImageWidth` | integer \| null |  |
| `items[].repostArticleImageHeight` | integer \| null |  |
| `items[].socialContent` | object \| null | Visibility flags LinkedIn sends with the post (hidden counts, share URL) |
| `items[].contentAnnotations` | any[] \| null | Mentions and links inside the text, when available |
| `items[].contentAttributes` | any[] \| null | Same as contentAnnotations (kept for compatibility) |
| `nextCursor` | string \| null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

Pagination: pass the previous response’s `nextCursor` as `cursor` to get the next page; `nextCursor: null` means there are no more results.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/linkedin.company_posts" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.linkedin.com/company/google/","limit":10}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "items": [
        {
          "id": "string",
          "url": "https://www.linkedin.com/company/google/",
          "type": "post",
          "text": "string",
          "createdUtc": 0,
          "shareUrl": "https://example.com",
          "author": {
            "name": "string",
            "url": "https://www.linkedin.com/company/google/",
            "publicIdentifier": "string",
            "universalName": "string",
            "headline": "string",
            "imageUrl": "https://example.com",
            "type": "string"
          },
          "engagement": {
            "likes": 0,
            "comments": 0,
            "shares": 0,
            "reactions": [
              {
                "type": "string",
                "count": 0
              }
            ]
          },
          "articleTitle": "string",
          "articleSubtitle": "string",
          "articleUrl": "https://example.com",
          "articleLinkLabel": "string",
          "articleDescription": "string",
          "articleImage": "string",
          "articleImageWidth": 0,
          "articleImageHeight": 0,
          "postImages": [
            {
              "url": "https://www.linkedin.com/company/google/",
              "width": 0,
              "height": 0
            }
          ],
          "images": [
            "string"
          ],
          "postVideo": {
            "thumbnailUrl": "https://example.com",
            "videoUrl": "https://example.com"
          },
          "videoUrl": "https://example.com",
          "videoThumbnail": "string",
          "documentTitle": "string",
          "documentUrl": "https://example.com",
          "newsletterTitle": "string",
          "newsletterUrl": "https://example.com",
          "publicationUrl": "https://example.com",
          "repostedBy": {
            "name": "string",
            "url": "https://www.linkedin.com/company/google/",
            "publicIdentifier": "string"
          },
          "repostId": "string",
          "repostUrl": "https://example.com",
          "repostText": "string",
          "repostCreatedUtc": 0,
          "repostAuthorId": "string",
          "repostAuthorName": "string",
          "repostAuthorHandle": "string",
          "repostAuthorUniversalName": "string",
          "repostAuthorUrl": "https://example.com",
          "repostAuthorHeadline": "string",
          "repostAuthorImage": "string",
          "repostAuthorType": "string",
          "repostImages": [
            "string"
          ],
          "repostArticleTitle": "string",
          "repostArticleSubtitle": "string",
          "repostArticleUrl": "https://example.com",
          "repostArticleDescription": "string",
          "repostArticleLinkLabel": "string",
          "repostArticleImage": "string",
          "repostArticleImageWidth": 0,
          "repostArticleImageHeight": 0,
          "socialContent": {},
          "contentAnnotations": [
            null
          ],
          "contentAttributes": [
            null
          ]
        }
      ],
      "nextCursor": null
    }
  },
  "provider": "PrimaryAPI",
  "credits": 4,
  "items": 1,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
  "nextCursor": null
}
```

## Pricing and reliability

- Usual price: 4 credits per call
- Price ceiling: up to 26 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=linkedin.company_posts`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

Newest first, up to `limit` posts per call; pass nextCursor for older posts. Unknown company pages answer found=false (reason not_found), pages with no public posts in the window found=false (reason no_results).

## Legal

Public LinkedIn data only. LinkedIn’s User Agreement restricts automated collection and LinkedIn enforces it; use the data for lawful purposes, keep copies only as long as you need them, and treat post and article text as the author’s content (analysis, not republication).

