# LinkedIn Profile And Company Posts Scraper with Video & Article (`scrapepilotapi/linkedin-profile-and-company-posts-scraper`) Actor

LinkedIn Profile and Company Posts Scraper 💼📢 extracts public profile details, company posts, captions, reactions, comments, and engagement metrics in one run. Ideal for lead research, competitor tracking, recruitment insights, and content analysis. 🚀📊

- **URL**: https://apify.com/scrapepilotapi/linkedin-profile-and-company-posts-scraper.md
- **Developed by:** [ScrapePilot](https://apify.com/scrapepilotapi) (community)
- **Categories:** Social media, Lead generation, Jobs
- **Stats:** 17 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$19.99/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 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 Profile & Company Posts Scraper With Video & Article Details

Scrape LinkedIn company and profile posts with **real per-post format detection** — post, video, article, or publication — read directly from LinkedIn's own page data, plus the video and article detail fields most LinkedIn post scrapers never extract at all.

### What this actor does

Point it at one or more LinkedIn company or profile URLs and it returns every recent post as a structured dataset row: author, text, engagement counts, and — unlike a plain LinkedIn post scraper or LinkedIn content scraper — the post's **real format**, resolved from the page's own embedded `application/ld+json` data instead of a guessed image-or-text label. When a post is a video, article, or LinkedIn Pulse publication, the matching detail fields (video URL/thumbnail/duration, article headline/URL/cover image, publication name/description) are extracted alongside the standard post fields.

### Use cases

- **Content-format auditing** — see exactly which posts on a company or profile page are native posts vs. video vs. LinkedIn articles vs. publications, for content-strategy or competitor research.
- **Video content discovery** — pull real `video_url`/`thumbnail_url`/`duration` for every video post on a profile or company page, without manually opening each one.
- **Article and thought-leadership tracking** — collect every LinkedIn Pulse article a person or company has published, with headline, URL, and cover image, for research or lead-gen content mapping.
- **LinkedIn post scraping for social listening** — bulk-scrape posts across many company/profile URLs in one run with automatic proxy fallback.
- **Reshare/repost detection** — flag posts that are reshares of someone else's content (`is_reshare`), with the original author's name and profile when LinkedIn exposes that data.

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `urls` | array | Yes | LinkedIn company or profile URLs to scrape. |
| `maxPosts` | integer | No | Max posts per URL (default: 10). |
| `targetType` | string | No | `company`, `profile`, or `both` (default: both). |
| `postFormats` | array | No | Only keep posts matching these real formats: `post`, `video`, `article`, `publication` (default: all four). |
| `readPostFormat` | boolean | No | Resolve each post's real format from LinkedIn's own page data instead of the base image-or-text guess (default: true). |
| `includeVideoDetails` | boolean | No | For video posts, add `video_url`, `thumbnail_url`, `duration`, `width`, `height`, `embed_url`, `upload_date` (default: true). |
| `includeArticleDetails` | boolean | No | For article/publication posts, add `article_headline`, `article_url`, `article_cover_image`, `publication_name`, `publication_description`, `publication_url` (default: true). |
| `includeOriginalAuthorOnReposts` | boolean | No | When a repost/reshare block is found, add `is_reshare`, `original_author_name`, `original_author_url`, `original_author_type`, `original_author_followers`, `original_post_text` (default: true). Coverage is low — LinkedIn rarely exposes this block; `is_reshare: false` means "no reshare block found," not "confirmed original post." |
| `proxyConfiguration` | object | No | Apify proxy settings. Default: no proxy; the actor automatically escalates to datacenter then residential proxy if LinkedIn blocks a request. |

**Example input**

```json
{
  "urls": [
    "https://www.linkedin.com/company/google/",
    "https://www.linkedin.com/in/username"
  ],
  "maxPosts": 20,
  "targetType": "both",
  "postFormats": ["post", "video", "article", "publication"],
  "readPostFormat": true,
  "includeVideoDetails": true,
  "includeArticleDetails": true,
  "includeOriginalAuthorOnReposts": true,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### Output

Every row includes the standard post fields — `urn`, `text`, `url`, `postedAtTimestamp`, `postedAtISO`, `timeSincePosted`, `authorType`, `authorProfileUrl`, `authorProfileId`, `authorFullName`, `authorHeadline`, `image`, `images`, `author`, `comments`, `reactions`, `numLikes`, `numComments`, and related flags — plus:

- `post_format`, `schema_type` — the real, page-derived format label (`post` / `video` / `article` / `publication`) and its raw LinkedIn JSON-LD `@type`.
- `format_filter_passed` — whether this row matched the `postFormats` filter.
- Video fields (video posts only): `video_url`, `thumbnail_url`, `duration`, `width`, `height`, `embed_url`, `upload_date`.
- Article/publication fields (article or publication posts only): `article_headline`, `article_url`, `article_cover_image`, `publication_name`, `publication_description`, `publication_url`.
- Reshare fields: `is_reshare`, `original_post_text`, `original_author_name`, `original_author_url`, `original_author_type`, `original_author_followers`.

**Example output row (article post)**

```json
{
  "urn": "urn:li:activity:...",
  "url": "https://www.linkedin.com/posts/...",
  "post_format": "article",
  "schema_type": "Article",
  "format_filter_passed": true,
  "article_headline": "Speed Is Becoming a Liability, Taste Is the Advantage",
  "article_url": "https://www.linkedin.com/pulse/speed-becoming-liability-taste-advantage-...",
  "authorFullName": "...",
  "numLikes": 42
}
```

### How to run

1. Open [Apify Console](https://console.apify.com) → **Actors**.
2. Select **LinkedIn Profile & Company Posts Scraper With Video & Article**.
3. Set `urls` and any optional fields.
4. Click **Start**.
5. Check the **Log** for progress and proxy fallback messages.
6. Use the **Dataset** in the **Output** tab, or download it (JSON/CSV/Excel).

### Notes

- Format detection and video/article fields are read directly from LinkedIn's own page data — nothing is guessed or computed from text.
- Reshare/original-author detection has low coverage by design: LinkedIn rarely renders the underlying data block. Treat `is_reshare: false` as "not detected," not as a guarantee the post is original.
- Data is from publicly available pages only. You are responsible for compliance with applicable laws (privacy, data protection, platform terms of use).

# Actor input Schema

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

Add one or more company or profile URLs to scrape (e.g. company page, personal profile). 📋 Paste each URL on a new line.

## `maxPosts` (type: `integer`):

Maximum number of posts to collect per URL. 🎯 Keep lower for faster runs (e.g. 10–50).

## `targetType` (type: `string`):

Filter which URL types to scrape: companies only, profiles only, or both. 👔 Company | 👤 Profile | 🔀 Both

## `postFormats` (type: `array`):

Only keep posts matching these real formats (read from LinkedIn's own page data, not guessed). Default: all four. 📝 Post | 🎬 Video | 📰 Article | 📚 Publication

## `readPostFormat` (type: `boolean`):

When true (default), resolves each post's real format (post/video/article/publication) from LinkedIn's own page data instead of the base actor's broken image-or-text guess. Turn off only for a faster run if format labeling doesn't matter to you.

## `includeVideoDetails` (type: `boolean`):

For posts detected as video, add video\_url, thumbnail\_url, duration, width, height, embed\_url and upload\_date fields (read directly from LinkedIn's video metadata). Default: true.

## `includeArticleDetails` (type: `boolean`):

For posts detected as article or publication, add article\_headline, article\_url, article\_cover\_image, publication\_name, publication\_description and publication\_url fields. Default: true.

## `includeOriginalAuthorOnReposts` (type: `boolean`):

When a repost/reshare block is found on the page, add is\_reshare, original\_author\_name, original\_author\_url, original\_author\_type, original\_author\_followers and original\_post\_text. ⚠️ Coverage is low (LinkedIn rarely exposes this block) — is\_reshare:false means 'no reshare block found', not 'confirmed original post'. Default: true.

## `proxyConfiguration` (type: `object`):

By default uses no proxy. If LinkedIn blocks requests, the actor will automatically try datacenter then residential proxy. 🔒 Optional: enable Apify Proxy here to start with a specific setup.

## Actor input object example

```json
{
  "urls": [
    "https://www.linkedin.com/company/google/",
    "https://www.linkedin.com/in/ajjames"
  ],
  "maxPosts": 10,
  "targetType": "both",
  "postFormats": [
    "post",
    "video",
    "article",
    "publication"
  ],
  "readPostFormat": true,
  "includeVideoDetails": true,
  "includeArticleDetails": true,
  "includeOriginalAuthorOnReposts": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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": [
        "https://www.linkedin.com/company/google/",
        "https://www.linkedin.com/in/ajjames"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapepilotapi/linkedin-profile-and-company-posts-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": [
        "https://www.linkedin.com/company/google/",
        "https://www.linkedin.com/in/ajjames",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapepilotapi/linkedin-profile-and-company-posts-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": [
    "https://www.linkedin.com/company/google/",
    "https://www.linkedin.com/in/ajjames"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapepilotapi/linkedin-profile-and-company-posts-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6lfTfECaddXjZT38k/builds/0nMVcI45VohLjUl7l/openapi.json
