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

Pull public LinkedIn posts and long-form articles into a clean dataset. Works on individual post URLs, company URLs, profile URLs, and topic pages. No login required, no account at risk.

- **URL**: https://apify.com/futurizerush/linkedin-post-scraper.md
- **Developed by:** [Rush](https://apify.com/futurizerush) (community)
- **Categories:** AI, Agents, Social media
- **Stats:** 6 total users, 4 monthly users, 83.3% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## 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

## LinkedIn Post Scraper

Pull public LinkedIn posts into a clean dataset. Paste a post URL, a
company URL, a profile URL, or a topic URL — the actor detects the URL
type and reads the appropriate posts.

**No login required. No account at risk.**

### What you get per row

- Author name, profile link, whether the author is a person or a company, author follower count
- Post text + a one-line headline
- Posted-at timestamp (ISO 8601, UTC)
- Reactions and comments counts
- Primary image with its accessibility caption (when present)
- Sample of up to ten visible comments — each one a small object with `text`, `authorName`, `postedAt`, and `likes`
- Hashtags parsed from the post text
- Stable post ID (`urn:li:activity:<id>` format) for de-duplicating across runs. Long-form articles (`/pulse/...` URLs) don't have one, so their `urn` field is `null` — use `postUrl` instead for those rows.

### Inputs

Paste any mix of these URL types:

| URL form | What you get |
|---|---|
| `linkedin.com/posts/<…>-activity-<id>` | One row for that post |
| `linkedin.com/feed/update/urn:li:activity:<id>/` | Same as above (LinkedIn aliases the two) |
| `linkedin.com/pulse/<slug>` | One row for that long-form article |
| `linkedin.com/company/<slug>/` | Up to N recent posts visible on the company page (one row each, where N is your "Max posts per company, profile, or topic" setting) |
| `linkedin.com/in/<handle>/` | Up to N recent posts and long-form articles from that profile (one row each, where N is your "Max posts per company, profile, or topic" setting) |
| `linkedin.com/top-content/<topic>/` | Up to N trending posts on that topic from across LinkedIn (one row each) |

Optional knobs:

- **Max posts per company, profile, or topic** — cap on how many recent posts to read from each of those URL types. The actual count depends on how many posts that source has visible on its public page. A direct post URL returns one row, unless the same post was already emitted earlier in the run (for example, when you also paste the company page that featured it).
- **Only posts newer than** — skip posts older than this date or window. Pick a specific date (`YYYY-MM-DD`) or a rolling window like `7 days`, `2 weeks`, `1 month`, `1 year`. Leave empty to take everything.

### Looking for trending posts on a topic?

Browse [linkedin.com/top-content/](https://www.linkedin.com/top-content/) to see all available topic pages, pick one, and paste the URL — you'll get up to N trending posts on that topic in one run.

### What we don't yet support

LinkedIn shows these surfaces only to logged-in visitors, so we can't read them as a public guest:

- Keyword search-result pages (`linkedin.com/search/results/content/…`) — paste a topic URL instead for trending posts on a topic (see the Inputs table above)
- Hashtag feeds (`linkedin.com/feed/hashtag/…`)
- `/in/<handle>/recent-activity/all/` profile activity pages
- `/company/<slug>/posts/?feedView=all` company posts feeds

If you paste one of these URLs, the row's `error` field will explain that the URL form isn't supported, and the rest of your input continues normally.

### Out of scope (so you know what to expect)

These aren't bugs — they're explicit choices about what this actor is and isn't. If you need any of these, this isn't the right tool:

- **Authenticated content** — we run as a public guest only. Posts that are private, member-only, or behind a follow-gate aren't available.
- **Per-reaction-type breakdown** (like / celebrate / support split) — only the aggregate count is on the public page.
- **Repost / share counts** — not in the public payload.
- **Video file URLs** — videos come back with caption text and a poster image; the video file itself isn't extracted.
- **Comment replies / nested threads** — `commentsPreview` returns up to ten top-level comments per post; replies to those comments aren't included.
- **Author email or contact info** — out of scope for this actor.
- **Real-time streaming or webhooks** — this is a pull-based actor; use Apify Schedules to refresh on a cadence.
- **Cross-run de-duplication** — within a single run we de-duplicate by post ID when available, falling back on `postUrl` for long-form articles (which don't carry a post ID). Across runs, keep your own list using the same precedence — `urn` first, then `postUrl`.

### FAQ

**Do I need a LinkedIn account or cookie?**
No — we only read pages a logged-out visitor can see, and nothing is stored against your account.

**How do I find rows that didn't return a post?**
Filter the dataset on `succeeded:false`. Each such row's `error` field explains the specific reason — sign-in wall, rate limit, post not available, page that doesn't expose its recent posts publicly, etc.

**A company, profile, or topic URL came back with no posts — why?**
Some pages don't surface their recent posts to public visitors (Apple's company page is one example). Some profiles don't expose their recent posts or articles either. Paste individual post URLs from that source instead — those still work.

**Why is the comments count higher than the comments I see in the sample?**
LinkedIn surfaces only a sample of comments inline on the public post page. The total `commentsCount` is the real number; `commentsPreview` is the sample.

**Why don't I see reactions broken down by type (like / celebrate / support)?**
Only the aggregate reaction count is exposed on the public post page; the per-type breakdown isn't.

**Can I get a video file URL?**
Video posts come back with the caption text in `postText` and the poster image in `imageUrl`. The video file itself isn't available.

**What happens when LinkedIn rate-limits the run?**
Affected rows come back with an `error` value noting LinkedIn is restricting access right now, so you can retry just those URLs in a later run.

### Disclaimer

This actor reads the same public post pages your browser would render
without logging in. We do not bypass authentication, do not collect
private member data, and do not republish content. Use the resulting
dataset in a manner that respects LinkedIn's terms and applicable law.

### Built by

[apify.com/futurizerush](https://apify.com/futurizerush?fpr=rush)

---

OpenClaw, Claude Code, Gemini, Antigravity, Codex, ChatGPT

# Actor input Schema

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

Paste any of these — the actor detects the URL type and reads the appropriate posts:

• An individual post URL — `linkedin.com/posts/<slug>-activity-<id>` or `linkedin.com/feed/update/urn:li:activity:<id>/`
• A long-form article URL — `linkedin.com/pulse/<slug>`
• A company URL — `linkedin.com/company/<slug>/` (reads its recent posts)
• A profile URL — `linkedin.com/in/<handle>/` (reads the person's recent posts and long-form articles)
• A topic URL — `linkedin.com/top-content/<topic>/` (reads trending posts on that topic — browse [linkedin.com/top-content/](https://www.linkedin.com/top-content/) for the full list)
## `limitPerSource` (type: `integer`):

Cap on how many recent posts to read per company, profile, or topic URL. The actual count depends on how many posts that source has visible on its public page — when fewer are visible, you get fewer rows. A direct post URL returns one row regardless of this setting, unless the same post was already emitted earlier in the run (for example, when you also paste the company page that featured it).
## `scrapeFrom` (type: `string`):

Optional. Skip posts older than this. Pick a date from the calendar, or type a window like `7 days`, `2 weeks`, `1 month`, `1 year`. Leave empty to take everything.

## Actor input object example

```json
{
  "urls": [
    "https://www.linkedin.com/posts/microsoft_worktrendindex-activity-7457369463198437376-3F4k",
    "https://www.linkedin.com/company/microsoft/"
  ],
  "limitPerSource": 25
}
````

# Actor output Schema

## `posts` (type: `string`):

Open the dataset to see the extracted posts. Profile, company, and topic URLs can produce multiple rows; a direct post URL produces one row, unless the same post was already emitted earlier in the run.

# 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/posts/microsoft_worktrendindex-activity-7457369463198437376-3F4k",
        "https://www.linkedin.com/company/microsoft/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("futurizerush/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 = { "urls": [
        "https://www.linkedin.com/posts/microsoft_worktrendindex-activity-7457369463198437376-3F4k",
        "https://www.linkedin.com/company/microsoft/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("futurizerush/linkedin-post-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 '{
  "urls": [
    "https://www.linkedin.com/posts/microsoft_worktrendindex-activity-7457369463198437376-3F4k",
    "https://www.linkedin.com/company/microsoft/"
  ]
}' |
apify call futurizerush/linkedin-post-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Post Scraper",
        "description": "Pull public LinkedIn posts and long-form articles into a clean dataset. Works on individual post URLs, company URLs, profile URLs, and topic pages. No login required, no account at risk.",
        "version": "0.0",
        "x-build-id": "NsVAzAyvexl8jDdgC"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/futurizerush~linkedin-post-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-futurizerush-linkedin-post-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/futurizerush~linkedin-post-scraper/runs": {
            "post": {
                "operationId": "runs-sync-futurizerush-linkedin-post-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/futurizerush~linkedin-post-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-futurizerush-linkedin-post-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": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "🔗 LinkedIn URLs",
                        "minItems": 1,
                        "maxItems": 1000,
                        "type": "array",
                        "description": "Paste any of these — the actor detects the URL type and reads the appropriate posts:\n\n• An individual post URL — `linkedin.com/posts/<slug>-activity-<id>` or `linkedin.com/feed/update/urn:li:activity:<id>/`\n• A long-form article URL — `linkedin.com/pulse/<slug>`\n• A company URL — `linkedin.com/company/<slug>/` (reads its recent posts)\n• A profile URL — `linkedin.com/in/<handle>/` (reads the person's recent posts and long-form articles)\n• A topic URL — `linkedin.com/top-content/<topic>/` (reads trending posts on that topic — browse [linkedin.com/top-content/](https://www.linkedin.com/top-content/) for the full list)",
                        "items": {
                            "type": "string"
                        }
                    },
                    "limitPerSource": {
                        "title": "📊 Max posts per company, profile, or topic",
                        "minimum": 10,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Cap on how many recent posts to read per company, profile, or topic URL. The actual count depends on how many posts that source has visible on its public page — when fewer are visible, you get fewer rows. A direct post URL returns one row regardless of this setting, unless the same post was already emitted earlier in the run (for example, when you also paste the company page that featured it).",
                        "default": 25
                    },
                    "scrapeFrom": {
                        "title": "📅 Only posts newer than",
                        "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*([Dd][Aa][Yy]|[Ww][Ee][Ee][Kk]|[Mm][Oo][Nn][Tt][Hh]|[Yy][Ee][Aa][Rr])[Ss]?$",
                        "type": "string",
                        "description": "Optional. Skip posts older than this. Pick a date from the calendar, or type a window like `7 days`, `2 weeks`, `1 month`, `1 year`. Leave empty to take everything."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
