LinkedIn Posts Scraper avatar

LinkedIn Posts Scraper

Pricing

from $6.00 / 1,000 linkedin post scrapeds

Go to Apify Store
LinkedIn Posts Scraper

LinkedIn Posts Scraper

Scrape public LinkedIn posts from keyword searches, company feeds, and exact post URLs. Returns post text, author, engagement, media, comments preview, provider provenance, and run summaries. Charged $0.006 per post. MCP/API-ready.

Pricing

from $6.00 / 1,000 linkedin post scrapeds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

8

Bookmarked

40

Total users

14

Monthly active users

6 days ago

Last modified

Share

LinkedIn Posts Scraper collects public LinkedIn posts from keyword searches, public company feeds, and exact post URLs. It is designed for readers who need one record per post, with fields such as post text, author details, engagement counts, media URLs, comments preview, provider provenance, and scrape metadata. The result is a dataset of structured public post records plus a machine-readable run summary in key-value store output.

This Actor is available through Apify and usable through Apify MCP. It accepts public LinkedIn source inputs and returns one dataset row per scraped post, which makes each record a single post-level observation from the chosen source. Typical output fields include postUrl, postId, publishedAt, text, authorName, authorUrl, companyName, reactionCount, commentCount, shareCount, engagementCount, mediaUrl, and provider.

Best fit and connected workflows

This Actor fits workflows that start from public LinkedIn discovery and end with structured records for analysis or downstream automation. It routes naturally into:

  • keyword-based social listening for public post discovery
  • company page monitoring for recent public company posts
  • exact URL enrichment for a known public LinkedIn post, feed update, or article
  • agent pipelines that need a compact post record with provenance
  • B2B research and lead qualification flows built on public post activity

If your workflow begins with a search phrase, a company page URL, or a post URL, this Actor turns that input into consistent post rows that can be filtered, reviewed, or passed to another step.

Focused standalone workflow

This Actor is designed as a focused standalone workflow.

Practical scenario

A sales analyst wants to review public posts about "AI agents" from the last month. She enters one search query, sets a post cap, and enables enrichment for fuller post detail. The returned rows include authorName, postUrl, text, reactionCount, commentCount, shareCount, and provider. She uses those fields to shortlist posts for manual review, then opens the source post URLs to assess messaging trends and outreach relevance.

Input

Provide at least one source: search query, company URL, or exact post URL.

FieldTypePurpose
searchQueriesarray of stringsKeywords or phrases to search in public LinkedIn posts.
companyUrlsarray of stringsPublic LinkedIn company page URLs whose recent posts should be scraped.
postUrlsarray of stringsExact public LinkedIn post, feed update, or article URLs to fetch.
maxPostsintegerMaximum number of post records to save across all sources.
datePostedstringFreshness filter for keyword search results.
maxSearchPagesintegerMaximum search pages for keyword pagination.
maxPagesPerCompanyintegerMaximum pages to fetch per company URL.
startCursorstringCursor for continuing a keyword search run.
providerOrderstringProvider order for company feeds and post-detail enrichment.
enrichPostDetailsbooleanFetch post detail when supported by the provider.
includeCommentsbooleanInclude up to five public comments from post detail payloads.
outputModestringfull or compact output shape.
includeRawDatabooleanAttach raw provider payloads to each dataset item.

Focused JSON example:

{
"searchQueries": ["ai agents", "sales automation"],
"datePosted": "last-month",
"maxPosts": 25,
"maxSearchPages": 3,
"enrichPostDetails": true,
"includeComments": false,
"outputMode": "compact"
}

Output

Each dataset item represents one public LinkedIn post row.

FieldTypePurpose
sourceTypestringDiscovery method: search, company, or postUrl.
sourceInputstringSearch query, company URL, or exact post URL that produced the row.
postUrlstring or nullPublic LinkedIn URL for the post, feed update, or article.
postIdstring or nullLinkedIn activity, share, article, or provider identifier.
publishedAtstring or nullProvider-returned publication date or timestamp.
textstring or nullVisible post body, article text, or provider description.
authorNamestring or nullPublic name of the post author.
authorUrlstring or nullPublic LinkedIn profile or page URL for the author.
companyNamestring or nullCompany name for company-sourced or enriched rows.
reactionCountinteger or nullTotal reaction count when available.
commentCountinteger or nullPublic comment count when available.
shareCountinteger or nullShare or repost count when available.
engagementCountinteger or nullConvenience total of available engagement counts.
mediaUrlstring or nullPrimary media or image URL when available.
providerstringManaged provider or provider chain used for the row.
scrapedAtstringISO timestamp when the Actor saved the row.

Illustrative JSON record:

