Back to blog

LinkedIn API: What You Can Build in 2026 (and the Faster Route)

Ruz, Founder LeadShark · Nov 2, 2026 · 8 min read

Short answer: The official LinkedIn API is built for approved partners. Sign In with LinkedIn and Share on LinkedIn are open to every developer, but messaging, reading the comments on your posts, other people's profile data and most marketing, sales and talent endpoints need LinkedIn's approval, and some of those permissions are closed to new requests. If you want to automate your own LinkedIn account, such as replying to comments, sending DMs to people who comment, enriching profiles or scheduling posts, the LeadShark API does that with one API key on any paid plan.

I build LeadShark, so read this with that in mind. Everything about the official API below comes from LinkedIn's own developer documentation as of November 2026.


What is the LinkedIn API?

The LinkedIn API is LinkedIn's official REST interface. You reach it by creating an app in the LinkedIn Developer Portal and adding "products" to that app. Every call is authorized with OAuth 2.0, either on behalf of a signed-in member (3-legged) or as your application (2-legged).

Products come in two groups:

  • Open products. LinkedIn lists exactly three open permissions that any developer can add self-serve: profile and email (Sign In with LinkedIn using OpenID Connect) and w_member_social (Share on LinkedIn). They let you sign a member in, read that member's own name, headline, photo and email, and post, comment and like on their behalf.
  • Partner programs. Everything else needs explicit approval: the Advertising API and Community Management API on the marketing side, the Sales Navigator Application Platform (SNAP) for sales, talent integrations such as Recruiter System Connect and Apply Connect, and LinkedIn Learning. The Compliance program is closed and can't be requested at all.

LinkedIn's docs put it plainly: most permissions and partner programs require explicit approval, and the open permissions are the ones available to every developer without it.

How to get LinkedIn API access

  1. Create an app in the LinkedIn Developer Portal. Under My Apps, click Create App and fill in the details. Each app is tied to a LinkedIn Page, and the Page's super admin has 30 days to approve that link. Products for individual developers use a default page you select during setup.
  2. Request the products you need. On the app's Products tab, add an open product (approved self-serve) or request a partner product. Partner products go through a vetting and use-case review. The Marketing APIs use tiers: a Development tier to build and test, then a Standard tier request with a screen recording of your app for full production access.
  3. Meet the partner requirements. For programs like Community Management, LinkedIn checks a verified business email, a registered legal organization, your website and domain, a privacy policy and Page verification. Personal email addresses don't pass, and Community Management is limited to registered organizations with commercial use cases.
  4. Authenticate with OAuth 2.0 and stay inside the rate limits. LinkedIn limits calls per application and per member, per 24 hours, resetting at midnight UTC. Most limits aren't published; you see them in your app's Analytics tab after you call an endpoint. Share on LinkedIn, for example, allows 150 requests per member and 100,000 per application a day.

Is there a LinkedIn messaging API?

Not for most developers. LinkedIn's Messages API is restricted to approved partners under an API agreement, and even then it covers messages to 1st-degree connections. A standard developer app can't send a DM from your own account. That's the gap most people hit, and it's why "linkedin messaging api" searches end in frustration.

The same wall blocks comment automation. With the open w_member_social permission you can post a comment, but reading the comments and likes on your own posts needs r_member_social, which LinkedIn lists as restricted. Its developer FAQ says the permission is closed and not taking new access requests. No comment reads means no way to see who asked for your resource, so no comment-to-DM.

The faster route: LeadShark API

The LeadShark API gives you programmatic access to your own connected LinkedIn account. It's available on all paid plans (Pro, Pro+, Apex), with one API key and no partner review.

On every paid plan:

  • Automations: create comment-to-DM automations on any of your posts, with keywords, DM template and follow-ups. Leave the keyword empty and every comment gets processed, so no comment goes unanswered.
  • Engagement: comment, react and reply from code, with the same pacing and safety checks as the rest of your account.
  • Enrichment: enrich people and companies on demand (we recommend about 200 to 250 profiles a day, spread across the day).
  • Scheduled posts, invitations, bookmarks and webhooks: schedule posts up to 90 days out with an automation that switches on when the post goes live, accept or ignore connection requests in bulk, bookmark and tag LinkedIn profiles, and stream every new comment to your own backend in real time.

On Pro+ and Apex: lead pages, links, captured leads and Discover.

On Apex: signals, search, profile visitors and followers.

Limits: 250 requests an hour, 6,000 a day and 100 a minute burst. Go over and you get a 429, so back off and retry.

Your DM budget, your call: a daily limit you set from 0 to 250 DMs (150 recommended max), shared with your automations. You can read and set it from code too, through the Activity Limits endpoint.

Two calls to automate a post

Find the post, then create the automation with the post's URN and share URL:

# 1. Find the post you want to automate
curl 'https://apex.leadshark.io/api/v1/posts?limit=5' \
  -H "x-api-key: YOUR_API_KEY"
