# LinkedIn Posts Scraper — Company Posts, Post Details & Comments (`innolabs/linkedin-posts-scraper`) Actor

LinkedIn posts scraper and API: recent company posts and any public post URL with text, reactions, comments count, media, hashtags, author and comments. No login, no cookies.

- **URL**: https://apify.com/innolabs/linkedin-posts-scraper.md
- **Developed by:** [Tristan Leroux](https://apify.com/innolabs) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 11 total users, 6 monthly users, 99.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LinkedIn Posts Scraper — Company Posts, Post Details & Comments

Scrape LinkedIn posts from any company page and from any public post link. Every post comes with full text, exact publish date, reactions, comment count, hashtags, mentions, images, video (with thumbnail and length), shared article links, the author (name, profile or page link, headline or follower count) and full repost details. Turn on comments to also get each post's visible comments with author, text, reactions and date. No LinkedIn account, no cookies and no login. Export as JSON, CSV or Excel, or pull results through the Apify API.

### What does LinkedIn Posts Scraper do?

LinkedIn Posts Scraper reads LinkedIn's public pages, the same ones anyone can open without signing in, and turns every post into one clean record.

Two ways to choose what to scrape, combinable in one run:

- **Company pages**: paste `https://www.linkedin.com/company/microsoft/` or just `microsoft`. You get the page's most recent posts and reposts, newest first (up to about 70 per company). Showcase and school pages work too.
- **Post URLs**: paste links like `https://www.linkedin.com/posts/...` or `https://www.linkedin.com/feed/update/urn:li:activity:.../`, from companies or from people. Each returns that post's full details.

With **Include comments** on, the comments shown on each post's public page are saved as separate records, linked to their post.

What you get for every post:

- Text with line breaks, hashtags and mentioned people and companies
- Exact publish date (ISO 8601) plus LinkedIn's relative label ("2d", "1w")
- Reactions and comments count as numbers
- Images, video (file, thumbnail, length) and shared article (title, domain, link, image)
- Author: name, profile or page link, type (person or company), headline or follower count, picture
- Reposts: who reposted, and the original post (author, text, date, link)

A post found twice (for example on a company page and as a post URL) is saved and charged **once**.

### Use cases

- **Competitor and brand monitoring**: track what competitors post, how often, and which posts get the most reactions and comments.
- **Lead generation and sales signals**: catch product launches, funding news, hiring pushes and events on target accounts, and see who comments on them.
- **Content research**: find which formats (video, image, article) and topics perform best in your industry before you plan your own posts.
- **Social listening and PR**: collect reactions and comments on announcements to measure sentiment.
- **Executive and influencer tracking**: save individual posts of founders and thought leaders by URL, with their comments.
- **AI and analytics pipelines**: feed clean post text, dates and engagement numbers into dashboards, classifiers or RAG systems.

### How much does it cost?

You pay only for records saved to your dataset (pay-per-event). Prices in USD per 1,000 events:

| Event | What you pay for | Free plan | Paid plans (from) |
| --- | --- | --- | --- |
| `post` | One LinkedIn post saved, with text, engagement, media, author and repost details | $0.90 per 1,000 | $0.45 per 1,000 (Gold+) |
| `comment` | One comment saved (only with **Include comments** on) | $1.39 per 1,000 | $1.08 per 1,000 (Gold+) |

Bronze pays $0.75 per 1,000 posts and $1.29 per 1,000 comments, Silver $0.60 and $1.18. Duplicates, records above your **Max items** limit and posts that fail to load are never charged. Apify adds a tiny actor-start fee per run.

Examples:

- The latest 20 posts of 10 competitors (200 posts) on the Free plan cost **$0.18**; on Gold **$0.09**.
- 50 posts with 10 comments each (50 posts + 500 comments) cost **$0.74** on the Free plan and **$0.56** on Gold.

Apify Free plan includes $5 monthly credit — about 5,500 posts every month at no cost.

### How to use LinkedIn Posts Scraper

1. Open the actor in Apify Console and click **Try for free**.
2. Enter one or more **Company pages** (prefilled with Microsoft and OpenAI) and/or **Post URLs**.
3. Optionally turn on **Include comments** and set **Max comments per post**.
4. Set **Max posts per company** and **Max items**, then click **Start**. Records appear in the dataset as they are found.
5. Download the results as JSON, CSV or Excel, or call the actor through the API (see below).

### Input

| Field | Type | Description |
| --- | --- | --- |
| `companyUrls` | array of strings | Company, showcase or school pages (URL or the name from the URL, e.g. `microsoft`). |
| `postUrls` | array of strings | Public post links (`/posts/...`, `/feed/update/urn:li:activity:.../`) or activity IDs. |
| `includeComments` | boolean | Also save each post's visible comments (default off). |
| `maxCommentsPerPost` | integer | Cap on comments per post (default 10). |
| `maxPostsPerCompany` | integer | Cap on posts per company page, newest first (default 20). |
| `maxItems` | integer | Max records (posts + comments) saved and paid for in the run. |
| `proxyConfiguration` | object | Apify Proxy settings; the default works. |

Company posts:

```json
{
  "companyUrls": ["https://www.linkedin.com/company/microsoft/", "openai", "nvidia"],
  "maxPostsPerCompany": 30,
  "maxItems": 500
}
```

Posts by URL with comments:

```json
{
  "postUrls": [
    "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj",
    "https://www.linkedin.com/feed/update/urn:li:activity:7522052539681415168/"
  ],
  "includeComments": true,
  "maxCommentsPerPost": 10
}
```

### Output

Each record has `type`: `post` or `comment`. A post from a real run (text shortened):

```json
{
  "type": "post",
  "postUrl": "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj",
  "activityUrn": "urn:li:activity:7525982926698872832",
  "postId": "7525982926698872832",
  "shareUrn": "urn:li:ugcPost:7525982768774889472",
  "author": {
    "name": "OpenAI",
    "url": "https://www.linkedin.com/company/openai",
    "type": "company",
    "headline": null,
    "followers": 12186636,
    "image": "https://media.licdn.com/dms/image/v2/D560BAQHpzXbqSyR74A/company-logo_100_100/..."
  },
  "text": "Now in beta: Businesses in ChatGPT.\n\nClaim your business, manage your information, and get insights on how people engage with you.…",
  "hashtags": [],
  "mentions": [],
  "postedAt": "2026-11-10T18:09:15.725Z",
  "postedAtText": "1d",
  "edited": false,
  "reactions": 1714,
  "comments": 158,
  "reposts": null,
  "media": {
    "type": "video",
    "images": [],
    "video": {
      "url": "https://dms.licdn.com/playlist/vid/v2/D4E05AQH_glTNyhqWhQ/mp4-720p-30fp-crf28/...",
      "thumbnail": "https://media.licdn.com/dms/image/v2/D4E05AQH_glTNyhqWhQ/videocover-high/...",
      "duration": 48
    },
    "article": null
  },
  "isRepost": false,
  "repostedBy": null,
  "originalPost": null,
  "sourceCompanyUrl": null,
  "sourceCompanyName": null,
  "source": "post",
  "sourceInput": "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj",
  "scrapedAt": "2026-11-12T09:23:09Z"
}
```

A comment:

```json
{
  "type": "comment",
  "postUrl": "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj",
  "postActivityUrn": "urn:li:activity:7525982926698872832",
  "commentId": "7526388011786244097",
  "commentUrn": "urn:li:comment:(urn:li:ugcPost:7525982768774889472,7526388011786244097)",
  "author": {
    "name": "Andries Ohneisser",
    "headline": null,
    "url": "https://uk.linkedin.com/in/andries-ohneisser",
    "type": "person",
    "image": "https://media.licdn.com/dms/image/v2/D5603AQHFXSdRpSKjbA/profile-displayphoto-shrink_400_400/..."
  },
  "text": "id want the product photos in there too, not just the prices",
  "reactions": 1,
  "postedAt": "2026-11-11T20:58:55.538Z",
  "postedAtText": "12h",
  "position": 2,
  "sourceInput": "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj",
  "scrapedAt": "2026-11-12T09:23:09Z"
}
```

Field notes:

- `postId` / `activityUrn` identify the post and stay the same across runs, so you can skip posts you already have.
- `postedAt` is the exact publish time in UTC; `postedAtText` is LinkedIn's relative label; `edited` is true when LinkedIn marks the post as edited.
- `author.followers` is filled for company pages, and for people when the post was opened (post URLs, or company posts with comments). `author.headline` is the person's headline when LinkedIn shows it.
- `isRepost` is true for reposts. `repostedBy` is the page that reposted it; `author` and the content are the original post's. For reposts with their own commentary, `text` is the commentary and `originalPost` holds the reposted post's author, text, date, media and link.
- `media.type` is `video`, `image`, `article` or `null` (text only). `video.duration` is in seconds and is filled when the post is opened.
- `sourceCompanyUrl` / `sourceCompanyName` tell you which company page a post came from; `source` is `company` or `post`.
- Comments: `position` is the order on the post page; `postUrl` links the comment to its post.

### Integrations and API

Run the actor and get the records back with one HTTP call:

```bash
curl -X POST "https://api.apify.com/v2/acts/innolabs~linkedin-posts-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"companyUrls": ["microsoft", "openai"], "maxPostsPerCompany": 10}'
```

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("innolabs/linkedin-posts-scraper").call(
    run_input={"companyUrls": ["nvidia"], "maxPostsPerCompany": 30, "includeComments": True}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["type"] == "post":
        print(item["postedAt"], item["reactions"], item["comments"], item["postUrl"])
```

- **Make, Zapier, n8n**: start the actor and send new posts to Google Sheets, Airtable, HubSpot or Slack.
- **Scheduling**: run daily or weekly on your competitor list to follow their posting activity.
- **Webhooks**: trigger your pipeline when a run finishes.
- **AI agents (MCP)**: Claude, Cursor and other MCP clients can call this actor through the Apify MCP server at https://mcp.apify.com.

### FAQ

#### Do I need a LinkedIn account or cookies?

No. The scraper reads LinkedIn's public pages, the ones anyone can open without signing in. Your LinkedIn account is never used, so it cannot be restricted.

#### How many posts can I get per company?

LinkedIn shows visitors who are not signed in roughly the 70 most recent posts and reposts of a company page. Set **Max posts per company** up to that. Older posts can still be scraped one by one through **Post URLs**.

#### Can I scrape posts of a person's profile?

Not as a feed: LinkedIn shows a person's activity only to signed-in members. Individual posts by people work through **Post URLs**, including their comments.

#### How many comments do I get per post?

The comments LinkedIn shows on the post's public page, usually up to 10 of the most relevant ones per post. Comment counts (`comments`) are always the full number.

#### Are dates exact?

Yes. Every post and comment gets its exact publish time in UTC, not an estimate from "2d ago".

#### Is it legal to scrape LinkedIn posts?

The scraper collects only what LinkedIn shows to anyone without signing in. Names and comments of people are personal data under laws such as GDPR, so make sure you have a legitimate reason to store them and that your use complies with LinkedIn's terms and the law that applies to you.

#### What if a page fails?

Each company and post is processed on its own. When LinkedIn throttles a request, the scraper retries it on a new IP. A company or post that still fails is listed in the run's `SUMMARY` record and is not charged; the run fails only if nothing at all could be saved.

### Limits

- About 70 most recent posts per company page (what LinkedIn shows signed-out visitors); the page order is LinkedIn's.
- Personal profile feeds are not supported (LinkedIn requires sign-in for them); single posts by people work by URL.
- Comments: the ones visible on the post's public page, usually up to 10 per post; replies to comments are not included. LinkedIn does not show commenters' headlines there, so `author.headline` of comments is empty.
- The repost count and the breakdown of reactions by type are not shown on public pages, so `reposts` is `null` and `reactions` is the total.
- Document (PDF carousel) pages and poll options are not extracted.
- Video length and people's follower counts need the post page: they are filled for post URLs and, for company posts, when **Include comments** is on.

# Changelog

This Actor's version history is a separate document: https://apify.com/innolabs/linkedin-posts-scraper/changelog.md

# Actor input Schema

## `companyUrls` (type: `array`):

LinkedIn company, showcase or school pages, e.g. https://www.linkedin.com/company/microsoft/, or just the name from the URL ('microsoft'). Returns each page's most recent posts and reposts (up to about 70).

## `postUrls` (type: `array`):

Public LinkedIn post links from companies or people, e.g. https://www.linkedin.com/posts/... or https://www.linkedin.com/feed/update/urn:li:activity:7525982926698872832/. Activity IDs work too.

## `includeComments` (type: `boolean`):

Also save the comments LinkedIn shows on each post's public page (author, text, reactions, date). Each comment is a separate record of type 'comment'. For company pages this opens every post, so it takes longer.

## `maxCommentsPerPost` (type: `integer`):

Cap on comments saved per post. LinkedIn shows up to about 10 top comments per post to visitors who are not signed in.

## `maxPostsPerCompany` (type: `integer`):

Cap on posts saved per company page, newest first. LinkedIn shows about 70 recent posts per company to visitors who are not signed in.

## `maxItems` (type: `integer`):

Hard cap on records (posts + comments) saved and paid for in this run. The run stops cleanly when reached.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. The default works for LinkedIn's public pages; throttled requests are retried on new proxy IPs.

## `debug` (type: `boolean`):

Log details of every company feed and unexpected page.

## Actor input object example

```json
{
  "companyUrls": [
    "https://www.linkedin.com/company/microsoft/",
    "https://www.linkedin.com/company/openai/"
  ],
  "postUrls": [
    "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj"
  ],
  "includeComments": false,
  "maxCommentsPerPost": 10,
  "maxPostsPerCompany": 20,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All posts and comments saved by the run, one JSON object per record (field 'type' is 'post' or 'comment').

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "companyUrls": [
        "https://www.linkedin.com/company/microsoft/",
        "https://www.linkedin.com/company/openai/"
    ],
    "postUrls": [
        "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("innolabs/linkedin-posts-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "companyUrls": [
        "https://www.linkedin.com/company/microsoft/",
        "https://www.linkedin.com/company/openai/",
    ],
    "postUrls": ["https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj"],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("innolabs/linkedin-posts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "companyUrls": [
    "https://www.linkedin.com/company/microsoft/",
    "https://www.linkedin.com/company/openai/"
  ],
  "postUrls": [
    "https://www.linkedin.com/posts/openai_your-business-in-chatgpt-activity-7525982926698872832-0Coj"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call innolabs/linkedin-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,innolabs/linkedin-posts-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vPEk5Tox65f5EfhyX/builds/4wyTuQwpt0urdI022/openapi.json