{
"sourceType": "search",
"sourceInput": "ai agents",
"postUrl": "https://www.linkedin.com/posts/example_activity-7354600338621906944",
"postId": "7354600338621906944",
"publishedAt": "2025-01-12T10:15:00Z",
"text": "Public post text",
"authorName": "Example Author",
"authorUrl": "https://www.linkedin.com/in/example-author/",
"companyName": "Example Company",
"reactionCount": 42,
"commentCount": 5,
"shareCount": 3,
"engagementCount": 50,
"mediaUrl": "https://example.com/image.jpg",
"provider": "scrapecreators",
"scrapedAt": "2025-01-12T10:16:02Z"
}

The default output also includes a machine-readable run summary in the key-value store, with counters such as records saved, provider attempts, retries, status codes, billing counters, dedupe counts, stop reason, and provider usage.

How it works

This Actor uses managed provider-backed collection for public LinkedIn posts. Search mode uses Google-indexed public LinkedIn results via ScrapeCreators. Company feeds and exact post URLs are handled through the configured provider order, with scrapecreators-first as the default. When post enrichment is enabled, the Actor can fetch fuller text, engagement counts, media, and comments preview when the provider exposes them. Raw provider payloads are available only when includeRawData is enabled.

Pricing

This Actor uses Pay per event pricing plus Apify platform usage.

  • Each public LinkedIn post saved to the dataset is billed as one LinkedIn post scraped event.
  • Actor start is billed as a separate one-time event based on the Actor's memory allocation.
  • Apify platform usage, including compute and storage, is applied separately according to the live Pricing tab.

For example, a run that saves one hundred posts is billed for one hundred post-scraped events, plus the Actor start event, plus the standard Apify platform usage shown in the live Pricing tab.

Use with AI agents (MCP)

This Actor is available through Apify MCP as a tool for retrieving structured public LinkedIn post records. The exact Actor identity is khadinakbar/linkedin-posts-scraper.

Find recent public LinkedIn posts about AI agents, return the post text, author name, engagement counts, source URL, and provider for each row, and keep the result compact for downstream agent processing.

The output is suitable interpreted as post-level records. sourceType and sourceInput explain how each row was discovered, provider shows the managed provider or chain that supplied it, and scrapedAt marks when the Actor saved the row. postUrl and postId identify the public post, while counts such as reactionCount, commentCount, shareCount, and engagementCount support ranking or filtering.

For agent workflows, compact output keeps the record smaller, while full output includes richer post fields when available. includeComments adds up to five public comments inside the post-detail payload. Search mode uses provider pagination through maxSearchPages, and company mode uses maxPagesPerCompany. Billing follows the saved post count, so maxPosts is a practical cap for agent calls and test runs.

Example using the Apify API

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
const run = await client.actor('khadinakbar/linkedin-posts-scraper').call({
searchQueries: ['ai agents'],
datePosted: 'last-month',
maxPosts: 10,
outputMode: 'compact',
});
const datasetId = run.defaultDatasetId;
const { items } = await client.dataset(datasetId).listItems();
console.log(items);

Set APIFY_TOKEN in your environment before running the script. The dataset readback returns the saved post rows from the default dataset.

Best results and outcome guidance

Use one source family at a time when the workflow starts with a narrow goal: keyword search for topic discovery, company URLs for page monitoring, and exact post URLs for single-post enrichment. Lower maxPosts for quick agent calls, then raise it when you want a broader sample. If you need richer post records, keep enrichPostDetails enabled and use outputMode: "full". If you are testing cursor behavior, adjust startCursor and maxSearchPages together for search runs.

Design note

I found that the dataset contract marks sourceType, sourceInput, provider, and scrapedAt as required, which makes each record traceable even when many other fields are optional or provider-dependent.

FAQ

Can this Actor start from a keyword search and a company URL in the same run?

Yes. The input schema accepts searchQueries, companyUrls, and postUrls together, and the Actor combines the selected sources into one output set.

What does sourceType tell me?

It tells you how the post was discovered: search, company, or postUrl.

Which fields are useful for routing a post to downstream analysis?

postUrl, postId, authorName, companyName, publishedAt, reactionCount, commentCount, shareCount, and engagementCount are the most common routing fields.

When should I use compact output?

Use compact when you want a smaller record shape for MCP agents, tables, or simple pipelines.

When should I use full output?

Use full when you want richer post fields such as media lists, author images, and additional company context where the provider exposes them.

Use startCursor with a previous ScrapeCreators search cursor and keep maxSearchPages aligned with the search depth you want.

Responsible use

This Actor is intended for public LinkedIn post data returned by managed provider APIs. Review LinkedIn's terms, applicable laws, and your own use case before running large-scale collection. Use the output for lawful analysis, monitoring, enrichment, and agent workflows that respect privacy and platform rules.