# Linkedin Posts (`data_dino/linkedin-posts`) Actor

Scrape LinkedIn posts without login — full post text, author, likes, comments, media, and keyword discovery from public guest pages. Managed-proxy, retry, and challenge handling included.

- **URL**: https://apify.com/data_dino/linkedin-posts.md
- **Developed by:** [Data Dino](https://apify.com/data_dino) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 posts

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 Posts scraper

Extract posts from LinkedIn **without logging in** — no account, no cookies, no
API key. Every result comes from LinkedIn's public guest pages: post pages,
profile pages, company pages, and web-search discovery.

### What you get for each post

- Full post text and headline
- Author (name, profile/company URL, type, avatar, follower count)
- Posted date, like count, comment count
- The newest comments (up to 10 per post)
- Media — images, videos (with duration), and PDF/carousel documents (page images + transcript)
- A stable URL and LinkedIn URN for every post

### Inputs

| Field | What it does |
|---|---|
| **URLs** | One or more LinkedIn post, profile, or company page URLs. |
| **Max posts per source** | Stop after this many posts per URL. |
| **Only posts newer than date** | Ignore posts older than an ISO date. |
| **Deep scrape** | On by default: fetch each post page for comments and media. |
| **Comments per post** | How many newest comments to capture (server caps at 10). |
| **Fetch document details** | Pull every page image plus transcript for PDF/carousel posts. |
| **Include raw data** | Attach the raw structured data node to each post. |

### How it works

1. A **post URL** returns that post in full.
2. A **profile or company URL** returns the latest public posts (about 5–7), then
   uses web-search discovery to find more posts by that author.
3. **Keyword discovery** (via the search URL form) finds posts on a topic across
   the web, then enriches each one.
4. Everything runs through a managed residential proxy with automatic retries, so
   the built-in `cf_clearance`-style challenge handling is already handled for you.

### Notes

- The list of *individual likers* is only visible to signed-in members, so only
  the like **count** is public.
- Keyword results depend on web search indexing and are not a complete LinkedIn feed.

This actor was built by reverse-engineering LinkedIn's public guest surfaces. Use
it for personal research and automation, and respect LinkedIn's terms of service.

# Actor input Schema

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

Full LinkedIn post, profile, or company page URLs. A company/profile URL returns its latest public posts; a post URL returns that one post fully enriched.

## `limitPerSource` (type: `integer`):

Stop after this many posts per URL. Profiles/companies render only ~5–7 public posts; the rest come from web-search discovery.

## `scrapeUntil` (type: `string`):

ISO date (e.g. 2025-01-01). Posts older than this stop a source.

## `deepScrape` (type: `boolean`):

Fetch each post page for the full text, comments, and media. Disable to keep only seed data from profile/company pages.

## `numComments` (type: `integer`):

How many newest comments to capture per post (server caps at 10).

## `numLikes` (type: `integer`):

Accepted for compatibility with the reference actor. The list of individual likers is behind LinkedIn's member login, so only the like count is public.

## `fetchDocumentDetails` (type: `boolean`):

For document posts (PDFs, carousels), fetch every page image plus the transcript when available.

## `rawData` (type: `boolean`):

Attach the raw schema.org JSON-LD node to each post.

## Actor input object example

```json
{
  "urls": [
    "https://www.linkedin.com/company/amazon"
  ],
  "limitPerSource": 10,
  "scrapeUntil": "2025-01-01",
  "deepScrape": true,
  "numComments": 5,
  "numLikes": 0,
  "fetchDocumentDetails": false,
  "rawData": false
}
```

# Actor output Schema

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

All scraped LinkedIn posts, one item per row. Field shape: type (post|article), id, urn, url, author{name,url,type,image,followers}, postedAt, headline, text, hashtags\[], likes, commentsCount, comments\[{author{name,url},text,postedAt,likes}], media\[{type,url,thumbnail,duration,page}], document{manifestUrl,pages\[],transcript\[],transcribedDocumentUrl}, isVideo, isDocument, isRepost, partial, enriched, source{url,type}, scrapedAt. 'partial' is true when the post page itself was unavailable; 'enriched' is false when only seed data came from a profile/company page.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("data_dino/linkedin-posts").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("data_dino/linkedin-posts").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 '{}' |
apify call data_dino/linkedin-posts --silent --output-dataset

```

## MCP server setup

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

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/JbcHtSfdkeMt7g4xB/builds/MuSj8ZKocl8u1jtA9/openapi.json
