Network API

LinkedIn API for Posting, Scheduling, and Analytics

Ayrshare's LinkedIn API lets developers publish text, images, video, and documents to LinkedIn company pages and personal profiles via a single REST endpoint. It supports scheduled posts, audience targeting, mentions, visibility controls, comments, and analytics across 14+ social networks through one integration.

Your users link their own LinkedIn company page or personal profile through an OAuth flow inside your product, on Ayrshare's approved LinkedIn app. You don't need to apply for LinkedIn's Community Management API.

A scheduled LinkedIn company page post with a 24-page PDF report, published to the Northwind Labs page, beside an impressions chart showing 41.2K, audience targeting chips, and a resolved @ayrshare company mention

One integration, 14+ networks, 30M+ API calls a day.

X
Facebook
Instagram
TikTok
Bluesky
YouTube
LinkedIn
Pinterest
Telegram
Reddit
Threads
Snapchat
Google Business
WhatsApp

50+

LinkedIn metrics

30M+

API calls per day

14+

Social media networks

AI-Native

Native MCP server for any AI agent

50+

LinkedIn metrics

30M+

API calls per day

14+

Social media networks

AI-Native

Native MCP server for any AI agent

Before you build

What Do You Need to Know About the LinkedIn API?

You need one API key and a user who links their LinkedIn page or profile. Ayrshare holds the approved LinkedIn app, so there is no application to file, no company vetting, and no review call before your first post. After that, Ayrshare keeps the integration running: monthly LinkedIn API versions, new post types as LinkedIn adds them, and link renewals before they expire.

Access

Your users link a company page or personal profile on Ayrshare's approved LinkedIn app. You skip the Community Management API application, the legal organization vetting, and the Standard tier review.

Ongoing maintenance

LinkedIn releases a new API version every month. Ayrshare keeps your integration current and adds new LinkedIn features, like document posts and audience targeting, so you don't have to.

Account types

Personal profiles and company pages. Linking a company page needs the Super Admin or Content Admin role.

Link renewal reminders

A LinkedIn link lasts 365 days. Ayrshare emails your user and fires a webhook 15 days before it expires, so re-linking is a button, not an outage.

Linking a LinkedIn company page or personal profile through Ayrshare's OAuth connect screen, next to the steps of going direct: the Community Management API form, legal organization vetting, a Standard tier screen recording, and a 500 calls a day development limit

Post and Schedule to LinkedIn in Your Language

Each sample publishes an image post with a link now, then schedules a video for later. Same endpoint, same JSON, in Node.js, Python, PHP, Java, Go, Ruby, C#, or plain cURL. Add a Profile-Key header to post for one of your users.

# 1. Publish now: an image post with a link and alt textcurl -X POST https://api.ayrshare.com/api/post \  -H "Authorization: Bearer $AYRSHARE_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "post": "We rebuilt our onboarding around one question. https://example.com/blog/onboarding #productdesign",    "platforms": ["linkedin"],    "mediaUrls": ["https://example.com/onboarding.jpg"],    "linkedInOptions": {      "altText": ["Screenshot of the new onboarding screen"]    }  }'
# 2. Schedule for later (ISO 8601, UTC)curl -X POST https://api.ayrshare.com/api/post \  -H "Authorization: Bearer $AYRSHARE_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "post": "Two minutes on how our API handles retries.",    "platforms": ["linkedin"],    "mediaUrls": ["https://example.com/retries.mp4"],    "linkedInOptions": {      "thumbNail": "https://example.com/retries-cover.jpg"    },    "scheduleDate": "2026-11-06T17:00:00Z"  }'
The fine print

LinkedIn API Limits: Post Types, Media, and Characters

LinkedIn's rules in one place. The full list lives in the LinkedIn media guidelines and the LinkedIn publishing options.

Post types

5post types

Text, links with automatic previews, single or multi-image posts, video, and documents. Media can go out with no post text.

Accounts

2account types

Company pages and personal profiles. Only Admins and Direct Sponsored Content users can publish video to a company page.

Images

5 MBper image

JPG, PNG, GIF, or animated GIF, up to 9 per post. LinkedIn recommends 1200 x 627 px.

Video

500 MBper video

MP4 from 3 seconds to 30 minutes, with an aspect ratio between 1:2.4 and 2.4:1. Thumbnails are PNG or JPG, match the video's dimensions, and stay under 10 MB.

Characters

3,000characters per post

400 for a document title and 1,250 for a comment. Per-image alt text and titles ride along in linkedInOptions.

Documents

100 MBup to 300 pages

PDF, PPT, PPTX, DOC, or DOCX. Signed URLs with a query string after the extension work.

Mentions and targeting

300followers to target