# grab items[N].post_id  (e.g. "urn:li:activity:7150123456789012345")
# grab items[N].share_url (e.g. "https://www.linkedin.com/posts/...")

# 2. Create the automation using those values
curl -X POST 'https://apex.leadshark.io/api/automations' \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "name": "Guide Giveaway",
    "post_id": "urn:li:activity:7150123456789012345",
    "linkedin_post_url": "https://www.linkedin.com/posts/...",
    "keywords": ["interested"],
    "dm_template": "Hi {{firstName}}! Here is the guide: https://example.com/guide"
  }'

Use the full URN exactly as /api/v1/posts returns it. Every endpoint, field and error code is in the LeadShark API docs.

Get your API key in Settings, then API Access. Start your 7-day free trial, no card.

LinkedIn API for AI agents (MCP)

Want Claude, ChatGPT or Cursor to do the work instead of your own code? The same account connects as a LinkedIn MCP server at https://apex.leadshark.io/mcp, with human pacing, off-hours, an action log and an Emergency Stop. LinkedIn doesn't offer an official MCP server for acting from your personal profile.

  • Pro includes the API, not the MCP.
  • Pro+ connects the MCP with the Automation + Discover MCP (31 tools): automations, scheduling, lead pages, invitation triage, discovery and enrichment.
  • Apex is the full agent with all 51 tools: it adds search, activity, inbox, signals and acting as yourself (comments, reactions, connections, DMs).

Every agent action draws from the same daily limits as your automations. The setup steps for each assistant are in how to connect Claude or ChatGPT to LinkedIn.

Official LinkedIn API vs LeadShark API

Official LinkedIn API LeadShark API
Who can get access Any developer for the three open permissions; LinkedIn approval for partner programs Any LeadShark paid plan (Pro, Pro+, Apex)
Send DMs Partner only (Messages API, 1st-degree connections) Yes, from your own account, inside your daily limit
Reply to comments You can post a comment; reading your post's comments needs a restricted permission Yes: read comments, reply, react
Comment-to-DM automations Not possible without comment reads Yes, keyword or every comment
Enrichment Signed-in member's own name, headline, photo and email; other profiles through partner programs People and companies, on demand
Scheduled posts Not in Share on LinkedIn; posts publish when you call it Up to 90 days ahead, with a pre-built automation
MCP for AI agents No official MCP for personal profiles Pro+ (31 tools) and Apex (all 51 tools)
Rate limits Per app and per member per day, mostly unpublished 250 an hour, 6,000 a day, 100 a minute burst
Setup App, Page verification, and a review for partner products One API key from Settings

Why teams use LeadShark

  • 3M comments captured
  • 27K+ automations created
  • 10M+ real LinkedIn actions
  • Under 10 minutes on average from comment to reply
  • Live since Sept 2024

Want the full picture of how comment-to-DM works? Read turning LinkedIn post comments into automated DMs and leads, see how agencies run it for clients in LinkedIn comment to DM for agencies, or compare options in the best LinkedIn DM automation tools. For sending volume, see LinkedIn DM limit per day.

FAQ

Is the LinkedIn API free?

The open products (Sign In with LinkedIn and Share on LinkedIn) are self-serve: you add them to your app in the Developer Portal without an application. Partner programs need LinkedIn's approval and run under their own agreement with LinkedIn. The LeadShark API is included in every paid plan, starting with Pro at $39/month, with a 7-day free trial and no card.

Can I send LinkedIn messages through the API?

Not with a standard developer app. LinkedIn's Messages API is restricted to approved partners. With LeadShark, yes: you send DMs from your own account, inside a daily limit you set from 0 to 250 (150 recommended max).

Do I need a Company Page?

For the official API, every app is tied to a LinkedIn Page, and partner programs require the Page's super admin to verify your app. For LeadShark, no: you connect your own LinkedIn account and generate an API key.

What are the LinkedIn API rate limits?

LinkedIn limits calls per application and per member over 24 hours, resetting at midnight UTC, and returns a 429 when you go over. Most limits aren't published; your app's Analytics tab shows them. The LeadShark API allows 250 requests an hour, 6,000 a day and 100 a minute burst.

Can an AI agent use the LinkedIn API?

Yes, through LeadShark's MCP server. Pro+ connects Claude, ChatGPT or Cursor with 31 tools, and Apex gives the full agent all 51 tools, inside the same limits as your automations.

Can I automate comment-to-DM with the official LinkedIn API?

No. Reading the comments on your posts needs r_member_social, which LinkedIn restricts and isn't opening to new requests, and DMs need the partner-only Messages API. The LeadShark API does both from your own account: create an automation on a post and every comment that matches your keyword gets processed. Leave the keyword empty and no comment goes unanswered.


Automate your LinkedIn from code today. One API key, comment-to-DM automations, replies and scheduled posts on every paid plan. Start your 7-day free trial, no card.

Ruz, Founder LeadShark

Written by

Ruz

Founder LeadShark

Put your lead magnets on autopilot

Reply to every commenter and deliver your resource in DMs, automatically. 7-day free trial, no card.

Start automating for free