LINKEDIN POSTS API

Create and engage with LinkedIn posts via REST API

Publish posts with media, scrape public posts, react, comment, repost and pull engagement data — ten endpoints covering everything developers need to build content tools, schedulers and engagement automation on LinkedIn.

LinkedIn Posts API endpoints

Ten endpoints covering post publishing, scraping, reactions, comments, reposts and media uploads.

POST/posts/create

Create Post

Publish a LinkedIn post with text, images, video, documents or article URLs on behalf of a connected account.

View API docs →
POST/posts/scrape

Scrape Post

Pull the full payload of any public LinkedIn post — author, text, media, hashtags and engagement counts.

View API docs →
POST/posts/latest

Get Latest Posts

List the most recent posts published by a given profile or company page with engagement metrics.

View API docs →
POST/posts/comment

Comment on Post

Leave a comment on any LinkedIn post the connected account can access — supports plain text plus real @mention tags that notify the member, including tagging the post author via a {{author}} placeholder.

View API docs →
POST/reply

Reply to Comment

Thread a reply under an existing comment, optionally tagging the original commenter with a real @mention — useful for comment-to-DM automations and engagement bots.

View API docs →
POST/posts/react

React to Post

Send a reaction (Like, Celebrate, Support, Love, Insightful, Curious) to any LinkedIn post.

View API docs →
POST/posts/repost

Repost

Reshare a LinkedIn post with optional commentary from the connected account — amplify content programmatically.

View API docs →
POST/posts/comments

Get Post Comments

Fetch paginated comments for a post — useful for monitoring engagement and building comment-level automations.

View API docs →
POST/posts/reactions

Get Post Reactions

Break down every reaction on a post by type (Like, Celebrate, etc.) and the user who sent it.

View API docs →
POST/posts/upload/init

Upload Media (Init)

Start a multi-part upload for images, videos or documents before creating a media-rich post.

View API docs →

Publish a LinkedIn post in one API call

Text, media or article — the API returns the new post URN instantly. SDKs for Node.js and Python.

curl -X POST https://api.connectsafely.ai/posts/create \
  -H "Authorization: Bearer $CONNECTSAFELY_API_KEY" \
  -H "X-Account-Id: $ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Just shipped the new LinkedIn Posts API",
    "visibility": "PUBLIC"
  }'

What developers build with the Posts API

Content schedulers, engagement automation, comment-to-DM funnels and analytics dashboards.

Content scheduling & publishing

Publish LinkedIn posts on a schedule with full image, video and document support — no browser automation required.

Engagement automation

Auto-react or comment on target posts to warm up accounts before outreach. Track engagement metrics programmatically.

Comment-to-DM funnels

Monitor post comments for trigger keywords, then auto-reply or send a DM — a complete comment-to-DM pipeline via API.

LinkedIn Posts API — frequently asked questions

Can I publish LinkedIn posts programmatically?
Yes. The Posts API lets you create text, image, video and document posts on behalf of connected LinkedIn accounts. The API returns the new post URN immediately so you can track engagement or build scheduling workflows.
What engagement data can I pull from LinkedIn posts?
You can fetch comments (paginated with author metadata), reactions broken down by type (Like, Celebrate, Insightful, etc.) and per-user attribution, plus impression and engagement counts via the scrape endpoint. This is the same data visible in LinkedIn's native post analytics.
Does the API support media uploads?
Yes. Use the Upload Media (Init) endpoint to start a multi-part upload for images, videos or PDF documents. Once the upload completes, reference the media URN in your Create Post call to publish a media-rich LinkedIn post.

Start publishing LinkedIn posts via API

Get an API key in under two minutes. Pay only for what you publish.