Yes, LinkedIn has an official API. It is documented by Microsoft at learn.microsoft.com/linkedin and it is genuinely usable, but only a thin slice of it is open to everyone. LinkedIn splits access into two categories: Open Permissions, which any developer gets instantly with no review (sign in with OpenID Connect, and posting as the authenticated member via w_member_social), and everything else, which requires an approved partner program application.
LinkedIn's own access page states it plainly: "Open Permissions are the only permissions that are available to all developers without special approval." So the honest answer to "is there a LinkedIn API" is: there is one API, one self-serve tier that lets you post as a person, and a much larger gated tier for company pages, analytics, ads, and compliance data that you have to apply for and may not get.
Does LinkedIn have an API?
LinkedIn has one REST API, hosted at https://api.linkedin.com/rest/, documented on Microsoft Learn and organized into six business lines: Consumer, Compliance, Learning, Marketing, Sales, and Talent. What confuses most developers searching for "the LinkedIn API" is that these are not tiers of one product. They are separate programs with separate applications, separate legal agreements, and wildly different odds of approval. Search results that promise a general-purpose LinkedIn API are usually describing one of the gated programs, or a scraper.
The line that actually matters runs between self-serve and approval-gated. LinkedIn's getting access page lists exactly three Open Permissions: profile and email (through Sign In with LinkedIn using OpenID Connect) and w_member_social (through Share on LinkedIn), described as "Post, comment and like posts on behalf of an authenticated member." Everything below that line — organization pages, comments on those pages, follower statistics, ad accounts, lead forms, compliance archives — needs a product request that a human at LinkedIn evaluates.
| Program / product | What it grants | Access | Typical wait |
|---|---|---|---|
| Sign In with LinkedIn (OpenID Connect) | openid, profile, email — the authenticated member's id, name, picture, email | Self-serve | Instant |
| Share on LinkedIn | w_member_social — create, update, delete the member's own posts, upload member-owned media | Self-serve | Instant |
| Community Management API | Organization page posting, comments, reactions, page and follower analytics, @mention notifications | Application + review | 1 to 4 weeks |
| Advertising API | Ad accounts, campaigns, creatives, rw_organization_admin | Application + review | Weeks |
| Lead Sync / Conversions API | Lead Gen Form submissions, conversion events | Application + review | Weeks |
| Matched Audiences, Audience Insights, Company Intelligence | Restricted marketing data products | Additional qualification criteria | Up to 60 days, or no fixed timeline |
| Talent Solutions / Sales Solutions | ATS integration, Sales Navigator endpoints | ATS partner or SNAP partner agreement | Partnership process |
| Compliance API | Archived member activity including messages | Closed — "may not be requested" | Not available |
Two more structural facts shape every LinkedIn integration. First, the API is versioned by header, not by URL: every call to /rest/ must send Linkedin-Version: YYYYMM plus X-Restli-Protocol-Version: 2.0.0, there is no default version, and a missing or sunset version header is an error. New versions ship monthly and are supported for a minimum of one year — 202507 was sunset on 15 July 2026, and 202607 runs until 15 July 2027.
Second, approved developers start in a Development tier with hard caps (500 app calls and 100 member calls per 24 hours for the Community Management API, with batch GETs disabled) and must submit a separate form plus a screencast to reach the Standard tier.
What can you do with the official LinkedIn API?
With self-serve access only — no application, no review — you can do more than most developers expect. w_member_social covers the full publishing surface for the authenticated member's own feed through the Posts API (POST /rest/posts), which replaced the older ugcPosts and shares endpoints. That includes text, single image, single video, PDF or document posts, article/link posts, and multi-image carousels of 2 to 20 images.
You can also partially update a published post's commentary and delete it. Media follows a three-step flow: initialize the upload (POST /rest/images?action=initializeUpload), PUT the binary to the returned URL, then reference the returned urn:li:image:... when creating the post.
- Publish as a member — text, image, video, document, article, and multi-image posts to the authenticated person's feed. Commentary is capped at 3,000 characters and supports
#hashtagand@[Name](urn:li:organization:ID)syntax. - Update and delete the member's own posts (
PARTIAL_UPDATEon commentary;DELETEby URN). - Identify the member through
GET /v2/userinfoafter an OpenID Connect sign-in. Thesubvalue becomes theurn:li:person:{sub}you use as the post author. - Publish as an organization page — same Posts API,
w_organization_socialscope, but only after Community Management API approval and only for pages where the authenticated member holds an ADMINISTRATOR or content-admin role. - Read and manage comments on your own page's posts — read the thread, reply, react, delete. Also gated behind Community Management.
- Page and post analytics — follower statistics, page views and clicks, share statistics, video watch time. Gated.
One detail worth internalizing before you write any code: the created post's URN comes back in the x-restli-id response header, not in the response body. The body of a successful create is empty. We lost real time to that on the first pass of our own connector, and it is the single most common cause of "the post published but my code says it failed" reports.
Two others in the same family: LinkedIn does not scrape link previews, so an article post needs you to supply the thumbnail, title, and description explicitly; and the Posts API has no scheduling field, so future-dated publishing has to be queued on your side.
There is also a documentation seam worth knowing about. The self-serve Share on LinkedIn page still shows the legacy POST /v2/ugcPosts endpoint with no version header, while the current Posts API lives entirely inside the Marketing documentation tree. The legacy UGC page's deprecation banner carves out that "the above deprecation is applicable for partners with Marketing permissions only."
In practice, our member-publishing path runs against /rest/posts with the versioned header and has held up in production, but LinkedIn has not reconciled the two pages — so if you are reading the self-serve docs and wondering why every example you find online uses a different endpoint, that is why.
What can't you do with the LinkedIn API?
This is the section most "LinkedIn API" articles skip, and it is the one that saves you a sprint. A large share of what developers want from LinkedIn is not gated behind a form — it is not available at all, to anyone outside a handful of contractual partners. Being honest about that list up front is more useful than a feature tour.
| What you want | Official API? | Reality in 2026 |
|---|---|---|
| Read the LinkedIn home feed / timeline | No | No feed endpoint exists in current docs, and the Marketing API terms explicitly forbid social-feed use cases |
| Look up an arbitrary profile by URL or name | No | The Profile API is approval-restricted; member ids are pairwise (app-scoped), so an id from one app 404s in another |
| People search / prospect enrichment | No | Restricted use cases ban using member data to enrich a CRM, build audience lists, or identify prospects |
| Read or send direct messages | No | No messaging write API exists. Message data lives only in the Compliance API, whose access is marked closed |
| Read a member's own past posts | No | Requires r_member_social, a closed permission: "We're not accepting access requests at this time" |
| Comment or react as a member | No (self-serve) | Needs w_member_social_feed, part of Community Management — not in the auto-approved Share on LinkedIn product |
| Store profile or activity data long-term | No | Member social activity may be stored 48 hours; most member profile data 24 hours |
| Webhooks for page events | Partner only | Social-action push notifications exist but are disabled in the Development tier and gated in Standard |
| Post scheduling | No | The Posts API has no scheduled-publish field; you queue and fire on your own clock |
The w_member_social boundary in particular catches teams out. The scope's own description says "post, comment and like posts on behalf of an authenticated member," which reads like comments are included. They are not: LinkedIn's Comments and Reactions API permission tables require the _social_feed scopes, which ship with the Community Management product and its review. We had to correct our own capability matrix after verifying this against the current docs rather than the scope blurb.
If your product needs a member to reply to comments, budget for the Community Management application from day one.
The other hard boundary is data retention. LinkedIn's restricted use cases page forbids combining member data with your own or third-party data "to create, supplement, verify, or append to user profiles, leads, reference tables," and caps storage at 48 hours for social activity and 24 hours for most profile data. Any architecture that assumes you can warehouse LinkedIn data and query it later is non-compliant by design, and "failure to comply with the terms will result in loss of API access."
Is the LinkedIn API free? What does it cost?
The LinkedIn API is free. There is no price list, no per-call charge, and no paid tier for API access. The LinkedIn API Terms of Use says so directly, under "Costs and Fees": "The APIs are currently provided for free, but LinkedIn reserves the right to charge for the APIs in the future." No page on learn.microsoft.com/linkedin or developer.linkedin.com quotes a fee for any API product.
If you have seen figures like $699/month or $10,000+/year for "LinkedIn API access" in search results, treat them as unsourced. None of them trace back to a LinkedIn or Microsoft page; they come from vendor content marketing. What is true is that some LinkedIn products whose data the API exposes cost money — Sales Navigator seats, Recruiter licenses, ad spend — but that is a subscription to the product, not a fee for the API.
LinkedIn's API is not gated by money. It is gated by approval, review time, and a permission model that says no to most of what developers want.
The real cost is measured in weeks and in engineering hours. A Community Management application takes 1 to 4 weeks and needs a use-case form; the Standard tier upgrade needs a screencast demonstrating each declared use case, and LinkedIn states it "reserves the right to review applications and select partners at its discretion and a partner might not be upgraded even if they meet these minimum requirements."
There is a portal gotcha too: Community Management Development tier access can only be requested from a new developer app that does not already hold other API products — request it on an existing app and the option is greyed out.
Rate limits are the third hidden cost. LinkedIn does not publish standard limits: "Standard rate limits are not published in documentation." There are no X-RateLimit-* response headers and no Retry-After on a 429 — you get {"code": "QUOTA_EXCEEDED", "message": "Throttle limit exceeded by application"} and the counter resets at midnight UTC, which means an exhausted quota is an outage until the next day, not a backoff. Exponential retry does not help.
The only visibility is the Analytics tab of the Developer Portal, and only for endpoints you have already called today. The two published numbers are Share on LinkedIn (150 requests per member, 100,000 per application, daily UTC) and the Community Management Development tier (500 app calls and 100 member calls per 24 hours, batch GETs disabled). This is why we treat LinkedIn's daily reset as a first-class case in our own rate limit handling rather than a generic 429.
How do you post to LinkedIn with Python?
Posting to LinkedIn from Python is four moving parts: an OAuth 2.0 authorization-code exchange, a GET /v2/userinfo call to learn the member's sub, the three required headers, and a POST /rest/posts body with author, commentary, visibility, distribution, and lifecycleState. Miss any of the four required body fields and LinkedIn answers MISSING_FIELD.
The first tab below is the raw LinkedIn REST flow. The second and third are the same publish through SocialAPI.ai's unified endpoint, where the LinkedIn app, the version header, the URN plumbing, and the media upload protocol are already handled.
import requests
ACCESS_TOKEN = "..." # from the OAuth 2.0 authorization-code exchange
LINKEDIN_VERSION = "202607" # newest YYYYMM; each version lives ~12 months
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
"X-Restli-Protocol-Version": "2.0.0",
"Linkedin-Version": LINKEDIN_VERSION,
"Content-Type": "application/json",
}
# 1. Who is the member? 'sub' is pairwise: unique to YOUR app only.
me = requests.get(
"https://api.linkedin.com/v2/userinfo",
headers={"Authorization": f"Bearer {ACCESS_TOKEN}"},
).json()
author = f"urn:li:person:{me['sub']}"
# 2. Publish. All four of author/visibility/distribution/lifecycleState
# are required or LinkedIn returns MISSING_FIELD.
r = requests.post(
"https://api.linkedin.com/rest/posts",
headers=headers,
json={
"author": author,
"commentary": "Shipped our API v2 today. Here is what changed.",
"visibility": "PUBLIC",
"distribution": {
"feedDistribution": "MAIN_FEED",
"targetEntities": [],
"thirdPartyDistributionChannels": [],
},
"lifecycleState": "PUBLISHED",
"isReshareDisabledByAuthor": False,
},
)
# 3. The post URN is in a HEADER. The response body is empty.
r.raise_for_status() # 201 Created
print(r.headers["x-restli-id"]) # urn:li:share:7...
# Attaching an image means three more calls first:
# POST /rest/images?action=initializeUpload -> uploadUrl + image URN
# PUT <uploadUrl> (binary)
# poll the image until status == AVAILABLE, then reference the URNimport os, requests
SOCAPI_KEY = os.environ["SOCAPI_KEY"]
# One endpoint, one body shape. No LinkedIn app, no version header,
# no URN encoding, no x-restli-id special case.
r = requests.post(
"https://api.social-api.ai/v1/posts",
headers={
"Authorization": f"Bearer {SOCAPI_KEY}",
"Content-Type": "application/json",
},
json={
"text": "Shipped our API v2 today. Here is what changed.",
"targets": [
{"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"},
],
# media_ids come from the media upload endpoint;
# images, a video, or a 2-20 image carousel all use this field.
"media_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"],
},
)
r.raise_for_status()
print(r.json()["id"]) # post id, in the response body
# Same call publishes to Instagram, X, TikTok, YouTube or Threads:
# add another account_id to targets. The platform is inferred
# from the account, so there is no branch on platform in your code.const res = await fetch("https://api.social-api.ai/v1/posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOCAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "Shipped our API v2 today. Here is what changed.",
targets: [
{
account_id: "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
visibility: "public", // or connections_only, logged_in
platform_data: {
// LinkedIn does not scrape link previews: supply your own.
article_url: "https://example.com/changelog",
article_title: "API v2 changelog",
article_description: "What changed and why",
cta_label: "LEARN_MORE",
cta_url: "https://example.com/changelog",
},
},
],
}),
});
if (!res.ok) throw new Error(await res.text());
const post = await res.json();
console.log(post.id);The difference between the tabs is not line count, it is the maintenance surface. On the raw path you own the LinkedIn developer app and its review status, the monthly version header (which errors out rather than falling back when a version sunsets), the pairwise sub lookup, and the three-step media upload with an AVAILABLE poll before you can publish.
Then there is the token lifecycle. LinkedIn member access tokens last roughly 60 days and cannot be refreshed programmatically — refresh tokens are a partner privilege — so you need a reconnect prompt in your product before day 60, every time. On the SocialAPI.ai path those are our problem, behind a stable REST interface with >99.9% uptime. Full field reference is in the LinkedIn connector docs.
LinkedIn feed API: can you read the LinkedIn feed?
No. There is no official LinkedIn feed API. You cannot read a member's home timeline, you cannot pull a stream of posts from people they follow, and you cannot mirror LinkedIn content into your own app. A legacy Activity Feed endpoint (GET /v2/activityFeeds?q=networkShares) appears in old search results and cached documentation; every live URL for it now returns 404 and it is absent from the current documentation tree.
More importantly, it is contractually excluded, not just technically missing. LinkedIn's restricted use cases page states: "No Social Feeds: Under our Marketing API Terms, none of the data provided via our Community Management APIs can be used in a social feed use case (e.g. to display a feed of LinkedIn company updates on the company's website or intranet)."
So even a partner with full Community Management approval cannot legitimately build the embedded-feed widget that this query usually implies. Combine that with the 48-hour storage cap on member social activity and the feed product simply is not buildable on the official API.
What you can compliantly do instead, in rough order of usefulness:
- Read your own organization page's posts and their comments — the Community Management API's
r_organization_socialscope covers posts, comments, likes, and engagement data on pages you administer. This is the closest legitimate thing to "a feed," scoped to content you own. - Subscribe to social-action notifications on your own page rather than polling — LinkedIn's push notifications for social actions exist for approved Standard-tier apps, though they are disabled in the Development tier.
- Track brand mentions of your own page through the Organization Social Actions Notifications surface, again on pages you administer.
- Let the member export their own data — the DMA Member Data Portability API returns a consenting member's own profile and activity, but only for members in the European Economic Area, and only after app review plus business verification.
- Use a different network for listening. If the product need is a real content stream, the platforms that expose one (X, Reddit, YouTube, Instagram mentions) are where that feature belongs. Our social mentions API covers what is actually readable per platform.
This is also the honest dividing line between the two kinds of "LinkedIn API" vendors. Tools built on official APIs — including SocialAPI.ai — cannot offer feed reading, member DMs, or profile enrichment on LinkedIn, because LinkedIn does not expose them. Tools that do offer those features on LinkedIn are generally driving a real member session, which is a different risk profile entirely. Unipile's pricing and model is the clearest example of the session-based contrast, and worth reading before you choose an approach.
Is the unofficial linkedin-api Python package safe to use?
Search "linkedin api python" and the top results include an unofficial PyPI package named linkedin-api that reaches LinkedIn's internal Voyager endpoints using a real member's session cookies. It gives you exactly the things the official API withholds: feed reads, arbitrary profile lookups, search, messages. It also violates LinkedIn's Terms of Service, and using it puts the account whose session it borrows at risk of restriction or a permanent ban.
That is not an opinion. The package's own PyPI description states: "This library is not officially supported by LinkedIn. Using this library might violate LinkedIn's Terms of Service. Use it at your own risk." LinkedIn's User Agreement prohibits software "to scrape or copy the Services, including profiles and other data," prohibits "bots or other unauthorized automated methods to access the Services," and specifically prohibits using another's account "(such as sharing log-in credentials or copying cookies)" — which is precisely how session-based clients authenticate.
The API Terms of Use separately bar accessing LinkedIn content "outside the APIs" by scraping or crawling. The package's GitHub repository returns 404 as of July 2026; the PyPI package remains published at 2.3.1, last released November 2024.
The practical calculus: the account carrying the risk is usually a real person's LinkedIn profile — often the founder's or a client's — and LinkedIn's enforcement is account-level, not app-level. A ban costs a network that took years to build.
SocialAPI.ai uses official platform APIs only, on every network we support, and that is a deliberate constraint: it means we cannot ship a LinkedIn feed reader, and it also means nothing we ship can get your account banned. If a capability is missing from our LinkedIn platform page, the reason is always that LinkedIn does not officially expose it.
Frequently asked questions
- Does LinkedIn have an API?
- Yes. LinkedIn has an official REST API at https://api.linkedin.com/rest/, documented by Microsoft at learn.microsoft.com/linkedin. Access is split between Open Permissions available to every developer with no review (
profileandemailvia Sign In with LinkedIn using OpenID Connect, andw_member_socialvia Share on LinkedIn) and a much larger set of programs — Community Management, Advertising, Talent, Sales, Compliance — that require an application and LinkedIn's approval. LinkedIn's own documentation states that Open Permissions are the only permissions available without special approval. - Is the LinkedIn API free?
- Yes, the LinkedIn API is free to use. LinkedIn's API Terms of Use state under "Costs and Fees" that "the APIs are currently provided for free, but LinkedIn reserves the right to charge for the APIs in the future." No LinkedIn or Microsoft page quotes a price for any API product. Figures circulating online such as $699/month or five-figure annual fees do not trace to any official source. The real barrier is approval, not payment: the Community Management API takes 1 to 4 weeks of review, and some marketing data products are restricted to developers meeting additional criteria.
- Can I read the LinkedIn feed through an API?
- No. There is no official LinkedIn feed or timeline API, and it is contractually excluded rather than merely missing. LinkedIn's restricted use cases page states that no data from the Community Management APIs may be used in a social feed use case, including displaying a feed of LinkedIn updates on a company website or intranet. A legacy Activity Feed endpoint exists in old documentation but every live URL for it now returns 404. What you can read is your own organization page's posts and their comments, with Community Management approval.
- How do I post to LinkedIn with Python?
- Exchange an OAuth 2.0 authorization code for an access token, call GET https://api.linkedin.com/v2/userinfo to get the member's
sub, then POST to https://api.linkedin.com/rest/posts with three headers (Authorization: Bearer, X-Restli-Protocol-Version: 2.0.0, Linkedin-Version: YYYYMM) and a body containing author (urn:li:person:{sub}), commentary, visibility, distribution, and lifecycleState. All four of those body fields are required. The created post's URN is returned in thex-restli-idresponse header, not the body. Through SocialAPI.ai the same publish is a single POST /v1/posts withtextand atargetsarray, and the LinkedIn app, version header, and media upload protocol are handled for you. - Can I send LinkedIn direct messages through an API?
- No. LinkedIn exposes no messaging write API in the Consumer, Marketing, or Community Management documentation. Message data appears only in the Compliance Events API, which captures inbound and outbound messages for archiving in regulated industries, and LinkedIn's current access page lists Compliance permissions as closed with access that "may not be requested." Message Ads and Conversation Ads exist under the Advertising API, but those send sponsored InMail as ad units and are not a conversational messaging API.
- Can I look up any LinkedIn profile through the API?
- No. The Profile API is restricted to developers approved by LinkedIn, and even then you cannot look up a member by public profile URL or vanity name. Member ids are pairwise, meaning an id is unique to your application, so sharing one across apps returns a 404. LinkedIn's restricted use cases also ban using member data to enrich CRM records, build audience lists, identify prospects, or append to lead tables. Self-serve profile access is limited to the authenticated member's own basic profile through OpenID Connect.
- What is the difference between the Community Management API and Share on LinkedIn?
- Share on LinkedIn is the self-serve product granting
w_member_social: publish, update, and delete the authenticated member's own posts and upload their media. It is auto-approved instantly. The Community Management API is the approval-gated product covering organization pages: posting as a company page, reading and replying to comments, reactions, follower statistics, page and video analytics, and @mention notifications. It requires a use-case application (1 to 4 weeks), starts in a Development tier capped at 500 app calls per 24 hours, and needs a screencast submission to reach the Standard tier. - Is the unofficial linkedin-api Python package allowed?
- No. The unofficial
linkedin-apipackage on PyPI authenticates with a real member's session cookies against LinkedIn's internal Voyager endpoints. Its own description warns that it is not supported by LinkedIn and that using it might violate LinkedIn's Terms of Service. LinkedIn's User Agreement prohibits scraping the Services, using bots or unauthorized automated access, and using another's account by sharing credentials or copying cookies. The account whose session is used risks restriction or a permanent ban. SocialAPI.ai uses official platform APIs only. - How long do LinkedIn access tokens last?
- LinkedIn member access tokens last about 60 days and cannot be refreshed programmatically — refresh tokens are limited to approved partners. That means any self-serve integration must prompt the member to reconnect before the token expires, and must handle the 401 responses (serviceErrorCode 65600 for invalid or empty tokens, 65601 for tokens the member revoked) by marking the connection as expired rather than retrying. LinkedIn also provides no token revocation API, so disconnecting only clears the token on your side.
The short version: LinkedIn has an API, it is free, and the self-serve slice is genuinely enough to build member publishing on. Everything past that — company pages, comments, analytics — is a review queue, and the feed, profile lookup, and DMs are not on the menu at any tier.
If member and organization page publishing is what you need, SocialAPI.ai runs both through one endpoint with no LinkedIn app and no review on your side: see the LinkedIn platform page, the connector documentation, or the broader case for one API across every social network.
All LinkedIn API behavior described here was verified against Microsoft's official LinkedIn developer documentation in July 2026. Primary sources: LinkedIn API documentation (Microsoft Learn) · Getting access to LinkedIn APIs (Open Permissions vs gated programs) · Increasing access (permission tables, Development vs Standard tiers) · Share on LinkedIn (self-serve w_member_social product) · Sign In with LinkedIn using OpenID Connect · Posts API (POST /rest/posts, required headers and fields) · Community Management API overview · Restricted uses of LinkedIn Marketing APIs and data (no social feeds, storage caps) · LinkedIn API versioning (YYYYMM header, monthly cadence, 1-year support) · LinkedIn API rate limiting (application vs member, midnight UTC reset) · Profile API (approval-restricted, pairwise member ids) · Compliance Events API: messages resource · LinkedIn API Terms of Use (Costs and Fees; no scraping outside the APIs) · LinkedIn User Agreement (no scraping, no bots, no copied cookies)
