LinkedIn Posts Scraper avatar

LinkedIn Posts Scraper

Pricing

from $0.21 / 1,000 post saveds

Go to Apify Store
LinkedIn Posts Scraper

LinkedIn Posts Scraper

Extract public LinkedIn posts from direct post URLs and activity URNs with optional media and nested top-level comment previews.

Pricing

from $0.21 / 1,000 post saveds

Rating

0.0

(0)

Developer

Hanna Nosova

Hanna Nosova

Maintained by Community

Actor stats

0

Bookmarked

7

Total users

3

Monthly active users

24 days ago

Last modified

Share

LinkedIn Posts Scraper for URLs and Activity URNs

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?

FieldDescription
postIdStable numeric LinkedIn activity ID
activityUrnNormalized urn:li:activity value
postUrl, canonicalUrlPublic and canonical post URLs
postTypeNormalized post or attachment type
text, textHtml, headlinePublic post content and linked markup
publishedAtPublic post publication timestamp
authorName, authorUrl, authorTypePerson or organization attribution
authorImageUrl, authorFollowerCount, authorHeadlinePublic author metadata when exposed
images, videosPublic media metadata
document, article, pollStructured attachment metadata when present
outboundLinksDeduplicated non-identity links exposed by the post
hashtagsHashtags found in public post text
mentions, taggedCompaniesExplicitly linked people and organizations
likeCount, commentCount, repostCountPublic engagement totals when exposed
reactionBreakdownPublic aggregate/reaction detail when exposed
isRepost, repostRepost state and original-post detail when exposed
sourceInputOriginal submitted post URL, activity URN, or numeric activity ID
commentsPreviewOptional nested top-level public comment sample; never separate dataset rows
sourceStatus, collectedAtCompleteness 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

KeyTypeDefaultDescription
postUrlsstring[]one example postPublic LinkedIn post, share, or feed/update URLs
postUrnsstring[][]Activity URNs or numeric activity IDs
maxPostsinteger20Maximum unique post rows across all targets, from 1 to 1000
includeMediabooleantrueInclude publicly exposed attachment metadata
includeCommentsPreviewbooleanfalseNest a lightweight top-level public comments preview
maxPreviewCommentsinteger5Preview 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
}

Pricing

This Actor uses pay-per-event pricing. A small start event covers run setup, and a result event is charged only after a post-detail row is saved. See the live Pricing tab for current rates and plan-tier discounts.

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.

FAQ

What data can I export with a LinkedIn post scraper?

You can export 33 normalized fields covering post identity, author attribution, public text, publication time, media and attachment metadata, outbound links, engagement totals, and collection provenance.

Can I run LinkedIn Posts Scraper through an API, schedule, or MCP client?

Yes. Use the LinkedIn post API example above, create a recurring Actor schedule in Apify Console, or connect the Actor through Apify MCP for an AI-agent workflow.

How much does it cost to use LinkedIn Posts Scraper?

Runs charge a small start event plus one result event for each post-detail row saved. Current rates and plan discounts are always shown on the Actor's Pricing tab.

Does it require LinkedIn cookies or an account?

No. It processes details LinkedIn makes publicly visible for the supplied post.

Can it search for posts or scrape a profile or company post history?

No. This Actor resolves known public post URLs and activity URNs. Use a dedicated post-search or profile-post Actor when discovery is required.

Does it return comments or the people who reacted?

It can nest a small optional top-level comments preview in each post row. Deep comments, replies, and reactor records remain separate entity products.

Why is an attachment field null?

The post may not contain that attachment type, or LinkedIn may not expose it publicly. Null does not imply an extraction error when sourceStatus is complete.

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.