# LinkedIn Posts Scraper (`maximedupre/linkedin-posts-scraper`) Actor

Scrape public LinkedIn posts without cookies. Add profile URLs, company URLs, or direct post URLs and get post text, author data, engagement, images, and visible top comments. Export results or use them through the Apify API.

- **URL**: https://apify.com/maximedupre/linkedin-posts-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### Get LinkedIn post data without cookies

LinkedIn Posts Scraper gets public post data from [LinkedIn](https://www.linkedin.com/) profile, company, and direct post URLs without asking for cookies or login details. Use it to turn public LinkedIn posts into a clean dataset with post text, author details, post URLs, publish dates when visible, engagement counts, images, and top comments when LinkedIn exposes them.

Start with a LinkedIn profile URL, company URL, or direct post URL. The Actor is built for quick market research, lead research, content tracking, social listening, and reporting workflows where you need LinkedIn post data in JSON, CSV, Excel, XML, RSS, or through the Apify API.

### What this LinkedIn Posts Scraper does

This Actor helps you collect public LinkedIn posts from:

- LinkedIn profile URLs, such as `https://www.linkedin.com/in/satyanadella/`
- LinkedIn company URLs, such as `https://www.linkedin.com/company/microsoft/`
- Direct LinkedIn post URLs, such as `https://www.linkedin.com/posts/...`

For profile and company targets, the Actor discovers public indexed post URLs and then reads the public post pages. For direct post URLs, it goes straight to the post you provide. Direct post URLs are the best choice when you need exact coverage of a known list of posts.

### What data you get

Each post row can include:

- Target URL you provided
- Source URL and canonical LinkedIn post URL
- LinkedIn post ID and activity URN when visible
- Author name and author URL
- Post headline and text
- Publish date when LinkedIn exposes it
- Reaction, comment, and repost counts when visible
- Image URLs from the public post metadata
- Top comments from public structured data
- Scrape position, scrape time, and status

If you enable comment rows, the Actor also saves one row per visible top comment. Each comment row includes the parent post, comment author, comment text, comment date, and like count when LinkedIn exposes those fields.

### Common use cases

- Track posts from public LinkedIn profiles for founder, executive, creator, or competitor research
- Collect LinkedIn company posts for brand monitoring and market updates
- Save direct LinkedIn post URLs into a dataset for reporting or enrichment
- Export LinkedIn post data to spreadsheets, BI tools, dashboards, or your own app
- Schedule repeat runs on Apify to watch public post activity over time
- Use the Apify API to feed public LinkedIn post data into automated workflows

### How to run it

1. Add one or more LinkedIn profile, company, or direct post URLs.
2. Set the maximum posts per target and the total post limit.
3. Optional: add a date range if you only want posts with visible publish dates inside that range.
4. Optional: keep top comments on each post row, or emit comments as separate rows.
5. Start the Actor and open the dataset.

The prefilled input is small, so you can test the Actor before running a larger job.

### Input

| Field | What it does |
| --- | --- |
| LinkedIn URLs | Profile URLs, company URLs, direct post URLs, or a mix of all three. |
| Posts per target | Caps how many post rows can be saved for each target. |
| Total post limit | Caps the full run across all targets. |
| Published on or after | Skips posts older than this date when a publish date is visible. |
| Published on or before | Skips posts newer than this date when a publish date is visible. |
| Include top comments | Adds visible top comments to each post row. |
| Top comments per post | Controls how many top comments are kept on each post row. |
| Emit comment rows | Saves visible top comments as separate dataset rows. |

### Example input

```json
{
  "targetUrls": [
    { "url": "https://www.linkedin.com/in/satyanadella/" },
    { "url": "https://www.linkedin.com/company/microsoft/" },
    {
      "url": "https://www.linkedin.com/posts/microsoft_ever-wondered-what-a-day-in-the-life-of-a-activity-7232782404464037888-zP-W"
    }
  ],
  "maxPostsPerTarget": 25,
  "maxTotalPosts": 100,
  "includeTopComments": true,
  "maxTopCommentsPerPost": 3,
  "includeCommentRows": false
}
````

### Example output

```json
{
  "rowType": "post",
  "target": "https://www.linkedin.com/company/microsoft/",
  "sourceUrl": "https://www.linkedin.com/posts/microsoft_ever-wondered-what-a-day-in-the-life-of-a-activity-7232782404464037888-zP-W",
  "postId": "7232782404464037888",
  "postUrl": "https://www.linkedin.com/posts/microsoft_ever-wondered-what-a-day-in-the-life-of-a-activity-7232782404464037888-zP-W",
  "authorName": "Microsoft",
  "authorUrl": null,
  "headline": "Ever wondered what a day in the life...",
  "text": "Ever wondered what a day in the life...",
  "publishedAt": null,
  "engagement": {
    "reactions": 1240,
    "comments": 84,
    "reposts": null
  },
  "media": {
    "images": ["https://media.licdn.com/..."]
  },
  "topComments": [],
  "position": 1,
  "scrapedAt": "2026-05-21T00:00:00.000Z",
  "status": "ok",
  "statusMessage": null
}
```

Some fields can be `null` when LinkedIn does not show them on the public page.

### Pricing

This Actor uses pay-per-event pricing. A run has a small Actor-start charge, then you pay for each saved LinkedIn post row. If you turn on separate comment rows, each saved comment row is charged as its own row. Pricing is shown on the Actor page before you start a run.

### Limits and caveats

This Actor reads public LinkedIn pages only. It does not use your LinkedIn account, cookies, private sessions, or paid LinkedIn data. It cannot collect private posts, posts hidden behind login, or fields LinkedIn does not expose publicly.

Profile and company targets depend on public search-indexed post URLs. They are useful for quick discovery, but they may not include every post from a profile or company. For exact jobs, paste direct LinkedIn post URLs.

Date filters are applied when LinkedIn exposes a publish date. Posts with no visible publish date are kept, because dropping them could hide useful data.

### FAQ

#### Is this a LinkedIn profile posts scraper?

Yes. Add a public LinkedIn profile URL and the Actor will discover public indexed posts for that profile, then save the post data it can read from the public post pages.

#### Is this a LinkedIn company posts scraper?

Yes. Add a public LinkedIn company URL and the Actor will collect public indexed company post URLs. For the most exact company coverage, paste direct company post URLs.

#### Do I need LinkedIn cookies?

No. The Actor is designed for public LinkedIn posts and does not ask for cookies, login details, or LinkedIn account access.

#### Can I scrape LinkedIn post comments?

The Actor can include top comments when LinkedIn exposes them in public structured data. It is not a full LinkedIn comments crawler and does not open private or login-only comment threads.

#### Can I use the data through an API?

Yes. Runs and datasets are available through the Apify API, and you can export results from the dataset in common formats such as JSON, CSV, Excel, XML, and RSS.

# Actor input Schema

## `targetUrls` (type: `array`):

Paste LinkedIn profile URLs, company URLs, direct post URLs, or a mix. Direct post URLs are read directly. Profile and company URLs use public indexed posts.

## `maxPostsPerTarget` (type: `integer`):

Limit how many LinkedIn post rows can be saved for each URL you add.

## `maxTotalPosts` (type: `integer`):

Stop the run after this many post rows across all targets.

## `dateFrom` (type: `string`):

Optional date filter, for example 2026-01-01. Posts older than this date are skipped when LinkedIn shows a publish date.

## `dateTo` (type: `string`):

Optional date filter, for example 2026-05-21. Posts newer than this date are skipped when LinkedIn shows a publish date.

## `includeTopComments` (type: `boolean`):

Add top comments to each post row when LinkedIn includes them in public structured data.

## `maxTopCommentsPerPost` (type: `integer`):

Choose how many visible top comments to keep on each post row.

## `includeCommentRows` (type: `boolean`):

Also save each visible top comment as its own dataset row.

## Actor input object example

```json
{
  "targetUrls": [
    {
      "url": "https://www.linkedin.com/in/satyanadella/"
    }
  ],
  "maxPostsPerTarget": 25,
  "maxTotalPosts": 100,
  "includeTopComments": true,
  "maxTopCommentsPerPost": 3,
  "includeCommentRows": false
}
```

# Actor output Schema

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

Open the dataset with post rows and optional top-comment rows.

# 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 = {
    "targetUrls": [
        {
            "url": "https://www.linkedin.com/in/satyanadella/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/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 = { "targetUrls": [{ "url": "https://www.linkedin.com/in/satyanadella/" }] }

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

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

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

```

## CLI example

```bash
echo '{
  "targetUrls": [
    {
      "url": "https://www.linkedin.com/in/satyanadella/"
    }
  ]
}' |
apify call maximedupre/linkedin-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=maximedupre/linkedin-posts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Posts Scraper",
        "description": "Scrape public LinkedIn posts without cookies. Add profile URLs, company URLs, or direct post URLs and get post text, author data, engagement, images, and visible top comments. Export results or use them through the Apify API.",
        "version": "0.0",
        "x-build-id": "xeiX2M8CiV0F0jLjY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~linkedin-posts-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-linkedin-posts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/maximedupre~linkedin-posts-scraper/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-linkedin-posts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/maximedupre~linkedin-posts-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-linkedin-posts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "targetUrls"
                ],
                "properties": {
                    "targetUrls": {
                        "title": "LinkedIn URLs",
                        "minItems": 1,
                        "maxItems": 500,
                        "type": "array",
                        "description": "Paste LinkedIn profile URLs, company URLs, direct post URLs, or a mix. Direct post URLs are read directly. Profile and company URLs use public indexed posts.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxPostsPerTarget": {
                        "title": "Posts per target",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Limit how many LinkedIn post rows can be saved for each URL you add.",
                        "default": 25
                    },
                    "maxTotalPosts": {
                        "title": "Total post limit",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Stop the run after this many post rows across all targets.",
                        "default": 100
                    },
                    "dateFrom": {
                        "title": "Published on or after",
                        "type": "string",
                        "description": "Optional date filter, for example 2026-01-01. Posts older than this date are skipped when LinkedIn shows a publish date."
                    },
                    "dateTo": {
                        "title": "Published on or before",
                        "type": "string",
                        "description": "Optional date filter, for example 2026-05-21. Posts newer than this date are skipped when LinkedIn shows a publish date."
                    },
                    "includeTopComments": {
                        "title": "Include top comments",
                        "type": "boolean",
                        "description": "Add top comments to each post row when LinkedIn includes them in public structured data.",
                        "default": true
                    },
                    "maxTopCommentsPerPost": {
                        "title": "Top comments per post",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Choose how many visible top comments to keep on each post row.",
                        "default": 3
                    },
                    "includeCommentRows": {
                        "title": "Save comment rows",
                        "type": "boolean",
                        "description": "Also save each visible top comment as its own dataset row.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
