LinkedIn API

The LinkedIn API provides programmatic access to LinkedIn data and functionality, enabling developers to integrate the world’s largest professional network into custom applications.

With over 850 million members, LinkedIn is a goldmine of rich member profile data, social graph connections, group discussions, job opportunities, and more. Tapping into these assets can create tremendous value.

In this comprehensive guide, we’ll cover everything you need to know about getting started with the LinkedIn API including:

What is the LinkedIn API?

The LinkedIn API is a set of developer interfaces that allow software developers to connect with LinkedIn data and capabilities from within their own applications.

Rather than needing to build an entirely separate app on LinkedIn.com, developers can access member profiles, connections, groups, communications and more straight from their integrated product experience using the API.

Some key capabilities offered via the LinkedIn API include:

  • Access member profile data – Retrieve member profiles and fields, update member data
  • Leverage connections – Access 1st and 2nd degree connections for messaging
  • Post content updates – Create posts, articles and other shareable updates
  • Interact with jobs – Search jobs, post new listings, apply for openings
  • Join groups – Discover and participate in LinkedIn groups
  • Analyze opportunities – Track prospects and leads
  • Authenticate – Confirm member identity and access permissions

So whether you want to retrieve member data, post updates, discover jobs or facilitate connections, the LinkedIn API serves as the gateway linking your product to LinkedIn’s capabilities.

Also read: The Complete Guide to LinkedIn Newsletters

Types of LinkedIn APIs

LinkedIn actually offers a few different API options segmented by use case:

  • LinkedIn Marketing Developer Platform – Focused specifically on marketing and advertising capabilities like managing ads and generating insights.
  • LinkedIn Talent Solutions APIs – Specialized for recruiting use cases like posting jobs, searching profiles and sharing opportunities.
  • LinkedIn Platform REST APIs – The core developer platform providing member data access and social integrations.

We’ll focus mostly on the Platform REST APIs which support the widest range of member-facing integrations accessing profiles, content, messaging and groups.

Now let’s look at some potential applications for the LinkedIn API.

Real-World Uses Cases for the LinkedIn API

Thanks to the abundance of rich professional data LinkedIn provides, there are endless possibilities for integrating LinkedIn APIs into business applications such as:

Talent CRM and Recruitment Tools

Fetching LinkedIn profile data into candidate records within recruitment CRM and applicant tracking systems keeps prospect data up-to-date. Outreach tools can also leverage 1st degree connections for warm introductions.

Career Sites and Job Searches

Embedding targeted LinkedIn job listings onto career sites helps funnel relevant opportunities to site visitors. Users can also authenticate via LinkedIn for saved job search alerts.

Social Media Management and Marketing

Managing brand pages, posting content updates, tracking engagement metrics and sponsoring ads through LinkedIn APIs infuses social media efforts with the unique professional context of LinkedIn’s audience.

Sales Intelligence and Prospecting

By scanning a prospect’s LinkedIn profile and connections, sales teams can better understand pain points and identify insider contacts before calls.

Talent Analysis and Competitive Intelligence

Connecting insights from LinkedIn Groups and employee changes tracked in company pages provides useful signals for competitive intelligence efforts.

As these examples illustrate, LinkedIn’s professional richness presents diverse use case opportunities across talent acquisition, marketing, sales, and operations functions when woven into systems via API integrations.

Next let’s explore the technical landscape of getting started with LinkedIn API development.

LinkedIn API Authentication and Access

Before diving into capabilities, the first step for accessing any LinkedIn APIs entails proper developer authentication and access configurations.

Registering a LinkedIn API Application

To start using LinkedIn APIs, you must first register an API application within LinkedIn’s developer portal at https://www.linkedin.com/developers/apps/new.

This creates an app profile that serves as the control panel for managing app credentials and permissions to call LinkedIn APIs.

As part of app registration, you’ll need to provide basic descriptive details like:

  • App name and logo – Used when requesting member permissions
  • App type – Web vs mobile app context
  • Redirect URLs – Trusted callback locations
  • API Use Case – Helps LinkedIn align appropriate data access
  • Company name – Your organization
  • Contact info – For support channels

This registration process only takes a few minutes but is crucial for getting API credentials.

Also read: Understanding LinkedIn Social Selling Index: The Complete Guide

LinkedIn API Authentication Options

Once your app is created, there are two authorization approaches available:

OAuth 2.0

The recommended method leverages standard OAuth 2.0 authentication flows. This allows members to approve one-time permission for your app to access their LinkedIn data without exposing long term credentials.

OAuth involves redirecting them through LinkedIn’s permission screens to generate a temporary access token permitting API requests scoped to the levels they approved.

User Token Access

The legacy yet still functional authorization approach accepts user authentication tokens. But rather than temporary session-based access, these grant indefinite API permissions until explicitly revoked.

The downside is users must generate custom LinkedIn tokens within their security settings and manually provide them to your app – adding friction vs OAuth automaticity.

