# Linkedin Post Scraper (`codenest/linkedin-post-scraper`) Actor

Extract complete LinkedIn post data including titles, descriptions, images, videos, engagement metrics (likes/comments), author details, and publication timestamps. Get structured JSON output with media download URLs for easy archiving and analysis.

- **URL**: https://apify.com/codenest/linkedin-post-scraper.md
- **Developed by:** [CodeNest](https://apify.com/codenest) (community)
- **Categories:** Social media, Automation, Other
- **Stats:** 5 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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 - Professional LinkedIn Content Extraction Tool

**Effortlessly extract and archive LinkedIn posts with our enterprise-grade **LinkedIn Post Scraper**! This powerful Apify actor enables you to batch scrape LinkedIn posts while preserving comprehensive metadata, media assets, and engagement metrics.**

---

### 📋 Overview
Need to monitor LinkedIn content or analyze professional conversations? Our **LinkedIn Post Scraper** delivers:

- 📊 **Complete Post Data**: Titles, descriptions, timestamps, and engagement metrics
- 🖼️ **Media Extraction**: Images, videos, and thumbnails from posts
- 👤 **Author Details**: Profile information, organization data, and creator URLs
- 📈 **Engagement Analytics**: Like counts, comment counts, and interaction metrics
- 🔄 **Batch Processing**: Scrape 100+ LinkedIn posts per run

Perfect for social media managers 📱, market researchers 📊, recruitment agencies 👥, and business intelligence teams 📈 who need reliable **LinkedIn Post Scraper** solutions!

---

### 🎯 Core Capabilities/Key Features

#### 📝 Post Content Extraction
- **Full Text Capture**: Complete post titles and descriptions
- **URL Preservation**: Original post URLs with UTM parameters
- **Content Classification**: Auto-detection of post types (image/video/text)
- **Hashtag Extraction**: Track trending topics and campaigns

#### 🖼️ Media Asset Management
- **Image Downloads**: High-quality images from posts
- **Video Extraction**: Download LinkedIn videos with multiple quality options
- **Thumbnail Generation**: Preview images for all media types
- **Multiple Sources**: OG images, HTML regex, and embedded media

#### 👤 Author & Creator Data
- **Profile Information**: Author names, slugs, and URLs
- **Organization Details**: Company pages and creator types
- **Profile Images**: Download author profile pictures
- **Creator Attribution**: Clear identification of content sources

#### 📊 Engagement Metrics
- **Like Counts**: Total reactions per post
- **Comment Analytics**: Number of discussions generated
- **Timestamps**: Precise publication dates (ISO format)
- **Activity IDs**: Unique identifiers for each post

---

### ⚙️ Input Configuration

Simply enter the LinkedIn post URLs in the Input Section, then click the "start" button and wait for the results. The **LinkedIn Post Scraper** accepts URLs in this format:

```json
{
  "urls": [
    {
      "url": "https://www.linkedin.com/posts/jasongrad_9-speakers-just-locked-in-for-prague-crawl-ugcPost-7437113477531574272-1Rho"
    },
    {
      "url": "https://www.linkedin.com/posts/zip-game_zip-linkedingames-activity-7437392134107975681-8Ur_"
    }
  ]
}
````

#### 📌 Input Specifications

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | Array | Yes | LinkedIn post URLs to process |
| `url` | String | Yes | Valid LinkedIn post URL (posts/ or ugcPost/ format) |

***

### 📤 Output Structure

The **LinkedIn Post Scraper** returns comprehensive JSON output like this:

```json
[
  {
    "input_url": "https://www.linkedin.com/posts/jasongrad_9-speakers-just-locked-in-for-prague-crawl-ugcPost-7437113477531574272-1Rho",
    "identifiers": {
      "url_slug": "jasongrad_9-speakers-just-locked-in-for-prague-crawl-ugcPost-7437113477531574272-1Rho",
      "author_slug": "jasongrad"
    },
    "post_type": "image",
    "title": "9 speakers just locked in for Prague Crawl 2026...",
    "description": "9 speakers just locked in for Prague Crawl 2026...",
    "published_time": "2026-03-10T12:33:48.265Z",
    "like_count": 120,
    "comment_count": 26,
    "thumbnail_url": "https://media.licdn.com/.../thumbnail.jpg",
    "image_download_url": "https://media.licdn.com/.../image.jpg",
    "media": [
      {
        "type": "image",
        "url": "https://media.licdn.com/.../image1.jpg",
        "source": "og:image"
      }
    ]
  }
]
```

#### 📑 Output Field Documentation

**🔍 Post Identification**
| Field | Description |
|-------|-------------|
| `input_url` | Original LinkedIn post URL provided |
| `identifiers.url_slug` | URL path identifier for the post |
| `identifiers.activity_id` | Unique LinkedIn activity ID |
| `identifiers.author_slug` | Author's profile identifier |
| `post_type` | Content type (image/video/text) |

**📄 Content Fields**
| Field | Description |
|-------|-------------|
| `title` | Post title with truncated preview |
| `description` | Full post content and text |
| `published_time` | ISO 8601 publication timestamp |
| `creator_name` | Name of post creator/organization |
| `creator_type` | Person or Organization classification |

**📊 Engagement Metrics**
| Field | Description |
|-------|-------------|
| `like_count` | Total reactions on the post |
| `comment_count` | Number of comments received |
| `upload_date` | Alternative date format |
| `duration` | Video duration (for video posts) |

**🖼️ Media Assets**
| Field | Description |
|-------|-------------|
| `thumbnail_url` | Preview image URL |
| `image_download_url` | Primary image download link |
| `video_download_url` | Video file download URL (when available) |
| `media` | Array of all media items with types |

**🔗 Metadata Fields**
| Field | Description |
|-------|-------------|
| `og_type` | Open Graph type (article, video, etc.) |
| `og_url` | Open Graph canonical URL |
| `twitter_card` | Twitter card format |
| `site_name` | Source platform (LinkedIn) |
| `embed_url` | Embedded player URL (for videos) |
| `extractor` | Source extractor identifier |

***

### 🎬 Media Types Extracted

The **LinkedIn Post Scraper** automatically detects and extracts multiple media formats:

1. **🖼️ Images** - High-resolution post images from various sources
2. **🎥 Videos** - LinkedIn native videos with multiple quality options
3. **📸 Thumbnails** - Preview images for all media types
4. **🔄 Video+Audio** - Complete video files with audio tracks
5. **👤 Profile Images** - Author and organization profile pictures

***

### 🛠️ Technical Features

#### 🏗️ Advanced Extraction Capabilities

- **Multiple Source Detection**: OG tags, LD+JSON, HTML regex patterns
- **Format Identification**: Automatic media type classification
- **Quality Selection**: Multiple video resolution options (360p, 640p, 720p)
- **Bitrate Information**: Technical data for video quality assessment

#### 📊 Comprehensive Metadata

- **Engagement Tracking**: Real-time like and comment counts
- **Temporal Data**: Precise publication timestamps
- **Author Attribution**: Complete creator information
- **URL Intelligence**: Activity IDs and slug extraction

#### 🔄 Reliability Features

- **URL Normalization**: Automatic UTM parameter handling
- **Error Resilience**: Graceful handling of missing media
- **Batch Processing**: Efficient multiple post extraction
- **Format Validation**: Ensures data consistency

***

### 💼 Use Cases

- **📱 Social Media Managers** – Monitor brand mentions and competitor posts with our **LinkedIn Post Scraper**
- **📊 Market Researchers** – Analyze industry trends and conversation patterns
- **👥 Recruitment Agencies** – Track employer branding and company updates
- **📈 Business Intelligence** – Gather competitive intelligence from professional content
- **🎓 Academic Researchers** – Study professional social media engagement
- **🏢 Corporate Communications** – Archive internal and external communications

***

### ✅ Why Choose Our LinkedIn Post Scraper?

- **⚡ Reliable Performance**: Stable and efficient extraction process
- **🖥️ User-Friendly**: Simple interface for both beginners and advanced users
- **🔄 Regular Updates**: Maintained for LinkedIn platform compatibility
- **📊 Comprehensive Data**: All post metadata in one structured output
- **🎯 Accurate Extraction**: Precise engagement metrics and timestamps

***

### ⚠️ Limitations

- Only works with **public LinkedIn posts** (non-restricted content)
- May be subject to LinkedIn's rate limiting based on usage patterns
- Video extraction depends on LinkedIn's CDN availability

***

### 📧 Need Customization?

Want \*custom post fields, \*\*enterprise batch processing, or \**advanced analytics integration* with your **LinkedIn Post Scraper**?

✉️ Email **<codenest2.0@gmail.com>** for tailored solutions!

***

# Actor input Schema

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

List of public LinkedIn post URLs.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.linkedin.com/posts/zip-game_zip-linkedingames-activity-7439566474916290561-eZfh"
    }
  ]
}
```

# 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": [
        {
            "url": "https://www.linkedin.com/posts/zip-game_zip-linkedingames-activity-7439566474916290561-eZfh"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/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": [{ "url": "https://www.linkedin.com/posts/zip-game_zip-linkedingames-activity-7439566474916290561-eZfh" }] }

# Run the Actor and wait for it to finish
run = client.actor("codenest/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": [
    {
      "url": "https://www.linkedin.com/posts/zip-game_zip-linkedingames-activity-7439566474916290561-eZfh"
    }
  ]
}' |
apify call codenest/linkedin-post-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Linkedin Post Scraper",
        "description": "Extract complete LinkedIn post data including titles, descriptions, images, videos, engagement metrics (likes/comments), author details, and publication timestamps. Get structured JSON output with media download URLs for easy archiving and analysis.",
        "version": "0.0",
        "x-build-id": "gDTMfBMSeyeN1behs"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codenest~linkedin-post-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codenest-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/codenest~linkedin-post-scraper/runs": {
            "post": {
                "operationId": "runs-sync-codenest-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/codenest~linkedin-post-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-codenest-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",
                "properties": {
                    "urls": {
                        "title": "LinkedIn Post URLs",
                        "type": "array",
                        "description": "List of public LinkedIn post URLs.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "url": {
                                    "title": "Post URL",
                                    "description": "Example: https://www.linkedin.com/posts/username_slug-activity-1234567890-abcd",
                                    "type": "string",
                                    "pattern": "^https?://(?:www\\.)?linkedin\\.com/posts/[\\w-]+"
                                }
                            },
                            "required": [
                                "url"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
