Use this LinkedIn post scraper to export structured public posts from known post URLs or activity URNs. Receive exactly one normalized row per unique post with stable identity, author attribution, text, timestamps, media, links, and engagement.
Use this Actor for content analysis, campaign reporting, employer-brand monitoring, social-selling research, and content tracking. Enable the optional bounded top-level comments preview when a lightweight sample is enough; use the separate LinkedIn Post Comments Scraper for deep comments, replies, and pagination.
Who is it for?
This Actor is built for marketing analysts, employer-brand teams, sales researchers, content operations teams, and developers who already have public LinkedIn post URLs and need structured records for reporting, monitoring, or integrations.
Example input
{
"postUrls": [
"https://www.linkedin.com/posts/linkedin_no-is-a-complete-sentence-activity-7247998907798978560-J_hB",
"https://www.linkedin.com/posts/williamhgates_africa-decade-long-study-reveals-key-drivers-activity-7283949043293003776--eae"
],
"postUrns": [],
"maxPosts": 2,
"includeMedia": true
}
Example output
{
"postId": "7283949043293003776",
"activityUrn": "urn:li:activity:7283949043293003776",
"postUrl": "https://www.linkedin.com/posts/williamhgates_africa-decade-long-study-reveals-key-drivers-activity-7283949043293003776--eae",
"canonicalUrl": "https://www.linkedin.com/posts/williamhgates_africa-decade-long-study-reveals-key-drivers-activity-7283949043293003776--eae",
"postType": "article",
"text": "Effective public health is about more than just the ‘what’—it’s about the ‘how.’ …",
"textHtml": "Effective public health is about more than just the ‘what’…",
"headline": "Effective public health is about more than just the ‘what’…",
"publishedAt": "2025-01-11T20:53:01.122Z",
"authorName": "Bill Gates",
"authorUrl": "https://www.linkedin.com/in/williamhgates",
"authorType": "Person",
"authorImageUrl": "https://media.licdn.com/dms/image/...",
"authorFollowerCount": 40561994,
"authorHeadline": null,
"images": [{ "url": "https://media.licdn.com/dms/image/...", "type": "image" }],
"videos": [],
"document": null,
"article": { "title": "Africa: Decade-Long Study Reveals Key Drivers of Global Health Success", "url": null, "imageUrl": "https://media.licdn.com/dms/image/..." },
"poll": null,
"outboundLinks": [],
"hashtags": [],
"mentions": [{ "name": "Nadia Akseer", "url": "https://ca.linkedin.com/in/nadia-akseer-b897aa30" }],
"taggedCompanies": [{ "name": "Exemplars in Global Health", "url": "https://www.linkedin.com/company/exemplars-in-global-health" }],
"likeCount": 1706,
"commentCount": 318,
"repostCount": null,
"reactionBreakdown": { "total": 1706 },
"isRepost": false,
"repost": null,
"sourceInput": "https://www.linkedin.com/posts/...",
"commentsPreview": [],
"sourceStatus": "complete",
"collectedAt": "2026-08-10T12:22:56.754Z"
}
What data can you export?
| Field | Description |
|---|---|
postId |
Stable numeric LinkedIn activity ID |
activityUrn |
Normalized urn:li:activity value |
postUrl, canonicalUrl |
Public and canonical post URLs |
postType |
Normalized post or attachment type |
text, textHtml, headline |
Public post content and linked markup |
publishedAt |
Public post publication timestamp |
authorName, authorUrl, authorType |
Person or organization attribution |
authorImageUrl, authorFollowerCount, authorHeadline |
Public author metadata when exposed |
images, videos |
Public media metadata |
document, article, poll |
Structured attachment metadata when present |
outboundLinks |
Deduplicated non-identity links exposed by the post |
hashtags |
Hashtags found in public post text |
mentions, taggedCompanies |
Explicitly linked people and organizations |
likeCount, commentCount, repostCount |
Public engagement totals when exposed |
reactionBreakdown |
Public aggregate/reaction detail when exposed |
isRepost, repost |
Repost state and original-post detail when exposed |
sourceInput |
Original submitted post URL, activity URN, or numeric activity ID |
commentsPreview |
Optional nested top-level public comment sample; never separate dataset rows |
sourceStatus, collectedAt |
Completeness status and collection time |
Optional feature fields are empty or null when a public post does not contain or expose that feature. The Actor does not invent missing values.
Input settings
| Key | Type | Default | Description |
|---|---|---|---|
postUrls |
string[] | one example post | Public LinkedIn post, share, or feed/update URLs |
postUrns |
string[] | [] |
Activity URNs or numeric activity IDs |
maxPosts |
integer | 20 |
Maximum unique post rows across all targets, from 1 to 1000 |
includeMedia |
boolean | true |
Include publicly exposed attachment metadata |
includeCommentsPreview |
boolean | false |
Nest a lightweight top-level public comments preview |
maxPreviewComments |
integer | 5 |
Preview cap per post, from 1 to 10; replies are not paginated |
At least one post URL, activity URN, or numeric activity ID is required. Duplicate activity IDs are processed once.
Input recipes
Refresh a list of known posts
{
"postUrls": ["https://www.linkedin.com/posts/...-activity-7247998907798978560-..."],
"maxPosts": 10,
"includeMedia": true
}
Resolve activity URNs
{
"postUrns": ["urn:li:activity:7247998907798978560", "7283949043293003776"],
"maxPosts": 2
}
Tips and limits
- Use stable activity URLs or URNs rather than copied redirect links when possible.
- Engagement totals are snapshots and can change between runs.
- LinkedIn may remove, restrict, or stop publicly rendering a post. Such inputs are reported as failures rather than fabricated empty rows.
- Only public post details are supported. Login-only, private, deleted, profile-search, comments, and reactor data are outside this Actor's scope.
- A mixed batch preserves valid rows when another supplied post fails.
LinkedIn post API usage
curl -X POST "https://api.apify.com/v2/acts/fetch_cat~linkedin-posts-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"postUrns":["urn:li:activity:7247998907798978560"],"maxPosts":1}'
JavaScript:
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/linkedin-posts-scraper').call({
postUrls: ['https://www.linkedin.com/posts/...-activity-7247998907798978560-...'],
maxPosts: 1,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
Python:
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/linkedin-posts-scraper').call(run_input={
'postUrns': ['urn:li:activity:7247998907798978560'],
'maxPosts': 1,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
Use with AI agents and MCP
Connect through Apify MCP, then ask your agent to extract or refresh details for a list of public LinkedIn post URLs. Keep maxPosts small while testing a workflow.
Support
Open an issue from the Actor page with a public example URL, run ID, expected result, and what was returned. Do not include private cookies, credentials, or non-public content.