LinkedIn is the world’s largest professional network with over 810 million members. As one of the most popular social media platforms for business, LinkedIn offers various APIs that allow developers to integrate LinkedIn data and functionality into their own applications.
What is an API?
An API (Application Programming Interface) is a set of protocols, routines, and tools that enables different software applications to interact with each other. APIs work by exposing certain functions and data for use by other developers.
For example, the LinkedIn API allows developers to build applications that can connect with LinkedIn member profiles, companies, jobs, groups, posts, messaging, and more. By accessing these features via the API, developers don’t have to build them from scratch.
What is an API key?
An API key is a unique identifier that is used to authenticate a developer’s application for access to an API. The API key allows the API provider (in this case, LinkedIn) to identify the application making API calls and monitor usage for security, analytics, and rate limiting purposes.
Developers must register their application with LinkedIn to obtain an API key. The key then gets sent along with each API request from that application. LinkedIn uses the key to validate that the app is authorized to access the API.
Here are some key facts about LinkedIn’s API keys:
- LinkedIn API keys consist of 22 alphanumeric characters (e.g. 123a4b56c78X9zABcDeF123aB45)
- Each key is unique to a single application
- Keys are generated during the app registration process
- Keys do not expire and can be used indefinitely
- There are different API keys for production vs sandbox environments
- Apps must authenticate every API call with a valid key
Without a proper API key, an app will not be able to make successful calls to the LinkedIn APIs.
Why do you need a LinkedIn API key?
There are a few key reasons developers need to use API keys when accessing the LinkedIn platform:
- Authentication – The API key allows LinkedIn to verify the identity of the application connecting to the API. This is important for security to prevent unauthorized access.
- Analytics – LinkedIn uses the API key to track API usage statistics for each application. This allows them to monitor adoption and performance.
- Rate limiting – API keys enable LinkedIn to enforce request throttling policies by application. This prevents abuse and ensures availability.
- Support – The key identifies the application making calls for troubleshooting and support purposes.
- Monetization – Keys are used to bill apps based on their API usage if they are using a premium tier.
In summary, the API key allows LinkedIn to control access, maintain performance, and monitor usage for each application integrated with their platform. Requiring a unique key prevents anonymous abuse of their APIs.
How to get a LinkedIn API key?
To obtain an API key for LinkedIn, developers must follow these steps:
- Go to https://www.linkedin.com/developers/ and click “Sign in” to login with your LinkedIn developer account. If you don’t have one, you can create a new account.
- Once logged in, click on “My Apps” in the top right corner.
- Click the “+” button to register a new app. Complete the form including name, description, logo, app website, redirect URLs, etc.
- Agree to LinkedIn’s API Terms of Use.
- Click “Submit” to create the app. This will generate a unique API key.
- Copy and save this API key to make authenticated calls from your application.
- If needed, you can generate separate keys for production and sandbox testing environments.
Once these steps are completed, you will have an API key that can be used to make up to 50,000 free API calls per month to LinkedIn’s platform. Usage beyond that requires purchasing a premium plan.
How to use a LinkedIn API key
Here is an example code snippet showing how to make an API call to LinkedIn using an API key in Python:
“`python
import requests
api_key = ‘123456789abcdef123456789’
url = ‘https://api.linkedin.com/v2/me’
headers = {
‘Authorization’: ‘Bearer ‘ + api_key,
‘cache-control’: ‘no-cache’
}
response = requests.get(url, headers=headers)
print(response.json())
“`
The key points are:
- The API key is assigned to a variable
- It gets passed in the request headers as a Bearer token
- Every API call needs to include the key for authentication
- The returned JSON response contains your app’s API data
This same approach works across all languages and frameworks when calling any LinkedIn API endpoint.
Some other tips for properly using a LinkedIn API key:
- Only make API calls from server-side code instead of client-side.
- Do not expose the key publicly in code or on the internet.
- Set up request rate limiting to avoid throttling.
- Handle errors and retries gracefully.
- Consult the documentation for usage tips and limits.
Following these best practices will ensure your API calls succeed as expected.
Types of LinkedIn APIs and use cases
LinkedIn provides a variety of different APIs to enable diverse use cases:
LinkedIn Identity APIs
These APIs allow applications to connect and authenticate with LinkedIn accounts:
- Sign In with LinkedIn – Enables account login/signup via LinkedIn.
- Account Access – Get profile data for logged in users.
- Account Creation – Create LinkedIn accounts from your app.
Use cases: one-click login, social signups/logins, user profile data
LinkedIn Platform APIs
These APIs allow accessing LinkedIn data like profiles, companies, posts, groups, etc:
- Profile API – Get member profile data like skills, education, connections.
- Share API – Post share content to LinkedIn including links, images, docs.
- Company API – Access data on millions of LinkedIn companies.
- Job Search API – Programmatic access to LinkedIn job listings.
- Interests API – Get member interests and suggestions.
Use cases: business intelligence, marketing analytics, data enrichment, social sharing
LinkedIn Marketing APIs
These APIs allow managing LinkedIn ads and marketing campaigns programmatically:
- Campaign Manager API – Create, manage, and analyze ads and advertising accounts.
- Conversion Tracking API – Track conversions from your ad campaigns.
- Audience API – Build targetable audiences for your ads.
Use cases: automated marketing, campaign performance, audience segmentation
LinkedIn Sales APIs
These APIs enable sales intelligence use cases:
- Search API – Search across LinkedIn data including profiles, companies, jobs.
- Recruitment API – Programmatically manage LinkedIn Recruiter.
- Lead Accelerator API – Prioritize sales leads based on LinkedIn data.
Use cases: sales prospecting, sourcing, enrichment, recruiting automation
So in summary, LinkedIn provides a diverse set of APIs to enable apps across social, marketing, sales, recruiting, login, and more. The API key unlocks access to all these capabilities.
Limitations and restrictions
There are some key limitations and restrictions developers should be aware of when using LinkedIn’s APIs:
- Request throttling – Apps are limited to a maximum number of API calls per second/minute/day to prevent abuse.
- User rate limits – Limits on the number of calls per LinkedIn member to protect their data privacy.
- Results limits – Caps on the max number of results returned by search and field calls.
- Web scraping prohibition – Bulk downloading or scraping LinkedIn data via APIs is forbidden in the ToS.
- User consent – Certain APIs require asking for user permission before accessing their data.
- Cost – Access beyond 50k calls/months requires paid API packages.
Consult LinkedIn’s documentation closely to ensure your app stays within proper usage guidelines. This will prevent disruptions due to hitting rate limits or violation of terms.
Conclusion
In summary, a LinkedIn API key is a unique developer credential required to authenticate applications for accessing LinkedIn platform APIs. The key identifies the app making calls for security, analytics, and throttling purposes.
Developers need to register their app through the LinkedIn developer portal to obtain the needed API key. This key then gets passed along with each API call via request headers. Proper usage of the key enables apps to leverage LinkedIn login, data, marketing capabilities, and more within the constraints of the ToS. With over 810 million members, LinkedIn’s platform provides valuable business data to build powerful apps.
API | Description | Use Cases |
---|---|---|
Identity APIs | Enable LinkedIn login and account access | Social login, get user profile data |
Platform APIs | Access LinkedIn data like profiles, companies, jobs | Business intelligence, data enrichment |
Marketing APIs | Manage LinkedIn ads and campaigns | Automated marketing, optimization |
Sales APIs | Enable sales prospecting and recruiting | Lead gen, sourcing, hiring |