People Typeahead API

Warning

Deprecation Notice
The Marketing Version 202310 (Marketing October 2023) and earlier versions (excluding 202306 and 202307) have been sunset. Additionally, the unversioned APIs will be sunset soon. We recommend that you migrate to the versioned APIs as well as migrate to the new Content and Community Management APIs to avoid disruptions. See the Migration page for more details. If you haven’t yet migrated and have questions, submit a request on the LinkedIn Developer Support Portal.

People Typeahead API facilitates the discovery of members who can be mentioned in the organization page posts. Pages (via Page Admins) can search for Page followers by keyword or vanity URL.

  • Search by keyword returns up to 10 profiles matching the first few characters of first or last name.
  • Search response contains member basic profile information and unique member identifier.
  • Search by vanity URL returns member identifier corresponding to the vanity name.
  • Person URN returned in search response can be further used in Post Creation APIs to @mention in member or organization page posts.
  • Search response contains only members that are followers of the company.

Note

The People Typeahead API endpoint is restricted. This permission is granted to select developers only.

Permissions

To search a member for @mentions in UGC posts, you must have the following permissions:

Permission Description
r_organization_followers Use your followers' data so your organization can mention them in posts. Restricted to organizations in which they are authenticated.
  • ADMINISTRATOR
  • DIRECT_SPONSORED_CONTENT_POSTER

See Organization Access Control for more information on company page roles.

Search by Keyword for Organization Pages

An example of how to use the search by keyword to @mention a member in organization page post is shown:

Sample Request

GET "https://api.linkedin.com/rest/peopleTypeahead?q=organizationFollowers&keywords=ann&organization=urn%3Ali%3Aorganization%3A9510"

Sample Response

{
    "elements": [
    {
      "member": "urn:li:person:133",
      "photo": "urn:li:image:C56",
      "firstName": "Annie.",
      "lastName": "Victor",
      "headline": "Head of Marketing"
    },
    {
      "member": "urn:li:person:134",
      "firstName": "Anna",
      "lastName": "K.",
      "headline": "Chief of Staff, Global Applications"
    },
    {
      "member": "urn:li:person:135",
      "photo": "urn:li:image:C4w",
      "firstName": "Annapurna",
      "lastName": "G.",
      "headline": "Crypto expert !!"
    },
    {
      "member": "urn:li:person:136",
      "photo": "urn:li:image:C4E0",
      "firstName": "Annette",
      "lastName": "Nash",
      "headline": "I'm hiring"
    },
    {
      "member": "urn:li:person:137",
      "photo": "urn:li:image:C56",
      "firstName": "Amy Peter",
      "lastName": "Chang",
      "headline": "Senior Director, Human Resources"
    },
  ],
  "paging": {
    "count": 10,
    "start": 0,
    "total": 5,
    "links": []
  }
}

Search Finder Parameters

Unless otherwise specified:

  • The input is case insensitive.
  • Multiple words should be joined using a space. Since you need to encode the input URL, this translates to %20. For example, Andrew%20Clark.
  • Wildcards and Boolean logic are not supported (for example: *, ?, AND, and OR).
  • Numeric characters not allowed.
  • special characters allowed: space(“ “), apostrophe(“`”), hyphen(“-”), dot(“.”), all other non alpha-numeric special characters not allowed.
  • No two special character in succession allowed - for example two spaces next to each other, a space and apostrophe next to each other is not allowed
  • Minimum length of 3 characters if no special characters
  • Only one space character allowed
  • If dot and/or space is present, minimum of 6 characters required including the special character.
Field Type Description Example Required
keywords string type ahead keyword representing first few characters of a keyword John Yes
organization organization urn organization urn identifier of the company urn:li:organization:{organizationId} Yes for organization page search

Note

For example, keywords parameter "John Smith" would be url coded as John%20Smith.

Search Response

Search response contains a few basic profile fields of the member such as firstName, lastName, optional photo, and headline. Search responses returned respective member's privacy settings.

Field Type Description Format Required
personUrn Person Urn person urn identifier of the member urn:li:person:{personId} Yes
firstName string First name of the member. max length is 128, min length is 1. Supports en_US locale only John Yes
lastName string Last name of the member. maximum length is 128, minimum length is 1. Supports en_US locale only Lee Yes
headline string Headline of the member is returned, which is obtained from the member profile I am hiring Yes
photo imageUrn Profile picture of the member returned. urn:li:image:{imageId} No

Search by Vanity URL for Organization Page

This is an exact match search by vanity URL. Response contains person URN that can be decorated to obtain member's basic profile information.

Sample Request

GET "https://api.linkedin.com/rest/vanityUrl?q=vanityUrlAsOrganization&vanityUrl=https://www.linkedin.com/in/{vanityName}&organization=urn%3Ali%3Aorganization%3A2414"

Sample Response

{
    "paging": {
        "start": 0,
        "count": 10,
        "links": [],
        "total": 1
    },
    "elements": [
        {
            "member": "urn:li:person:abcdefg1h"
        }
    ]
}

Error Messages

Code HTTP Status Code Error Message Template
SEARCH_KEYWORD_TOO_SHORT 400 Minimum of 3 characters required for keyword.
SEARCH_FORBIDDEN 403 Inadequate permissions to continue the search.
NOT_FOUND 404 Could not find entity - e.g invalid org urn in the input
ACCESS_DENIED 403 Unsupported parameters
INVALID_SPACE_CHARACTER_COUNT_IN_SEARCH_KEYWORD 400 Only maximum one space character allowed
INSUFFICIENT_KEYWORDS_LENGTH 400 Keywords length must be larger than 6 if contains space and/or dot
NOT_ALLOWED_CHARACTERS_IN_SEARCH_KEYWORD 400 Keywords contain not allowed characters, only alphabet and special characters: space, apostrophe, hyphen, dot are allowed
NOT_ALLOWED_CONSECUTIVE_CHARACTERS_IN_SEARCH_KEYWORD 400 Consecutive special characters are not allowed