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 USERS6
MONTHLY ACTIVE4
TOTAL RUNS117
RUNS SUCCEEDED100.0%
RATINGno ratings yet

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"
  ]
}

Tasks

Saved runs with the inputs already filled in — each one a standalone page and a working configuration example.

Request a task →

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)