# LinkedIn Post Search with Details (`linkedin.search_posts_full`)

Search public LinkedIn posts with author, company, industry, mention, content-type and date filters and get rich author, engagement and attachment details.

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

- Endpoint: `POST https://api.primaryapi.com/v1/run/linkedin.search_posts_full`
- Category: Social · Platform: `linkedin` · Kind: search · 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.search_posts_full`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `query` | string | yes |  | max 500 chars | Keywords to search for in posts. |
| `authorCompanyNames` | string[] | no |  | max 25 items; items max 200 chars | Only posts by people who work at these companies (company page URLs or ids work best; names are matched as given). |
| `authorIndustryIds` | string[] | no |  | max 25 items; items max 200 chars | Only posts by authors whose company is in these LinkedIn industry ids. |
| `authorKeywords` | string | no |  | max 200 chars | Only posts whose author headline or job title contains at least one of these keywords. |
| `authorUrls` | string[] | no |  | max 25 items; items max 2048 chars | Only posts authored by these LinkedIn profile (/in/…) or company (/company/…) URLs. |
| `mentioningMemberUrls` | string[] | no |  | max 25 items; items max 2048 chars | Only posts mentioning these LinkedIn member profile URLs. |
| `contentType` | enum | no |  | one of: all, videos, images, jobs, live-videos, documents, collaborative-articles | Only posts carrying this content type. |
| `datePosted` | enum | no | "last-day" | one of: last-hour, last-day, last-week, last-month, last-three-months, last-six-months, last-year | Only posts published within this window (default last-day). |
| `sort` | enum | no | "relevance" | one of: relevance, date | Order by search relevance or publish date. |
| `limit` | integer | no | 10 | 1–50 | Maximum number of results to return (1-50, default 10). |
| `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 |
|---|---|---|
| `posts` | object[] |  |
| `posts[].id` | string |  |
| `posts[].url` | string \| null |  |
| `posts[].text` | string \| null |  |
| `posts[].createdUtc` | integer \| null | Publish time, Unix seconds |
| `posts[].author` | object \| null |  |
| `posts[].author.name` | string \| null | Display name of the member or page |
| `posts[].author.url` | string \| null | Profile or company page URL |
| `posts[].author.publicIdentifier` | string \| null | Member public identifier (the /in/<id> part), for members |
| `posts[].author.universalName` | string \| null | Company universal name (the /company/<name> part), for pages |
| `posts[].author.headline` | string \| null | Member headline or page tagline shown next to the post |
| `posts[].author.imageUrl` | string \| null | Avatar or logo URL (LinkedIn image URLs expire) |
| `posts[].author.type` | string \| null | "profile" for a member, "company" for a page, when known |
| `posts[].engagement` | object \| null |  |
| `posts[].engagement.likes` | integer \| null | Total reactions |
| `posts[].engagement.comments` | integer \| null |  |
| `posts[].engagement.shares` | integer \| null | Reposts |
| `posts[].engagement.reactions` | object[] | Per-reaction breakdown (empty when not shown) |
| `posts[].engagement.reactions[].type` | string | Reaction type: LIKE, PRAISE, EMPATHY, APPRECIATION, INTEREST, ENTERTAINMENT |
| `posts[].engagement.reactions[].count` | integer |  |
| `posts[].attachmentType` | enum \| null | Kind of the first attachment, null for text-only posts |
| `posts[].attachmentUrl` | string \| null |  |
| `posts[].attachmentTitle` | string \| null |  |
| `posts[].attachmentSubtitle` | string \| null |  |
| `posts[].attachmentDescription` | string \| null |  |
| `posts[].attachmentImage` | string \| null |  |
| `posts[].pollQuestion` | string \| null | Poll question (null: no poll, or poll details not available) |
| `posts[].pollOptions` | object[] \| null | Poll options and votes, when available |
| `posts[].pollOptions[].option` | string |  |
| `posts[].pollOptions[].votes` | integer \| null |  |
| `posts[].pollClosed` | boolean \| null |  |
| `posts[].pollTotalVotes` | integer \| null |  |
| `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.search_posts_full" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"b2b sales","datePosted":"last-week","sort":"date","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": {
      "posts": [
        {
          "id": "string",
          "url": "https://example.com",
          "text": "string",
          "createdUtc": 0,
          "author": {
            "name": "string",
            "url": "https://example.com",
            "publicIdentifier": "string",
            "universalName": "string",
            "headline": "string",
            "imageUrl": "https://example.com",
            "type": "string"
          },
          "engagement": {
            "likes": 0,
            "comments": 0,
            "shares": 0,
            "reactions": [
              {
                "type": "string",
                "count": 0
              }
            ]
          },
          "attachmentType": "article",
          "attachmentUrl": "https://example.com",
          "attachmentTitle": "string",
          "attachmentSubtitle": "string",
          "attachmentDescription": "string",
          "attachmentImage": "string",
          "pollQuestion": "string",
          "pollOptions": [
            {
              "option": "string",
              "votes": 0
            }
          ],
          "pollClosed": true,
          "pollTotalVotes": 0
        }
      ],
      "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.search_posts_full`

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

Returns up to `limit` posts per call; pass nextCursor for more. Poll details are returned when available. A search with no matches answers 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). Results contain personal data about identifiable people (GDPR, UK GDPR, CCPA): have a lawful basis, honour deletion requests, and never use it for spam or unsolicited bulk outreach.

