# LinkedIn Post Scraper (`automationagents/linkedin-post-scraper`) Actor

Extract post details and engagement data from a LinkedIn post URL. Study reach and engagement for content research.

- **URL**: https://apify.com/automationagents/linkedin-post-scraper.md
- **Developed by:** [Alex Jordan](https://apify.com/automationagents) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0033 / successful api call

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## LinkedIn Post Scraper

What does LinkedIn Post Scraper do?
LinkedIn Post Scraper extracts post details and engagement data from a LinkedIn post URL using an authenticated session. It is useful for content research, engagement analysis, and repeatable post-level enrichment workflows.

Built on the Apify platform, this Actor supports scheduling, webhooks, and dataset exports.

Why use LinkedIn Post Scraper?

- Content analysis - Collect post text, media, and engagement signals in a structured format
- Engagement research - Review reactions, comments, reposts, and post metadata
- Operational visibility - Track extraction results in Apify datasets

How to use LinkedIn Post Scraper

1. Open the Actor on Apify
2. Enter the LinkedIn post URL and required authenticated session inputs
3. Start the run
4. Review the dataset output for extracted post details

Input
This Actor accepts the fields required to extract a LinkedIn post through an authenticated session.

Proxy object
Use the proxy object to define how requests should be routed. Common fields are:

- `ip` - Proxy host or endpoint URL
- `port` - Proxy port
- `username` - Proxy username
- `password` - Proxy password

Example input

```json
{
  "liPostUrl": "https://www.linkedin.com/posts/example-user_example-topic-ugcPost-1234567890123456789-example/",
  "profileId": "example-profile-id",
  "li_at": "example_li_at",
  "JSESSIONID": "ajax:example",
  "bcookie": "example_bcookie",
  "liap": "true",
  "li_theme_set": "app",
  "li_theme": "light",
  "timezone": "Asia/Kolkata",
  "bscookie": "example_bscookie",
  "user-agent": "Mozilla/5.0 ...",
  "timezoneOffset": "5.5",
  "csrf-token": "example_csrf-token",
  "User-Agent": "Mozilla/5.0 ...",
  "x-li-track": "{\"clientVersion\":\"1.13.455\"}",
  "x-li-lang": "en_US",
  "X-Restli-Protocol-Version": "2.0.0",
  "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
  "proxy": {
    "ip": "http://proxy.example.com/",
    "port": "1080",
    "username": "example_username",
    "password": "example_password"
  }
}
```

Output
The Actor writes the extraction result to the default dataset.

Example output

```json
{
  "success": true,
  "response": {
    "inputLiPostUrl": "https://www.linkedin.com/posts/example-user_example-topic-ugcPost-1234567890123456789-example/",
    "firstName": "Example",
    "lastName": "Person",
    "customPronoun": "",
    "postType": "Video + Text",
    "headline": "Director | Example Group | Industrial Manufacturing",
    "jobTitle": "Director | Example Group | Industrial Manufacturing",
    "jobCompanyName": "",
    "liProfilePublicUrl": "https://www.linkedin.com/in/example-user",
    "liProfilePublicId": "example-user",
    "snProfileUrl": "https://www.linkedin.com/sales/people/example-sales-profile",
    "liProfileId": "ACoAAExampleProfileId",
    "liMemberUrn": "",
    "liProfileImageUrl": "https://media.licdn.com/dms/image/v2/example-profile-photo",
    "liProfileBannerUrl": "https://media.licdn.com/dms/image/v2/example-banner-photo",
    "following": false,
    "connectionDegree": "3rd+",
    "isLinkedInPremium": false,
    "isInfluencer": false,
    "isCreator": false,
    "isOpenToWork": false,
    "isHiring": false,
    "connectionType": "",
    "postUrl": "https://www.linkedin.com/posts/example-user_example-topic-ugcPost-1234567890123456789-example/",
    "postId": "1234567890123456789",
    "postDate": "2026-06-29T00:00:00.000Z",
    "postContent": "Example post text from a validated LinkedIn post scrape response.",
    "hashTags": [
      "exampletag"
    ],
    "postMediaType": "video",
    "postMediaUrl": "https://media.licdn.com/dms/video/example-video",
    "totalReactionCount": 128,
    "likeCount": 91,
    "appreciationCount": 7,
    "empathyCount": 5,
    "praiseCount": 8,
    "interestCount": 11,
    "commentsCount": 14,
    "repostsCount": 3,
    "canCommentDisabled": false,
    "socialActivityCountsInsight": true,
    "isEdited": false,
    "timestamp": "2026-06-29T00:00:00.000Z"
  }
}
```

Pricing / Cost estimation
$0.0033 per successful API call

Support
If you need adjustments for your workflow, use the Actor Issues tab or your internal support channel.

# Actor input Schema

## `liPostUrl` (type: `string`):

LinkedIn post URL to scrape.

## `profileId` (type: `string`):

LinkedIn profile identifier for the signed-in account.

## `li_at` (type: `string`):

LinkedIn li\_at cookie.

## `JSESSIONID` (type: `string`):

LinkedIn JSESSIONID cookie.

## `bcookie` (type: `string`):

LinkedIn browser cookie.

## `liap` (type: `string`):

LinkedIn session field.

## `li_theme_set` (type: `string`):

LinkedIn theme-set field.

## `li_theme` (type: `string`):

LinkedIn theme field.

## `timezone` (type: `string`):

Browser timezone.

## `bscookie` (type: `string`):

LinkedIn browser secure cookie.

## `user-agent` (type: `string`):

Lowercase user-agent field if required by runtime mapping.

## `timezoneOffset` (type: `string`):

Browser timezone offset.

## `csrf-token` (type: `string`):

CSRF token header value.

## `User-Agent` (type: `string`):

Browser user agent string.

## `x-li-track` (type: `string`):

LinkedIn tracking header value.

## `x-li-lang` (type: `string`):

LinkedIn language header value.

## `X-Restli-Protocol-Version` (type: `string`):

LinkedIn Rest.li protocol version.

## `txSmSelfProfileUrl` (type: `string`):

TexAu self profile URL.

## `proxy` (type: `object`):

Proxy object for browser session.

## Actor input object example

```json
{
  "liPostUrl": "https://www.linkedin.com/posts/example-user_example-topic-ugcPost-1234567890123456789-example/",
  "profileId": "example-profile-id",
  "li_at": "example_li_at",
  "JSESSIONID": "ajax:example",
  "bcookie": "example_bcookie",
  "liap": "true",
  "li_theme_set": "app",
  "li_theme": "light",
  "timezone": "Asia/Kolkata",
  "bscookie": "example_bscookie",
  "user-agent": "Mozilla/5.0 ...",
  "timezoneOffset": "5.5",
  "csrf-token": "example_csrf-token",
  "User-Agent": "Mozilla/5.0 ...",
  "x-li-track": "{\"clientVersion\":\"1.13.455\"}",
  "x-li-lang": "en_US",
  "X-Restli-Protocol-Version": "2.0.0",
  "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
  "proxy": {
    "ip": "http://proxy.example.com/",
    "port": "1080",
    "username": "example_username",
    "password": "example_password"
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "liPostUrl": "https://www.linkedin.com/posts/example-user_example-topic-ugcPost-1234567890123456789-example/",
    "profileId": "example-profile-id",
    "li_at": "example_li_at",
    "JSESSIONID": "ajax:example",
    "bcookie": "example_bcookie",
    "liap": "true",
    "li_theme_set": "app",
    "li_theme": "light",
    "timezone": "Asia/Kolkata",
    "bscookie": "example_bscookie",
    "user-agent": "Mozilla/5.0 ...",
    "timezoneOffset": "5.5",
    "csrf-token": "example_csrf-token",
    "User-Agent": "Mozilla/5.0 ...",
    "x-li-track": "{\"clientVersion\":\"1.13.455\"}",
    "x-li-lang": "en_US",
    "X-Restli-Protocol-Version": "2.0.0",
    "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
    "proxy": {
        "ip": "http://proxy.example.com/",
        "port": "1080",
        "username": "example_username",
        "password": "example_password"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automationagents/linkedin-post-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 = {
    "liPostUrl": "https://www.linkedin.com/posts/example-user_example-topic-ugcPost-1234567890123456789-example/",
    "profileId": "example-profile-id",
    "li_at": "example_li_at",
    "JSESSIONID": "ajax:example",
    "bcookie": "example_bcookie",
    "liap": "true",
    "li_theme_set": "app",
    "li_theme": "light",
    "timezone": "Asia/Kolkata",
    "bscookie": "example_bscookie",
    "user-agent": "Mozilla/5.0 ...",
    "timezoneOffset": "5.5",
    "csrf-token": "example_csrf-token",
    "User-Agent": "Mozilla/5.0 ...",
    "x-li-track": "{\"clientVersion\":\"1.13.455\"}",
    "x-li-lang": "en_US",
    "X-Restli-Protocol-Version": "2.0.0",
    "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
    "proxy": {
        "ip": "http://proxy.example.com/",
        "port": "1080",
        "username": "example_username",
        "password": "example_password",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("automationagents/linkedin-post-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 '{
  "liPostUrl": "https://www.linkedin.com/posts/example-user_example-topic-ugcPost-1234567890123456789-example/",
  "profileId": "example-profile-id",
  "li_at": "example_li_at",
  "JSESSIONID": "ajax:example",
  "bcookie": "example_bcookie",
  "liap": "true",
  "li_theme_set": "app",
  "li_theme": "light",
  "timezone": "Asia/Kolkata",
  "bscookie": "example_bscookie",
  "user-agent": "Mozilla/5.0 ...",
  "timezoneOffset": "5.5",
  "csrf-token": "example_csrf-token",
  "User-Agent": "Mozilla/5.0 ...",
  "x-li-track": "{\\"clientVersion\\":\\"1.13.455\\"}",
  "x-li-lang": "en_US",
  "X-Restli-Protocol-Version": "2.0.0",
  "txSmSelfProfileUrl": "https://www.linkedin.com/in/example-self/",
  "proxy": {
    "ip": "http://proxy.example.com/",
    "port": "1080",
    "username": "example_username",
    "password": "example_password"
  }
}' |
apify call automationagents/linkedin-post-scraper --silent --output-dataset

```

## MCP server setup

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