# Profile Posts Scraper for LinkedIn \[No Cookies] (`apimaestro/linkedin-profile-posts`) Actor

Scrape LinkedIn posts data for a given LinkedIn profile including post content, reactions, comments count, and media attachments

- **URL**: https://apify.com/apimaestro/linkedin-profile-posts.md
- **Developed by:** [API Maestro](https://apify.com/apimaestro) (community)
- **Categories:** Social media, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 23,877 total users, 1,852 monthly users, 98.3% runs succeeded, 667 bookmarks
- **User rating**: 4.84 out of 5 stars

## Pricing

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

### 🚀 Scrape LinkedIn Posts Data in Seconds

The Best linkedin scraper to get recent posts related data for any given LinkedIn profile. Get comprehensive data including post content, reactions, comments count, and media attachments...

#### For other LinkedIn actors, check: https://apify.com/apimaestro

### ✨ Key Features

- No account needed:  Don't risk your account security by sharing your cookies and don't get your account restricted or banned!
- Recent posts and activity
- Post content and media
- Reaction counts by type (likes, comments, etc.)
- Post URLs for sharing
- Author details
- Media attachments (images, articles, etc.)
- Pagination support for older posts

### 🔧 Simple Usage

Simply provide a LinkedIn profile URL or username to get their recent posts and activity. The username is the last part of a LinkedIn profile URL (e.g., 'satyanadella' from linkedin.com/in/satyanadella).

### Advanced: Pagination Support

### Manual Pagination

Each run returns up to 100 posts per page.

For accessing older posts:

1. Make first run with `page_number = 1` and get first 100 results
2. Get `pagination_token` from run output of page 1
3. Make second run with that `pagination_token` and `page_number = 2` to get next 100 results
4. For next 100 results, do the same by using `pagination_token` from second run output

### Automatic Pagination

Simply set the total number of posts you want the actor to scrape on `Total Posts to Scrape` field.

### 📊 Output Structure

```json
{
  "success": true,
  "message": "response retrieved successfully",
  "data": {
    "posts": [
      {
        "urn": "7123456789012345678",
        "full_urn": "urn:li:ugcPost:7123456789012345678",
        "posted_at": {
          "date": "2025-05-15 14:30:20",
          "relative": "2 days ago • Visible to anyone on or off LinkedIn",
          "timestamp": 1745678901234
        },
        "text": "Sample post text content. This is where the LinkedIn post text appears.",
        "url": "https://www.linkedin.com/posts/username_sample-activity-7123456789012345678-AbCd",
        "post_type": "regular",
        "author": {
          "first_name": "John",
          "last_name": "Doe",
          "headline": "CEO at Example Company",
          "username": "johndoe",
          "profile_url": "https://www.linkedin.com/in/johndoe",
          "profile_picture": "https://media.licdn.com/dms/image/profile-pic.jpg"
        },
        "stats": {
          "total_reactions": 123,
          "like": 100,
          "support": 5,
          "love": 10,
          "insight": 3,
          "celebrate": 5,
          "comments": 15,
          "reposts": 7
        },
        "media": {
          "type": "image",
          "url": "https://media.licdn.com/dms/image/sample-image.jpg",
          "thumbnail": "https://media.licdn.com/dms/image/sample-thumbnail.jpg"
        }
      },
      {
        "urn": "7123456789987654321",
        "full_urn": "urn:li:ugcPost:7123456789987654321",
        "posted_at": {
          "date": "2025-05-14 10:15:30",
          "relative": "3 days ago • Visible to anyone on or off LinkedIn",
          "timestamp": 1745578901234
        },
        "text": "This is a reshared post with a quote added by the user.",
        "url": "https://www.linkedin.com/posts/username_example-activity-7123456789987654321-XyZw",
        "post_type": "quote",
        "author": {
          "first_name": "John",
          "last_name": "Doe",
          "headline": "CEO at Example Company",
          "username": "johndoe",
          "profile_url": "https://www.linkedin.com/in/johndoe",
          "profile_picture": "https://media.licdn.com/dms/image/profile-pic.jpg"
        },
        "stats": {
          "total_reactions": 45,
          "like": 40,
          "support": 0,
          "love": 3,
          "insight": 1,
          "celebrate": 1,
          "comments": 5,
          "reposts": 2
        },
        "reshared_post": {
          "urn": "7123456788888888888",
          "posted_at": {
            "date": "2025-05-13 09:30:00",
            "relative": "4 days ago • Visible to anyone on or off LinkedIn",
            "timestamp": 1745488901234
          },
          "text": "Original post that was reshared.",
          "url": "https://www.linkedin.com/posts/janedoe_example-activity-7123456788888888888-AbCd",
          "post_type": "regular",
          "author": {
            "first_name": "Jane",
            "last_name": "Doe",
            "headline": "Product Manager at Example Corp",
            "username": "janedoe",
            "profile_url": "https://www.linkedin.com/in/janedoe",
            "profile_picture": "https://media.licdn.com/dms/image/jane-profile-pic.jpg"
          },
          "stats": {
            "total_reactions": 250,
            "like": 200,
            "support": 10,
            "love": 25,
            "insight": 5,
            "celebrate": 10,
            "comments": 30,
            "reposts": 15
          },
          "media": {
            "type": "video",
            "url": "https://dms.licdn.com/playlist/sample-video.mp4",
            "thumbnail": "https://media.licdn.com/dms/image/video-thumbnail.jpg"
          }
        }
      },
      {
        "urn": "7123456777777777777",
        "full_urn": "urn:li:activity:7123456777777777777",
        "posted_at": {
          "date": "2025-05-12 16:45:30",
          "relative": "5 days ago • Visible to anyone on or off LinkedIn",
          "timestamp": 1745398901234
        },
        "text": "Sharing an interesting article I found.",
        "url": "https://www.linkedin.com/posts/johndoe_article-activity-7123456777777777777-LmNo",
        "post_type": "regular",
        "author": {
          "first_name": "John",
          "last_name": "Doe",
          "headline": "CEO at Example Company",
          "username": "johndoe",
          "profile_url": "https://www.linkedin.com/in/johndoe",
          "profile_picture": "https://media.licdn.com/dms/image/profile-pic.jpg"
        },
        "stats": {
          "total_reactions": 85,
          "like": 70,
          "support": 0,
          "love": 5,
          "insight": 10,
          "celebrate": 0,
          "comments": 12,
          "reposts": 8
        },
        "article": {
          "url": "https://example.com/sample-article",
          "title": "Sample Article Title",
          "subtitle": "example.com",
          "thumbnail": "https://media.licdn.com/dms/image/article-thumbnail.jpg"
        }
      },
      {
        "urn": "7123456666666666666",
        "full_urn": "urn:li:ugcPost:7123456666666666666",
        "posted_at": {
          "date": "2025-05-10 11:20:15",
          "relative": "1 week ago • Visible to anyone on or off LinkedIn",
          "timestamp": 1745218901234
        },
        "text": "Sharing this important document with my network.",
        "url": "https://www.linkedin.com/posts/johndoe_document-activity-7123456666666666666-PqRs",
        "post_type": "regular",
        "author": {
          "first_name": "John",
          "last_name": "Doe",
          "headline": "CEO at Example Company",
          "username": "johndoe",
          "profile_url": "https://www.linkedin.com/in/johndoe",
          "profile_picture": "https://media.licdn.com/dms/image/profile-pic.jpg"
        },
        "stats": {
          "total_reactions": 32,
          "like": 28,
          "support": 0,
          "love": 2,
          "insight": 2,
          "celebrate": 0,
          "comments": 5,
          "reposts": 3
        },
        "document": {
          "title": "Sample Document Title",
          "page_count": 12,
          "url": "https://media.licdn.com/dms/document/sample-document.pdf",
          "thumbnail": "https://media.licdn.com/dms/image/document-thumbnail.jpg"
        }
      },
      {
        "urn": "7123455555555555555",
        "full_urn": "urn:li:ugcPost:7123455555555555555",
        "posted_at": {
          "date": "2025-05-05 09:15:00",
          "relative": "2 weeks ago • Visible to anyone on or off LinkedIn",
          "timestamp": 1744778901234
        },
        "text": "Check out these photos from our recent company event!",
        "url": "https://www.linkedin.com/posts/johndoe_event-activity-7123455555555555555-TuVw",
        "post_type": "regular",
        "author": {
          "first_name": "John",
          "last_name": "Doe",
          "headline": "CEO at Example Company",
          "username": "johndoe",
          "profile_url": "https://www.linkedin.com/in/johndoe",
          "profile_picture": "https://media.licdn.com/dms/image/profile-pic.jpg"
        },
        "stats": {
          "total_reactions": 145,
          "like": 120,
          "support": 0,
          "love": 20,
          "insight": 0,
          "celebrate": 5,
          "comments": 18,
          "reposts": 7
        },
        "media": {
          "type": "images",
          "url": "https://media.licdn.com/dms/image/main-image.jpg",
          "images": [
            {
              "url": "https://media.licdn.com/dms/image/image1.jpg",
              "width": 1280,
              "height": 853
            },
            {
              "url": "https://media.licdn.com/dms/image/image2.jpg",
              "width": 1280,
              "height": 853
            },
            {
              "url": "https://media.licdn.com/dms/image/image3.jpg",
              "width": 1280,
              "height": 853
            }
          ]
        }
      }
    ],
    "pagination_token": "dXJuOmxpOmFjdGl2aXR5Ojc1MjM0NTU1NTU1NTU1NTU1NTUtMTc0NDc3ODkwMTIzNA=="
  }
}
```

<br>

***

**Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by LinkedIn Corporation. LinkedIn® is a registered trademark of LinkedIn Corporation. All trademarks are property of their respective owners.

# Actor input Schema

## `username` (type: `string`):

LinkedIn profile username (e.g., 'satyanadella' or  'linkedin.com/in/satyanadella')

## `page_number` (type: `integer`):

Page number for pagination (first page returns a pagination token for subsequent pages)

## `pagination_token` (type: `string`):

Token from previous page response for paginated requests (optional, only needed for pages after first). For example, to get result from page 2, use pagination token from response of page 1

## `limit` (type: `integer`):

Optional: Limit the number of results per page (1-100)

## `total_posts` (type: `integer`):

Enable automatic pagination: Set the total number of posts to scrape. This will override manual pagination settings.

## Actor input object example

```json
{
  "username": "satyanadella",
  "page_number": 1,
  "limit": 100
}
```

# 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("apimaestro/linkedin-profile-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("apimaestro/linkedin-profile-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 apimaestro/linkedin-profile-posts --silent --output-dataset

```

## MCP server setup

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