# LinkedIn Post Scraper API - Text, Exact Counts, Top Comments (`vonsensey/linkedin-post-scraper-api`) Actor

Public LinkedIn post links in, the full post out: text, exact reaction and comment counts, author with exact followers, images, native video URL, reshare origin, and the comments shown on the page.

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

## Pricing

from $1.50 / 1,000 job (full posting)s

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/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 API - Text, Exact Counts, Top Comments

#### The LinkedIn suite

- [LinkedIn Scraper API](https://apify.com/vonsensey/linkedin-scraper-api) — every public LinkedIn surface in one dataset
- [LinkedIn Jobs Search Scraper API](https://apify.com/vonsensey/linkedin-jobs-search-scraper-api) — keyword and location searches with filters re-checked on the posting
- [LinkedIn Job Details Scraper API](https://apify.com/vonsensey/linkedin-job-details-scraper-api) — job links or ids in, the full posting out
- [LinkedIn Company Scraper API](https://apify.com/vonsensey/linkedin-company-scraper-api) — company slugs or URLs in, exact counts and every office out
- [LinkedIn Company Posts Scraper API](https://apify.com/vonsensey/linkedin-company-posts-scraper-api) — the newest posts on a company page with exact reaction and comment counts
- [LinkedIn Pulse Article Scraper API](https://apify.com/vonsensey/linkedin-pulse-article-scraper-api) — Pulse article links in, full text and exact engagement out
- [LinkedIn Company Jobs Scraper API](https://apify.com/vonsensey/linkedin-company-jobs-scraper-api) — company pages in, their open jobs out, id resolved for you
- [LinkedIn New Jobs Scraper API](https://apify.com/vonsensey/linkedin-new-jobs-scraper-api) — put a search on a daily schedule and pay only for postings you have not seen
- [LinkedIn Profile Scraper API](https://apify.com/vonsensey/linkedin-profile-scraper-api) — public profiles with experience, education and exact follower counts — about 7 in 10 are shown, the rest are free
- [LinkedIn Profile Posts Scraper API](https://apify.com/vonsensey/linkedin-profile-posts-scraper-api) — a person's recent public posts, each read in full with exact counts

Paste LinkedIn post share links and get the full post, its exact counts, the native video and the comments shown on the page. No login, no cookies, no proxy to configure — it reads the pages LinkedIn shows to anyone. **Failures are free**: a closed job, a missing page or a page only members can see costs nothing and returns a row saying which.

**Exact numbers, not display numbers.** LinkedIn's page says "3M followers" or "10,001+ employees"; the rows carry 2,789,187 and 232,762.

### Quick start

1. Press **Start** — the defaults are a working run.
2. Replace them with your own post share links (Share > Copy link on the post).
3. Take the dataset as JSON, CSV or Excel, or via the API. Every row has a `type`; the free `coverage` row says what was asked for and what arrived.

### What people use it for

- **Brand and competitor monitoring.** What a company page is posting and how each post performs, with exact reaction and comment counts, on a schedule.
- **Engagement analysis.** Who is commenting on a post and what they say, from the comments LinkedIn shows publicly.
- **Feeding an AI agent or workflow.** One flat schema, a `type` on every row, and a free coverage row that says what was asked for and what arrived.

### What the rows look like

#### A post row

```json
{
  "type": "post",
  "activityId": "7498030724533522432",
  "url": "https://www.linkedin.com/posts/microsoft_august-2026-ai-powered-discovery-activity-7498030724533522432-IzKE",
  "author": { "name": "Microsoft", "url": "https://www.linkedin.com/company/microsoft", "type": "company", "followers": 29006766 },
  "text": "Curiosity drives discovery, sparking questions about how we can better understand our world ...",
  "publishedAt": "2026-08-25T14:57:11.372Z",
  "reactions": 745,
  "comments": 98,
  "mediaType": "article",
  "article": { "title": "August 2026: AI-powered discovery", "url": "https://www.linkedin.com/pulse/..." },
  "commentsShownCount": 10
}
```

`reactions` and `comments` are exact. With comments on, each comment LinkedIn shows on the page (about ten) is its own `comment` row with the commenter, their profile URL, the text, the date and its like count.

### What it costs

| You pay for | Price |
|---|---|
| Each post delivered | **$3.00 per 1,000 posts** |
| Add-on: each comment shown on a post | **$2.00 per 1,000 comments** |

**Free, always:** a job that has closed, a company, post or article that does not exist, a page LinkedIn only shows to signed-in members, a malformed URL, every error row, the coverage row and the run summary. A run that reads nothing costs nothing.

Set **Cost ceiling (USD)** to stop any run before it passes a number you choose; the free summary row reports what the run actually spent.

### FAQ

#### Do I need a LinkedIn login, cookies or a proxy?

No. This Actor reads the pages LinkedIn shows to anyone without an account, and it never signs in, never sends a cookie and never uses a session. Everything is handled for you and there is nothing to buy on top. Measured 2026-09-02: a full default run read 25 pages from an ordinary IP with no proxy traffic at all.

#### Can I get every comment and every reaction on a post?

No, and it says so rather than pretending. The public post page carries the exact totals and about ten comments; the list of everyone who reacted is only shown to signed-in members. You get the exact counts, the comments shown, and the native video and image URLs.

#### Which post URL should I paste?

The share link: open the post, Share > Copy link. It looks like `linkedin.com/posts/<author>_...-activity-<id>-<code>`. Links of the `/feed/update/urn:li:activity:...` form are only served to signed-in members and come back as a free row telling you that.

#### What happens to a job that closed or a page that does not exist?

It costs nothing. You get a free error row that says which (closed, not found, or only visible to members), and the run keeps going.

#### Does a run fail if everything I asked for is gone?

No. "All of these have closed" is a correct answer, not a failure, so the run succeeds and returns free rows explaining each one. Only LinkedIn actually refusing us fails a run.

#### Can I put this on a schedule without paying twice for the same data?

Yes. Turn **Monitor** on. A company, post or article whose numbers have not moved is a free row marked `unchanged`.

#### Will I be charged twice if the same thing appears twice in my input?

No. A post reached through a share link and again from a company page, or a job returned by two searches, is one row and one charge.

### Limits, stated plainly

LinkedIn shows its search results (people, companies, content), employee lists, reaction lists and Sales Navigator only to signed-in members, and serves member profiles to visitors only at its own discretion (measured 2026-09-02 from Apify's own exits: 35 of 50 ordinary profiles, and the refused ones stay refused). This Actor reads public pages only and never signs in, so it sells none of those — and says so here rather than on your invoice.

A public post page shows about ten comments and no repost count; the exact reaction and comment totals are always there.

### Use it from n8n, MCP, the API or a schedule

Built to be called by a workflow, not only from the Store form. The Actor is `vonsensey/linkedin-post-scraper-api`; every snippet below sends `{}`, which runs the defaults shown on the form — replace it with your own input.

#### n8n

Install the **Apify** community node (`@apify/n8n-nodes-apify` under *Settings → Community Nodes*, or search "Apify" on n8n Cloud). Add **Apify → Run Actor** with Actor `vonsensey/linkedin-post-scraper-api` and your input JSON, then **Apify → Get Dataset Items** on the run's `defaultDatasetId` and pipe the rows anywhere. For scheduled runs, the **On new Apify Event** trigger fires when a run of this Actor finishes.

#### MCP (Claude, Cursor, VS Code, any MCP client)

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=vonsensey/linkedin-post-scraper-api",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

Your agent then calls `vonsensey/linkedin-post-scraper-api` as a tool with the same input the form takes and reads the dataset back.

#### REST API (one call, rows in the response)

```bash
curl -X POST "https://api.apify.com/v2/acts/vonsensey~linkedin-post-scraper-api/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" -d '{}'
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("vonsensey/linkedin-post-scraper-api").call(run_input={})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row)
```

#### JavaScript

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('vonsensey/linkedin-post-scraper-api').call({});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### Make, Zapier, LangChain, CrewAI

The Apify app in **Make** and **Zapier** has a *Run an Actor* module: pick `vonsensey/linkedin-post-scraper-api`. In **LangChain** and **CrewAI** the Apify tool wrappers take the same Actor id. A daily **schedule** needs nothing but the Console: *Schedules → Create → this Actor → cron*, and the dataset fills on its own.

# Actor input Schema

## `startUrls` (type: `array`):

Paste any public LinkedIn links, mixed: company pages, showcase pages, post share links (the /posts/... form), job postings (/jobs/view/...), Pulse articles, or a jobs search URL copied from LinkedIn with its filters. Each becomes the matching row type. Links to search results, employee lists or /feed/update/ need a LinkedIn session and are returned as free rows explaining that.

## `keywords` (type: `array`):

Job titles or terms to search for. Each keyword is searched in each location, so 3 keywords and 2 locations are 6 searches. Boolean operators LinkedIn accepts in its search box (quotes, AND, OR, NOT) are passed through as typed.

## `locations` (type: `array`):

Locations as you would type them on LinkedIn: 'United States', 'London, England, United Kingdom', 'Remote'. Crossed with keywords.

## `datePosted` (type: `string`):

Only postings published within this window. Verified on 2026-09-02 to change the result set.

## `companies` (type: `array`):

Company or showcase slugs or URLs: 'microsoft', 'https://www.linkedin.com/company/apify/', a showcase URL. What you get for each is set by 'Company: what to read'.

## `companyScope` (type: `array`):

details: one company row (exact employee and follower counts, addresses, specialties, affiliated pages, featured employees, ids of the newest posts). posts: the newest posts the company page shows publicly (about ten) as post rows. jobs: every open job the company lists, up to LinkedIn's public cap of 1,000, as job rows.

## `postUrls` (type: `array`):

Public post share links in the /posts/<author>\_...-activity-<id>-<code> form (the link LinkedIn's Share > Copy link gives you). One post row each, with the comments LinkedIn shows publicly as extra rows when the option below is on.

## `includeComments` (type: `boolean`):

Adds one row per comment LinkedIn renders on the public post page, about ten per post, each with the commenter, their profile URL, the text, the date and the like count. The post row always carries the exact total comment count.

## `jobUrls` (type: `array`):

Job posting links (/jobs/view/...), search links that carry currentJobId=, or bare numeric job ids. One full job row each.

## `articleUrls` (type: `array`):

LinkedIn Pulse article links (/pulse/...). One article row each with the full text.

## `experienceLevel` (type: `array`):

Passed to LinkedIn's search and then checked against the seniority the posting itself states; a posting that does not match is neither delivered nor billed. Needs 'Read the full posting' on.

## `jobType` (type: `array`):

Passed to LinkedIn's search and then checked against the employment type the posting states; a posting that does not match is neither delivered nor billed. Needs 'Read the full posting' on.

## `workplaceType` (type: `array`):

Passed to LinkedIn's search as its remote / hybrid / on-site filter. LinkedIn's public job pages carry no structured workplace field, so this one cannot be re-checked on the posting; treat it as LinkedIn's own filtering.

## `companyFilter` (type: `array`):

Company slugs, URLs or numeric LinkedIn company ids. Slugs are resolved to the id from the public company page.

## `geoId` (type: `string`):

Optional numeric region id from a LinkedIn jobs URL (geoId=...). Used together with the free-text location.

## `easyApply` (type: `boolean`):

Passed to LinkedIn's search as its Easy Apply filter.

## `under10Applicants` (type: `boolean`):

Passed to LinkedIn's search. Verified on 2026-09-02 to change the result set.

## `titleInclude` (type: `array`):

Free filter on the listing title before the posting is opened: keep a job only if its title contains every word of at least one of these phrases (case-insensitive). Skipped jobs are neither read nor billed.

## `titleExclude` (type: `array`):

Free filter: drop a job if its title contains any of these words or phrases. Skipped jobs are neither read nor billed.

## `excludeJobIds` (type: `array`):

Job ids you already have. They are never opened and never billed.

## `maxItemsPerQuery` (type: `integer`):

Cap per keyword-and-location search. LinkedIn's public search stops at about 1,000 results; add locations or a shorter date window to go deeper.

## `includeJobDetails` (type: `boolean`):

On: each job is opened and delivered in full (description, seniority, employment type, function, industries, applicants, salary when stated) as a 'job' row. Off: the listing card only (title, company, location, exact posted date, badges) as a cheaper 'job-card' row, ten per request.

## `includeCompany` (type: `boolean`):

For job searches: also deliver one company row per distinct company in the results. Charged once per company, never per job.

## `monitorChangesOnly` (type: `boolean`):

For scheduled runs. The Actor remembers the job ids it delivered for each search and the counts it saw on each company, post and article. On a re-run, jobs you already received are skipped and a company or post whose numbers have not moved is a free 'unchanged' row. Each executed search is still billed as work done.

## `maxItems` (type: `integer`):

Hard cap on billable rows for the whole run, all types together.

## `maxCostUsd` (type: `integer`):

Stop the run before it spends more than this, computed from the live event prices. Leave empty for no ceiling. The free summary row always reports what the run actually spent.

## `useProxy` (type: `boolean`):

Not normally needed. Jobs, company pages, posts and articles are read without any proxy; the Actor escalates to a residential exit by itself when LinkedIn refuses a request. Turn this on only if you have been asked to.

## Actor input object example

```json
{
  "datePosted": "any",
  "companyScope": [
    "details"
  ],
  "postUrls": [
    "https://www.linkedin.com/posts/microsoft_august-2026-ai-powered-discovery-activity-7498030724533522432-IzKE",
    "https://www.linkedin.com/posts/bradsmi_microsoft-is-investing-5-million-to-support-activity-7498837670048010240-N2WG",
    "https://www.linkedin.com/posts/apify_a-competitor-pricing-check-or-a-reddit-inc-activity-7500533674992525312-OpgU"
  ],
  "includeComments": true,
  "easyApply": false,
  "under10Applicants": false,
  "maxItemsPerQuery": 100,
  "includeJobDetails": true,
  "includeCompany": false,
  "monitorChangesOnly": false,
  "maxItems": 100,
  "useProxy": false
}
```

# Actor output Schema

## `dataset` (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 = {
    "postUrls": [
        "https://www.linkedin.com/posts/microsoft_august-2026-ai-powered-discovery-activity-7498030724533522432-IzKE",
        "https://www.linkedin.com/posts/bradsmi_microsoft-is-investing-5-million-to-support-activity-7498837670048010240-N2WG",
        "https://www.linkedin.com/posts/apify_a-competitor-pricing-check-or-a-reddit-inc-activity-7500533674992525312-OpgU"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vonsensey/linkedin-post-scraper-api").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 = { "postUrls": [
        "https://www.linkedin.com/posts/microsoft_august-2026-ai-powered-discovery-activity-7498030724533522432-IzKE",
        "https://www.linkedin.com/posts/bradsmi_microsoft-is-investing-5-million-to-support-activity-7498837670048010240-N2WG",
        "https://www.linkedin.com/posts/apify_a-competitor-pricing-check-or-a-reddit-inc-activity-7500533674992525312-OpgU",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("vonsensey/linkedin-post-scraper-api").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 '{
  "postUrls": [
    "https://www.linkedin.com/posts/microsoft_august-2026-ai-powered-discovery-activity-7498030724533522432-IzKE",
    "https://www.linkedin.com/posts/bradsmi_microsoft-is-investing-5-million-to-support-activity-7498837670048010240-N2WG",
    "https://www.linkedin.com/posts/apify_a-competitor-pricing-check-or-a-reddit-inc-activity-7500533674992525312-OpgU"
  ]
}' |
apify call vonsensey/linkedin-post-scraper-api --silent --output-dataset

```

## MCP server setup

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

```

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/3cxX97mOJOs2jSEgF/builds/sJDgfBkci5qDsfl53/openapi.json
