# LinkedIn Company Posts Scraper (`datahamster/linkedin-company-posts-scraper`) Actor

LinkedIn company posts scraper: the latest posts of public LinkedIn company pages with text, exact post date, reactions, comments, hashtags and image or video URLs. No login, no cookies. Many companies in one run; monitor mode returns only new posts.

- **URL**: https://apify.com/datahamster/linkedin-company-posts-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.12 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Company Posts Scraper

LinkedIn Company Posts Scraper gives you the recent posts of any public LinkedIn company page, one row per post: the text, the exact date and time it was posted, reactions, comments, hashtags, image and video URLs and the link the post shares. It needs no LinkedIn account, no cookies and no browser.

**Try it:** the prefilled example returns 17 rows in about 10 seconds and costs about $0.024. Results cost $1.40 per 1,000.

- **No login, no cookies.** Each company page is read the way a logged-out visitor sees it, so there is no account to get restricted.
- **Only the company's own posts by default.** Reposts of employees' posts are skipped unless you ask for them.
- **Many companies in one run.** Paste a list of company URLs or slugs and get every company's posts in one dataset.
- **Monitor mode** returns only posts the previous run had not seen. Schedule it and get new posts by webhook or Telegram.
- **Exact post time.** `postedAt` is decoded from the post id to the second, next to LinkedIn's own "2d" label.

### What you get

Real rows from the example dataset (`companies: ["stripe", "apify", "microsoft"]`, text shortened here):

| companyName | postedAt | postedAgo | text | reactions | comments | mediaType | hashtags |
|---|---|---|---|---|---|---|---|
| Stripe | `2026-10-27T16:29:05Z` | 1w | Introducing 'stripe pay', for instant business-to-business transfers.... | `321` | `27` | video |  |
| Apify | `2026-11-03T13:03:56Z` | 23h | Apify Store just passed 100,000 Actors. This month's updates help you... | `18` | `0` | article |  |
| Microsoft | `2026-10-28T23:43:13Z` | 6d | Ready for what's next? Microsoft Chairman and CEO @member will take th... | `368` | `20` | live | MSIgnite |
| Microsoft | `2026-10-27T16:04:37Z` | 1w | Information overload is real. What if you could lighten it? In the Oct... | `901` | `81` | article |  |

Microsoft returns only 2 rows here because most of its recent page updates are reposts of employees' posts, which the default `onlyCompanyPosts: true` skips. Linked mentions of people in post text read `@member`.

