WEBCOMPANYAI API MCP READY

LinkedIn Posts API

Collect public LinkedIn posts as clean, structured JSON. Discover every post from a profile URL, or fetch specific post URLs, with text, reactions, comments, shares, media, hashtags, and author details. Pay per post, MCP-ready for Claude and AI agents.

MEDIAN LAGon demand
PARAMETERS5
TOTAL USERS177
MONTHLY ACTIVE107
TOTAL RUNS29,285
SUCCESS (30D)99.7%
RATINGno ratings yet
LAST MODIFIED2026-11-15
PUBLISHED2026-07

Input parameters

PARAMETERTYPEREQDEFAULTDESCRIPTION
profileUrls string[] no — One or more LinkedIn profile URLs, e.g. https://www.linkedin.com/in/williamhgates.
postUrls string[] no — One or more specific LinkedIn post URLs, e.g. https://www.linkedin.com/posts/...-activity-1234567890 or https://www.linkedin.com/feed/update/urn:li:activity:1234567890.
maxPostsPerProfile integer no 20 Maximum number of posts to return for each profile URL (discover mode).
startDate string no — Only discover posts on or after this date (YYYY-MM-DD).
endDate string no — Only discover posts on or before this date (YYYY-MM-DD).

Worked examples

Basic — the required input, with the schema's own example values
{
  "profileUrls": [
    "https://www.linkedin.com/in/williamhgates"
  ],
  "postUrls": [
    "example"
  ]
}

n8n templates

Free n8n workflows that run this source. Import one, add your Apify token, and it runs on a schedule.

N8N Build LinkedIn sales call briefs with OpenAI and Slack ↗ Type a company and get a call brief in Slack, with company facts, current leaders, their LinkedIn posts from the last 90 days, a fit score and two openers that each point to a real post.

All n8n templates →

Code

curl

curl -X POST "https://api.apify.com/v2/acts/johnvc~linkedin-posts-api/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"profileUrls": ["https://www.linkedin.com/in/williamhgates"], "postUrls": ["example"]}'

Python

from apify_client import ApifyClient

client = ApifyClient("APIFY_TOKEN")
run = client.actor("johnvc/linkedin-posts-api").call(
    run_input={'profileUrls': ['https://www.linkedin.com/in/williamhgates'], 'postUrls': ['example']}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

MCP

Apify's hosted MCP server loads this source from the URL below as the tool johnvc--linkedin-posts-api. Sign in to Apify when your client asks (OAuth), or send an Apify token as an Authorization: Bearer header.

https://mcp.apify.com/?tools=johnvc/linkedin-posts-api

Questions people ask

What does the LinkedIn Posts API return for each post?

Each public LinkedIn post comes back as structured JSON with its text, reactions, comments, shares, media, hashtags and author details.

What inputs does the LinkedIn Posts API take?

Pass profileUrls to discover every post from a LinkedIn profile, or postUrls to fetch specific posts. In discover mode, maxPostsPerProfile, 20 by default, caps the posts per profile, and startDate and endDate limit the date range.

How much does the LinkedIn Posts API cost per post?

The default edition is pay per post at $0.00001 for each post scraped, and there is a free tier on Apify.

Can I limit the LinkedIn Posts API to a date range?

Yes. Set startDate to discover only posts on or after a date and endDate for posts on or before one, both in YYYY-MM-DD format. The date filters apply when discovering posts from a profile URL.

Can an AI agent call the LinkedIn Posts API over MCP?

Yes. The LinkedIn Posts API is exposed as an MCP tool on Apify's hosted MCP server for Claude, Cursor and other agents, and it is also available over REST.

⌂ 换网址