# LinkedIn Posts Scraper - Profiles, Companies & Comments (`aolmo/linkedin-posts`) Actor

Recent posts of any LinkedIn profile or company page, or any post by URL, without cookies: text, date, likes, comments count, images, video, hashtags and the top comments. $0.001 per post; new posts flagged on scheduled runs.

- **URL**: https://apify.com/aolmo/linkedin-posts.md
- **Developed by:** [Antonio del Olmo Tena](https://apify.com/aolmo) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 post scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

Scrape LinkedIn posts without cookies, without a LinkedIn account and without logging in. Give it profiles, company pages or post URLs and the Actor returns one row per post: full text, date, likes, comments count, images, video, hashtags, links, the author with follower count and the top comments. Schedule it on profiles and companies to get every new post as it is published: perfect for social listening, competitor monitoring, sales triggers and content research.

The Actor reads the public pages LinkedIn shows to logged-out visitors. You pay $0.001 per post.

### What you get

One Dataset row per post:

- `postUrl`, `activityId`, `type` (post, video or article), `date`.
- `text` (full text), `hashtags`, `links`.
- `likes`, `comments`.
- `images`, `videoUrl`, `videoDuration`.
- `authorName`, `authorUrl`, `authorType` (person or company), `authorFollowers`.
- `topComments`: author, author URL, text, date and likes of the comments LinkedIn shows publicly (up to 10).
- `sourceUrl`, `sourceType`, `sourceName`: the profile, company or post you asked for.
- `isNew`: `true` for posts that were not on the page in the previous run.

### How to use it

1. Open the **Input** tab.
2. Paste URLs, one per line:
   - a profile (`https://www.linkedin.com/in/satyanadella`) or company (`https://www.linkedin.com/company/stripe`) returns the recent posts its public page shows (usually 5 to 10);
   - a post (`https://www.linkedin.com/posts/...`) returns that post with its top comments.
3. Keep **Open each post** on to get the full text, comments count, media and top comments of every post; turn it off for a faster run.
4. Click **Start** and export the rows as JSON, CSV or Excel.
5. To monitor, schedule the Actor (for example daily). New posts come with `isNew: true`; connect a webhook to receive them.

### Input

```json
{
  "urls": ["https://www.linkedin.com/company/stripe", "https://www.linkedin.com/in/satyanadella"],
  "includeDetails": true
}
```

| Field | Description |
|-------|-------------|
| `urls` | LinkedIn profile, company or post URLs. Up to 500 per run. |
| `includeDetails` | Open each post for full details and top comments. Default `true`. |

### Output example

```json
{
  "sourceUrl": "https://www.linkedin.com/company/stripe",
  "sourceType": "company",
  "sourceName": "Stripe",
  "postUrl": "https://www.linkedin.com/posts/stripe_introducing-personal-agent-protocol-activity-7513299438086332416-zrLF",
  "type": "post",
  "authorName": "Stripe",
  "authorFollowers": 1759025,
  "date": "2026-10-06T18:09:36.392Z",
  "text": "We're working with Meta, Sierra, Genesys, Instinct, Rocket, Shopify, and Walmart as founding partners for the Personal Agent Protocol...",
  "likes": 418,
  "comments": 40,
  "images": ["https://media.licdn.com/dms/image/..."],
  "topComments": [{ "author": "Jane Doe", "text": "The third route is the one to watch...", "likes": 3 }],
  "isNew": false
}
```

### Pricing

Pay per event, no subscription:

- **Post scraped**: $0.001 per post. 1,000 posts cost $1, top comments included.
- **New post**: $0.002 per post that appears on a scheduled profile or company page for the first time.

Pages that cannot be read are free. Other LinkedIn post scrapers charge $2 to $5 per 1,000 posts, plus extra for comments.

### Use it as an API

```bash
curl -X POST "https://api.apify.com/v2/acts/aolmo~linkedin-posts/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://www.linkedin.com/company/stripe"]}'
```

### FAQ

**Do I need a LinkedIn account or cookies?** No.

**How many posts per profile or company?** The ones LinkedIn shows on the public page to logged-out visitors, usually the latest 5 to 10. Schedule the Actor to build a complete history over time.

**Can I get all the comments of a post?** The Actor returns the comments LinkedIn shows publicly (up to 10, the most relevant) plus the total count.

**Where is the data stored between runs?** In a Key-Value Store of your account named `micro-saas-state-linkedin-posts`, one key per URL.

# Actor input Schema

## `urls` (type: `array`):

One per line. A profile (linkedin.com/in/...) or company (linkedin.com/company/...) returns the recent posts its public page shows; a post URL (linkedin.com/posts/...) returns that post.

## `includeDetails` (type: `boolean`):

Opens every post of a profile or company to add the full text, comments count, images, video and top comments. Turn off for a faster run with the basics only.

## `product` (type: `string`):

Internal. Leave as is.

## Actor input object example

```json
{
  "urls": [
    "https://www.linkedin.com/company/stripe"
  ],
  "includeDetails": true,
  "product": "linkedin-posts"
}
```

# Actor output Schema

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

Dataset items: url, changed, events, data, timestamp and error (when the target failed).

# 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 = {
    "urls": [
        "https://www.linkedin.com/company/stripe"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aolmo/linkedin-posts").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 = { "urls": ["https://www.linkedin.com/company/stripe"] }

# Run the Actor and wait for it to finish
run = client.actor("aolmo/linkedin-posts").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 '{
  "urls": [
    "https://www.linkedin.com/company/stripe"
  ]
}' |
apify call aolmo/linkedin-posts --silent --output-dataset

```

## MCP server setup

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

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/ADmAjVLvJkFFC0GK6/builds/y4g5mBID633UOa7p7/openapi.json