Overall, OAuth 2.0 is preferred for smoother security and UX. Now let’s examine API request mechanics.

LinkedIn API Request Structure

Once authenticated as an approved LinkedIn API app, you can begin issuing requests to access resources and capabilities.

API calls follow common REST methodology with structured URIs sent using HTTP GET or POST actions. Expect JSON payloads.

Here is an example request to retrieve profile data for the authenticated member:

GET https://api.linkedin.com/v2/me

Key components of a LinkedIn API request involve:

Base API Endpoint URL

The core API host address:

https://api.linkedin.com

API Version

Current default is v2 but versionless paths persist for some resources:

/v2/ 

API Resource Path

Route to relevant LinkedIn object like /me for current user:

/me

Request Parameters

Additional filters or identifiers like ?format=json to select JSON responses:

?format=json

Authentication Header

Pass Access Token from OAuth flows:

Authorization: Bearer [acccesstoken] 

Chaining these elements together forms full API request construction to query LinkedIn data.

Now that we’ve reviewed the prerequisites around authentication and request mechanics, let’s explore some of the top capabilities.

Core LinkedIn API Capabilities

The LinkedIn Platform API offers over 50 endpoints across a few key categories enabling diverse integrations:

Member Profile APIs

  • Retrieve member data
  • Update member profiles
  • Get 1st degree connections

Content and Social Graph APIs

  • Post share updates
  • Interact with content
  • Join groups

Jobs and Hiring APIs

  • Search jobs database
  • Post new job listings

Communications and InMail APIs

  • Send messages to connections
  • Request introductions

To frame examples for each area, we’ll walk through common use cases and sample API requests to demonstrate potential integrations.

Also read: Unlocking the Value of LinkedIn Easy Apply for Candidates and Employers

Fetching LinkedIn Member Profile Data

Accessing member profile information is one of the most popular uses of the LinkedIn API given the richness it provides.

Whether retrieving data to maintain up-to-date CRM records or personalizing experiences by integrating LinkedIn identity, member profiles enable various applications.

API Endpoints Overview

Key endpoints for accessing member data include:

GET /me – Details for currently authenticated user

GET /member/~:{public-profile-id} – Public profile data lookup by LinkedIn URL ID

GET /member/~:{formatted-name} – Public profile lookup by member name

GET /memberConnections – List of 1st degree connections

Note profile data visibility varies by privacy settings and the relationship between requesting app and member as well as data freshness.

Now let’s walk through sample profile data requests.

Requesting Authenticated Member Profile

To start, requesting the /me profile retrieves info on the current member who granted OAuth access rather than another user.

GET https://api.linkedin.com/v2/me

It returns a rich set of attributes like:

{
  "firstName": "John",
  "lastName": "Doe",
  "profilePicture": {
    "displayImage": "urn:li:digitalmediaAsset:B54328XZFfe2134zXe" 
  }, 
  "positions": {
   "values": [ 
     {
          "companyName": "Acme Corp",
       "title": "Marketing Manager"
     }
    ]
  },
  "educations": [
     { 
      "schoolName": "State College",
      "degree": "Bachelor's Degree"
    }
   ]
}

This provides expansive personal profile data from employment history to education and photos that can populate integrated records.

Public Profile Lookups

Alternatively, the /member endpoints allow searching outside just the authenticated user. By passing a public profile ID or vanity name URL fragment, details can be retrieved like:

GET /member/~testuser

Or with their unique ID:

GET /member/~AAoAABscsJb3zEAAAAX

But be aware external profile data visibility depends on member privacy configurations so expect variances.

Now let’s move beyond just read-only profile lookups to see how data can also be updated.

Modifying Member Profile Data

In addition to reading member profiles, the LinkedIn API provides endpoints for writing back profile data updates. This allows maintaining synchronized identity and professional data across systems.

Updating Member Position

For instance, when a promotion or job change happens in an HCM system, the profile can reflect it.

Calling the API with a PUT request against the /positions route allows adding the new role:

PUT https://api.linkedin.com/v2/me/positions

{
  "company": "Acme Corp",
  "title": "Vice President, Sales"  
}

The passed JSON payload will instantly update the employment position on the member’s public LinkedIn profile.

Adding Profile Media Assets

Another common update is adding a profile banner photo or custom background. Dropping an image into the /backgroundMediaUpload endpoint updates styling:

POST https://api.linkedin.com/v2/me/backgroundMediaUpload

{
  "image”: “https://host/image.png”
}

This seamlessly updates branding without needing to visit settings pages.

Posting Member Updates

Lastly, creating share post updates on behalf of the authenticated member maintains an active social presence:

POST https://api.linkedin.com/v2/shares

{
   "commentary": "Closing big deals thanks to my awesome team!",
   "visibility": {
     "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
   }
 }

The API allows controlling visibility while saving the effort of manually posting updates.

So in these ways the LinkedIn API provides bi-directional synchronization with key professional identity attributes from positions to brands and perspectives.

Also read: LinkedIn Scams Exposed: How to Identify and Report Suspicious Activity