Mention a company page with @handle, or a member with @vanity_name or @[Full Name]. Target company page posts by country, seniority, industry, job function, or company size when the audience has at least 300 followers.

Scheduling and limits

150posts per day per account

Pass a scheduleDate to publish later. A LinkedIn link lasts 365 days, with a reminder 15 days before it expires.

Beyond the basic post

Post a PDF or slide deck as a document

Put the document URL in mediaUrls and give it a title in linkedInOptions. Without a title, LinkedIn uses the file name. Documents don't take alt text.

Skip the setup

Why Use Ayrshare Instead of the LinkedIn API Directly?

Ayrshare holds the approved LinkedIn app, so your product sends one request and gets back the LinkedIn share ID and URL. Ayrshare uploads images, video, and documents, resolves @mentions, applies targeting and visibility, and handles LinkedIn's monthly API versions.

For a step-by-step walkthrough, read How to Post to LinkedIn with an API.

See the LinkedIn Publishing Options
  1. Step 1

    One simple endpoint

    Send one POST request with your post, media URL, and the user's Profile-Key. We keep the LinkedIn app approved and keep up with LinkedIn's monthly API versions.

  2. Step 2

    We deal with LinkedIn

    OAuth tokens, media and document upload, @mention lookup, targeting, and visibility. All data is encrypted at rest and in transit.

  3. Live

    Analytics on every post

    Get the LinkedIn post URL right away. The same ID returns 50+ LinkedIn metrics, from impressions and reactions by type to engagement rate and video views, in the same JSON format as every other network.

After you publish

Beyond Posting: The Rest of the LinkedIn Lifecycle

The same LinkedIn connection that publishes also reads analytics, handles comments, pulls history, and validates posts before they go out.

LinkedIn post analytics (impressions, reactions, shares, engagement rate) beside a comment thread with a reply sent through the API, a pre-publish check about the 300-follower targeting minimum, and history that includes posts made outside Ayrshare

Analytics

50+ metrics for company pages and personal profiles: impressions, unique reach, reactions by type, comments, shares, engagement rate, video views, followers, and page views. Counts settle within 24 to 48 hours.

Analytics API

Comments

Read comments and replies, post a comment with an image, reply, delete, and @mention companies or members in the reply.

Engagement API

History

Fetch a page's or profile's past posts with metrics, including posts published outside Ayrshare.

History API

Pre-publish checks

Send the same JSON to /validate/post first and get back any issues without anything reaching LinkedIn.

Validate docs

Mention lookup

Look up a company page or member by name to get the exact handle for an @mention, so every mention links to the right profile.

LinkedIn Search docs

See every network you can reach with the same integration on the supported networks page.

Common questions

FAQs About the LinkedIn API

Yes, you can post to LinkedIn through an API. Ayrshare's LinkedIn API lets developers publish text, images, video, and documents to LinkedIn company pages and personal profiles via a single REST endpoint. It supports scheduled posts, audience targeting, mentions, visibility controls, comments, and analytics across 14+ social networks through one integration. Start with the LinkedIn publishing options.

The LinkedIn API is free for now: LinkedIn's API terms say the APIs are currently provided free, though LinkedIn can charge later. The real cost is access, since company page posting means applying for the Community Management API and passing two reviews. Ayrshare's plans include company page and profile posting on Ayrshare's approved app. Compare Ayrshare plans.

You get LinkedIn API access in the LinkedIn Developer Portal. Share on LinkedIn, for posting to a member's own feed, is self-serve. Company page posting needs an access request for the Community Management API, a verified business email, and a Page super admin's approval, then a Standard tier review. With Ayrshare, your users link through Ayrshare's approved app instead. See the Post API reference.

LinkedIn company page posting needs the w_organization_social permission from the Community Management API, plus the Super Admin or Content Admin role on the page being linked. LinkedIn only approves registered legal organizations for commercial use. With Ayrshare, the permission is already in place, so your users only need the page role. Read the LinkedIn docs.

Yes, you can post a PDF or slide deck to LinkedIn with an API. Put a PDF, PPT, PPTX, DOC, or DOCX URL in mediaUrls and set a title in linkedInOptions. Files can be up to 100 MB and 300 pages, and signed URLs work. The tutorial How to Post to LinkedIn with an API walks through a first post.

Yes, you get LinkedIn analytics and comments through the same API, for both company pages and personal profiles. Post analytics include impressions, reactions by type, comments, shares, engagement rate, and video views, and account analytics add followers and page views. Comments can be read, posted, replied to, and deleted. See the Analytics API.

Your Users Are on LinkedIn. Your Product Can Be Too.

Get an API key, publish your first LinkedIn post, and turn on the other networks with the same call when you need them.