One full row (Microsoft's article post, text shortened). `url` is always the neutral `feed/update` permalink of the post:

```json
{
  "id": "7520878131965091840",
  "url": "https://www.linkedin.com/feed/update/urn:li:activity:7520878131965091840/",
  "companySlug": "microsoft",
  "companyName": "Microsoft",
  "companyFollowers": 29445264,
  "text": "Information overload is real. What if you could lighten it? In the October edition of The Monthly Tech-In, we...",
  "hashtags": [],
  "postedAt": "2026-10-27T16:04:37Z",
  "repostedAt": null,
  "postedAgo": "1w",
  "reactions": 901,
  "comments": 81,
  "mediaType": "article",
  "mediaUrls": [],
  "thumbnailUrl": "https://media.licdn.com/dms/image/v2/D4E12AQGTnc8XhCxT-A/article-cover_image-shrink_720_1280/B4EaFgjikuK0AQ-/0/1792621292739?e=2147483647&v=beta&t=1qHZlDFBlbLijJQyyIBTHnYmeHyNZSiEa7k_Je_TGW0",
  "linkUrl": "https://www.linkedin.com/pulse/october-2026-new-copilot-microsoft-hlwpe",
  "linkTitle": "October 2026: The new Copilot",
  "byCompany": true,
  "isRepost": false
}
```

Full row: `id` (activity id), `url` (neutral `feed/update` permalink), `activityId`, `companySlug`, `companyName`, `companyUrl`, `companyFollowers`, `text`, `hashtags`, `postedAt`, `repostedAt`, `postedAgo`, `reactions`, `comments`, `mediaType` (`image`, `video`, `article`, `live`, `document`, `event` or `null` for text only), `mediaUrls`, `thumbnailUrl`, `linkUrl`, `linkTitle`, `byCompany`, `isRepost`, `query`, `scrapedAt`.

### Use cases

- **Marketing teams** benchmark what competitors post, how often and which posts get reactions.
- **Sales and agencies** watch target accounts for launches, hiring pushes and events to open a conversation.
- **Analysts and investors** collect company announcements with exact dates across a portfolio.
- **Monitor mode** turns a list of companies into a feed of their new LinkedIn posts.

### Try it in 10 seconds

Hit **Start**: the input already works with `companies: ["stripe", "apify", "microsoft"]` and `maxItems: 20`, nothing required.

To follow companies on a schedule, save the input as a task, set **Mode** to `monitor` and add a schedule (for example cron `0 8 * * *`, every morning). Each run then returns only posts that the previous run of the task had not seen. A post whose reaction count moved is not reported again.

### Related actors

- [LinkedIn Company Scraper](https://apify.com/datahamster/linkedin-company-scraper): the same companies' profile, industry, size, headquarters, website and follower count.
- [LinkedIn Jobs Scraper](https://apify.com/datahamster/linkedin-jobs-scraper): the jobs the same companies post on LinkedIn.
- [Facebook Pages Search: Business Contacts, Followers, Monitor](https://apify.com/datahamster/facebook-pages-search): the companies' Facebook pages with public business contacts.
- [Bluesky Scraper](https://apify.com/datahamster/bluesky-scraper): posts from Bluesky accounts and searches.

### Input

| Field | Meaning | Default |
|---|---|---|
| `companies` | LinkedIn company URLs or slugs: `microsoft`, `https://www.linkedin.com/company/stripe/`, `https://de.linkedin.com/company/posthog`. A numeric company id works too. | none (prefilled with `["stripe", "apify", "microsoft"]`) |
| `onlyCompanyPosts` | Keep only what the company wrote. Turn it off to also get the posts the company reposted from employees and other pages | `true` |
| `maxItems` | Stop after this many posts | `100` |
| `mode` | `scrape`, or `monitor` (only posts not seen by the previous run) | `scrape` |
| `monitorStateId`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor-mode state key and alert targets | empty |

### How it works

1. Each entry is turned into a company slug. Personal profiles (`/in/`), schools, showcase pages, job links and other sites are rejected before any request is made.
2. The public page `linkedin.com/company/<slug>/` is read once per company. It carries the company's most recent updates, usually 10, and each one becomes a row.
3. `postedAt` comes from the post's id, which encodes its creation time, so it is exact even when the page only says "1w". For a post the company reposted, `postedAt` is when the original was published and `repostedAt` is when the company reposted it.
4. LinkedIn throttles guests with HTTP 999 (an authwall stub) or 429. Every request uses a fresh client without cookies, and the actor pauses between companies. A refused page is tried once more after a short wait, then the actor moves to a datacenter and then a residential proxy, and stays on the tier that worked for the rest of the run.
5. A company slug LinkedIn does not know (HTTP 404) returns nothing and costs nothing. If every page was refused, `RUN_SUMMARY` says `blocked`; if every read failed with a server error or timeout, it says `upstream_error`. Neither ends as an empty `no_matches`.

### Pricing

| Event | Price |
|---|---|
| result | $0.0014 per post ($1.40 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0014 per new post in monitor mode |

You pay only for posts actually returned. Platform usage (compute and any proxy traffic) is billed by Apify on top; a typical run uses one plain request per company.

**Found it useful?** A short review on the Store page helps other people find this actor and tells us what to improve. If something is wrong, open an issue on the actor page and we will answer within a day.

### What is NOT collected

This is company content only. The actor does not collect employees, followers, commenters, people who reacted, or anyone's profile or contact details.

By default only the company's own posts are returned. The posts block on a company page often also includes posts written by employees that the company reposted; they appear only when you turn `onlyCompanyPosts` off. An employee's post is that person's content, so its row keeps the text, counters and dates only: no author name, no profile link, no images, video or shared link, and every row's `url` is the neutral `linkedin.com/feed/update/urn:li:activity:<id>/` permalink, because LinkedIn's own `/posts/...` link spells out the author's handle or words of the post, including names the text masks. When the company itself reshares an employee's post with a comment, the company's comment is kept and the employee's media is not. In post text, every linked @mention of a LinkedIn member is replaced with `@member`, and so is any plain-text occurrence of a name the same page links to a member profile. E-mail addresses and phone numbers are removed from post text. Names of people who are not linked as members anywhere on the page (for example a guest mentioned only in words) can remain in the text.

### Limits

- Only what LinkedIn shows a logged-out visitor: the company page's recent updates, usually the last 10. The Posts tab needs a login and is not read, so this is not a full post history. Run it on a schedule in monitor mode to build one going forward.
- `reactions` and `comments` are totals; who reacted or commented is never read.
- `text` is the post as the page shows it. A reshared post's own text and author are not included, only the company's comment on top of it.
- Video URLs are LinkedIn's signed MP4 links; they work for downloading but can expire.
- LinkedIn throttles guest traffic. Large lists run slower because of the pauses, and a run can escalate to a residential proxy, which costs more platform usage.

### FAQ

**Does it need a LinkedIn account or cookies?** No. Every request is a plain public web request.

**Can I get more than about 10 posts per company?** Not without logging in, which this actor never does. Monitor mode on a daily schedule collects every new post from now on.

**Why did a company return nothing?** Either LinkedIn has no company under that slug, or LinkedIn refused the page on every proxy tier. The run log has one line such as `companies: ok=2 not_found=1 walled=0` that says which.

### Changelog

- 0.1: first release. Recent posts of public company pages by URL or slug, exact post time, hashtags, media and link URLs, monitor mode for new posts.

# Actor input Schema

## `companies` (type: `array`):

Company page URLs or slugs, one per line: "microsoft", "https://www.linkedin.com/company/stripe/". Personal profiles, schools and showcase pages are skipped.

## `onlyCompanyPosts` (type: `boolean`):

Keep only posts the company wrote. Turn off to also get posts it reposted from employees or other pages; an employee's post then comes with text, counts and dates only, no media.

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

Stop after this many posts (you are charged only for pushed rows)

## `mode` (type: `string`):

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "companies": [
    "stripe",
    "apify",
    "microsoft"
  ],
  "onlyCompanyPosts": true,
  "maxItems": 20,
  "mode": "scrape"
}
```

# Actor output Schema

## `results` (type: `string`):

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "companies": [
        "stripe",
        "apify",
        "microsoft"
    ],
    "onlyCompanyPosts": true,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/linkedin-company-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 = {
    "companies": [
        "stripe",
        "apify",
        "microsoft",
    ],
    "onlyCompanyPosts": True,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/linkedin-company-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 '{
  "companies": [
    "stripe",
    "apify",
    "microsoft"
  ],
  "onlyCompanyPosts": true,
  "maxItems": 20
}' |
apify call datahamster/linkedin-company-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datahamster/linkedin-company-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/mus3t7VitOtorlsqr/builds/FFp70Lggag1aC7QBk/openapi.json
