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

# Find LinkedIn Mentions

> Find people and companies to tag in a LinkedIn post, with the exact text to put in the post

## Find LinkedIn Mentions

Finds people and companies you can tag (@mention) in a LinkedIn post from this account. Each result has a `text` field: put it in the post's LinkedIn text exactly as it is. Requires the `accounts:read` permission.

LinkedIn never turns a plain "@Name" into a tag when a post comes through its API. A tag has to be written as `@[Name](urn:li:person:ID)`, `@[Name](urn:li:organization:ID)` or `@[Name](urn:li:organizationBrand:ID)`, with the name spelled exactly as LinkedIn spells it. This search gives you that text. The [LinkedIn mentions guide](https://docs.postsyncer.com/guides/linkedin-mentions.md) shows the whole flow.

### Who you can find

LinkedIn has no search of all its members, so the search looks in these places, in this order:

| `source` | Who |
| - | - |
| `tagged_before` | People and companies your workspace tagged before: in posts PostSyncer brought in from LinkedIn, or in posts that tag someone found with the @ search in the PostSyncer app. Newest first. This search only reads: what it finds isn't remembered. |
| `teammate` | The workspace's other LinkedIn profiles (people, not Pages). |
| `follower` | People who follow the account's Page. For a personal profile, people who follow the Pages its owner runs. Only when `people_search` is `available`. |
| `company` | Any company or school, by its LinkedIn link (`linkedin.com/company/acme`) or the short name in that link (`acme`). |

People and companies tagged before, and teammates, match when their name holds `q`, in any case. Followers are matched by LinkedIn. The company search needs the short name exactly as it is in the link: `acme` finds the company at `linkedin.com/company/acme`, but `Acme Inc` does not. Each person or company shows up once, under the first place it was found.

LinkedIn gives a person a different ID depending on how the account was connected. The search only returns people whose ID works from this account. Search with the account the post goes out from.

### Request

**id** `integer` *required*

The LinkedIn account the post goes out from, from [List Accounts](https://docs.postsyncer.com/api-reference/accounts/list.md) (`platform` is `linkedin`)

**q** `string` *required*

2 to 200 characters: a name, or a company's LinkedIn link or short name. Page followers are searched only when `q` looks like a name: it starts with a letter, holds only letters, spaces, periods, apostrophes and hyphens with never two non-letters in a row, has at most one space, and is at least 3 characters long (6 when it has a space or a period).

```bash theme={null}
curl -G "https://postsyncer.com/api/v1/accounts/245/linkedin/mentions" \
  --data-urlencode "q=jane" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### Response

**mentions** `object[]`

The people and companies found, best first: tagged before, teammates, followers, companies. Empty when nothing was found.

**Mention Object**

**type** `string`

`person`, `organization` (a company or school) or `organizationBrand` (a brand page; these come only from `tagged_before`).

**urn** `string`

LinkedIn's ID, for example `urn:li:person:A1b2C3d4E5` or `urn:li:organization:2414183`.

**name** `string`

The name exactly as LinkedIn spells it.

**vanity\_name** `string | null`

The short name in their LinkedIn link, when known (companies and teammates).

**headline** `string | null`

Their LinkedIn headline, when known (followers).

**picture** `string | null`

A picture URL, when known (teammates).

**source** `string`

Where it was found: `tagged_before`, `teammate`, `follower` or `company`.

**text** `string`

The tag to put in the post, for example `@[Jane Doe](urn:li:person:A1b2C3d4E5)`. Use it as it is: special characters in the name are already escaped for LinkedIn (`Jane_Doe` is written `Jane\_Doe`).

**people\_search** `string`

`available`: the account's Page followers can be searched (they are, when `q` looks like a name). `needs_reconnect`: the account was connected through PostSyncer's older LinkedIn connection and can't search Page followers until it is reconnected in PostSyncer. Teammates, people and companies tagged before, and companies still work.

```json theme={null}
{
  "mentions": [
    {
      "type": "person",
      "urn": "urn:li:person:A1b2C3d4E5",
      "name": "Jane Doe",
      "vanity_name": null,
      "headline": null,
      "picture": null,
      "source": "tagged_before",
      "text": "@[Jane Doe](urn:li:person:A1b2C3d4E5)"
    },
    {
      "type": "person",
      "urn": "urn:li:person:F6g7H8i9J0",
      "name": "Jane Smith",
      "vanity_name": null,
      "headline": "Head of growth at Acme",
      "picture": null,
      "source": "follower",
      "text": "@[Jane Smith](urn:li:person:F6g7H8i9J0)"
    }
  ],
  "people_search": "available"
}
```

### Putting a result in a post

Paste `text` into the post's LinkedIn text: `content[].text`, or the account's own LinkedIn text in `accounts[].settings.title`, when you [create](https://docs.postsyncer.com/api-reference/posts/create.md#linkedin-mentions) or [update](https://docs.postsyncer.com/api-reference/posts/update.md) a post.

```json theme={null}
"content": [
  { "text": "Great talk today with @[Jane Doe](urn:li:person:A1b2C3d4E5) at @[Acme](urn:li:organization:2414183)!" }
]
```

On LinkedIn, the names become tags. On every other network the post goes to, a tag goes out as just the name ("Great talk today with Jane Doe at Acme!"). [Get Post](https://docs.postsyncer.com/api-reference/posts/get.md) returns the text as you saved it, with the tags in it.

### Error Codes

**400** `Bad Request`

The account is not a LinkedIn account: `{"message": "Account is not a LinkedIn account", "code": "INVALID_PROVIDER"}`

**401** `Unauthorized`

Missing or invalid API token

**403** `Forbidden`

The key does not have the `accounts:read` permission

**404** `Not Found`

No account with this ID in a workspace you can access

**422** `Unprocessable Entity`

`q` is missing, shorter than 2 characters or longer than 200


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