Accessing LinkedIn Connections via API

In addition to directly accessing member profiles, LinkedIn data can extend further to social connections for identifying audiences and paths to them.

Activation typically engages through 1st degree networks so the API allows both harvesting connections as well as tracing supported paths to more distant contacts.

Retrieving 1st Degree Connections

The most common access need is retrieving directly connected 1st degree relations as these signal already warm relationships offering highest response propensity:

GET https://api.linkedin.com/v2/me/connections

{
  "paging": {
    "total": 230,
    "start": 0, 
    "links": []
   },
  "elements": [
    {
      "firstName": "Jane",
      "lastName": "Doe",
      "occupation": "CEO at XYZ Corp"
    },
    {
      "firstName": "John",
      "lastName": "Smith",
      "occupation": "CMO at 123 Media"  
    }
   ]
}

The full list returns 10 connections by default with pagination capabilities to read the entire network.

Each connection contains abbreviated yet still useful profile previews. But relationship insights matter too…

Filtering Connections Meta-Data

Beyond just names, the connections API supports filters providing contextual nuance like:

Shared Group Memberships – Connections sharing common communities

Relationship Indicators – Including trust markers like colleague vs classmate

GET /memberConnections?relationshipIndicators=F,S

These filters allow segmenting networks by closer affinity to prioritize based on potential relevancy and engagement odds.

Now let’s take another step outwards along the social graph…

Identifying 2nd Degree Connections

While 1st degree networks offer warm familiarity, value also comes from exposure beyond immediate contacts by traversing to secondary connections.

The API allows passing an optional edge_relation_type parameter to filter 2nd level graphs based on the intermediate hop, such as CONNECTION vs MANAGED_BY:

GET /me/network/connections?edgeRelationType=CONNECTION

This shapes wider yet still targeted outreach pools offering credible paths through mutual contacts rather than cold calls.

Between directly accessing member profiles and selectively filtering 1st and 2nd degree connections, the LinkedIn Graph API empowers personalized professional integrations.

Posting Content Updates via LinkedIn APIs

While accessing data provides one integration angle, the ability to publish back outward to LinkedIn also opens impact potential.

Through APIs, content can be seeded natively into the LinkedIn ecosystem without requiring direct logins or manually interfacing with the site.

This subsection explores creating programmatic posts and interactions.

Creating Text-Based UGC Posts

The most common and easily automated interaction type published via API are standard text-based member posts sharing either personal or company-official updates:

POST /ugcPosts

{
   "author": "urn:li:organization:1234567",
   "lifecycleState": "PUBLISHED",
   "specificContent": {
     "com.linkedin.ugc.ShareContent": {
       "shareCommentary": {
         "text": "We've having an office holiday party on Dec 15th!"
       }
     }
   },
   "visibility": {
     "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
   }
 }

This payloads shows a few key post creation aspects like:

  • Author – The member ID posting the update
  • Visibility – Public vs connections only
  • Share Commentary – The update text body

Posts can be made under either a member or company/organization URN.

Posting Rich Media Content

Expanding beyond just text updates, API requests also support embedding richer share card formats combining multimedia:

POST /ugcPosts

{
  "author": "urn:li:person:1234567", 
  "lifecycleState": "PUBLISHED",
  "specificContent": {
    "com.linkedin.ugc.ShareContent": {
      "media": [ 
        {
          "media": “urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:B54328XZFfe2134zXe,urn:li:digitalmediaMediaArtifactClass:profile-background)”,
          "status": "READY" 
        }
     ], 
    }
  },
  "title": "Check out my new background photo!",
  "visibility": {
    "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
  }
}

Here we see a custom background asset referenced in a share card along with associated title for attractive, multimedia updates beyond just text posts. Video follows similar principles.

This content publishing ability helps ensure apps integrate outbound to LinkedIn for increased visibility rather than just inbound consumption.

Searching and Interacting with LinkedIn Jobs via API

In addition to social data access, another major pillar of integration potential with LinkedIn centers around professional opportunities given the abundance of openings and applicant data available.

Several endpoints help both harness existing jobs plus distribute new listings.

Job Search and Alerts API

At the foundation lies robust indexes for sliced-and-diced talent matching via parameters like:

  • Job titles and seniority
  • Required skills and qualifications
  • Industries and functions
  • Companies currently hiring

The search API provides fine-grained filtering combinations to discover best fit openings, such as:

GET /jobs/search 

?title=sales&location=Chicago&f_TPR=r604800

Here requiring job titles explicitly mentioning the term “sales” near Chicago posted in the past 60 days.

Further, create automated saved searches via:

POST /jobs/savedSearch

{
  "query": "title:( Engineer ) AND location:( Austin )" 
}

Then consume alerts when new matching openings are posted for persistent matching:

GET /jobs/savedSearches/{saved-search-id}/search-alerts/{alert-id}

This provides proactive recommendations as relevant opportunities continually enter the ecosystem.

Similar Posts