Share via


Connections Size API

Overview

Use the Connections Size API to determine the number of 1st-degree connections within your LinkedIn member network.

To access the Connections Size API, you must apply and be accepted to one of LinkedIn's Partner Programs.

Authenticating Members

New members authenticating with your developer application for the first time will need to follow the Authenticating with OAuth 2.0 Guide. When requesting an authorization code in Step 2 of the OAuth 2.0 Guide, make sure to request the minimum set of permission scopes required for your use case.

Permission Name Description
r_1st_connections_size READ access to the number of 1st-degree connections within the authenticated member's network.
r_liteprofile READ access to a member's lite profile. This permission scope permits access to retrieve the member's ID via the Profile API. Alternatively, retrieve the member ID from any of the LinkedIn Profile APIs.

Before making a request to the Connections Size API, you will need to identify your Person ID with the Lite Profile API. Use of the Connections Size API is only permitted to retrieve the number of 1st-degree connections for the currently authenticated member. Attempts to request the number of 1st-degree connections for other members are not available.

Tip

Use decoration syntax to retrieve the Person ID within a single request.
GET <https://api.linkedin.com/v2/me?projection=(id>)

Append the Person ID to https://api.linkedin.com/v2/connections/urn:li:person: to construct your request to the Connections Size API. For example, if the current member's Person ID is pE4vfrqeK6, the full API request will resemble https://api.linkedin.com/v2/connections/urn:li:person:pE4vfrqeK6.

Sample API request

GET https://api.linkedin.com/v2/connections/urn:li:person:{Person ID}

The response includes a JSON object where firstDegreeSize denotes the number of 1st-degree member connections.

Sample Response Body

{
    "firstDegreeSize": 504
}