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

Read a public LinkedIn post with its text, author, publication date and reaction count. Paste a public LinkedIn post URL to retrieve its text and engagement details.

- **URL**: https://apify.com/thescrappa/linkedin-post-scraper.md
- **Developed by:** [Scrappa](https://apify.com/thescrappa) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 36 total users, 0 monthly users, 96.7% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 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.

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 Post Scraper

Read a public LinkedIn post with its text, author, publication date and reaction count. Paste a public LinkedIn post URL to retrieve its text and engagement details.

### What data can you extract?

Profile, company and post details reflect public LinkedIn pages; the source may omit optional fields.

| Field | Type | Description |
| --- | --- | --- |
| `title` | text | Title of the LinkedIn post, as shown by LinkedIn; null when no title is published. |
| `author_name` | text | Name of the LinkedIn member who published the post; null when no author name is available. |
| `date_published` | text | Date the article was published shown by LinkedIn, in YYYY-MM-DD when the source provides a calendar date; null if the source omits the date. |
| `reactions_total` | number | Number of reactions shown by LinkedIn, as a whole number; zero is possible, and null means no count was reported. |
| `comments_count` | number | Number of comments shown by LinkedIn, as a whole number; zero is possible, and null means no count was reported. |

### Use cases

- Teams can review source records before a follow-up decision.
- Researchers can compare available records across targets or runs.
- Analysts can use source links to maintain a focused dataset.

### How to use

1. Open the Actor’s **Input** tab and start with the JSON below.
2. Set `url` to the search term or source identifier you want to look up, then use the optional filters listed below.
3. Start the run and open its default dataset to inspect or download the rows.

```json
{
  "url": "https://www.linkedin.com/posts/microsoft_worktrendindex-activity-7457369463198437376-3F4k"
}
```

The run dataset can be downloaded as JSON, CSV, Excel or another format offered by Apify.

### Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | URL of the LinkedIn post or article to scrape (e.g., https://linkedin.com/pulse/... or https://linkedin.com/posts/...) |
| `use_cache` | boolean | No | Use cached results if available to reduce costs. When disabled, the actor omits the cache flag because Scrappa does not accept use_cache=0. |
| `maximum_cache_age` | integer | No | Maximum age of cached results in seconds. Must be at least 1. Constraints: minimum 1. |

### Output example

The record below is synthetic. Names and links are examples, and private contact fields are omitted.

```json
{
  "title": "A practical guide to independent neighborhood shops",
  "author_name": "Morgan Lee",
  "date_published": "2026-09-25",
  "reactions_total": 1380,
  "comments_count": 27
}
```

### Pricing

**Current live price:** $0.30 per 1,000 results.

Each saved dataset record counts as one result.

### FAQ

#### Is it legal to collect public information?

This Actor is for information visible on the public source pages it reads. You are responsible for checking the source terms, privacy and copyright rules, and the laws that apply to your use.

#### How many records will a run return?

The result count depends on the input limits, pagination settings and what the source makes available. A small query or unavailable page can return fewer records, including none.

#### Can I call it through the API or connect it to other tools?

Yes. Send the same JSON input to `POST https://api.apify.com/v2/acts/thescrappa~linkedin-post-scraper/runs`, then read the run’s default dataset. Make, Zapier and n8n can start runs and pass dataset rows to the next step; Google Sheets can receive rows through those workflows or a dataset export.

#### What happens when a request fails?

Check the run log for the source or input error, correct the input and retry after a temporary source issue. A run can contain rows saved before a later request failed.

#### Can LinkedIn Post Scraper read a post from its URL?

Yes. Paste the public post URL in `url`. Login-gated or removed posts may not expose their text and engagement details.

### Related Scrappa Actors

- [LinkedIn Company Scraper](https://apify.com/thescrappa/linkedin-company-scraper)
- [LinkedIn Job Details Scraper](https://apify.com/thescrappa/linkedin-job-details-scraper)
- [LinkedIn Jobs Search Scraper](https://apify.com/thescrappa/linkedin-jobs-search-scraper)
- [LinkedIn Profile Scraper](https://apify.com/thescrappa/linkedin-profile-scraper)
- [LinkedIn Search Scraper](https://apify.com/thescrappa/linkedin-search-scraper)

# Actor input Schema

## `url` (type: `string`):

URL of the LinkedIn post or article to scrape (e.g., https://linkedin.com/pulse/... or https://linkedin.com/posts/...)

## `use_cache` (type: `boolean`):

Use cached results if available to reduce costs. When disabled, the actor omits the cache flag because Scrappa does not accept use_cache=0.

## `maximum_cache_age` (type: `integer`):

Maximum age of cached results in seconds. Must be at least 1.

## Actor input object example

```json
{
  "url": "https://www.linkedin.com/posts/microsoft_worktrendindex-activity-7457369463198437376-3F4k",
  "use_cache": true,
  "maximum_cache_age": 3600
}
```

# Actor output Schema

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

All results from this run in the default dataset.

# 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 = {
    "url": "https://www.linkedin.com/posts/microsoft_worktrendindex-activity-7457369463198437376-3F4k"
};

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

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

```

## MCP server setup

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