# Discover LinkedIn Company Posts (`pratikdani/discover-linkedin-company-posts`) Actor

The Discover LinkedIn Posts by Company URL Actor extracts and provides detailed information about posts from a specified LinkedIn company profile URL.

- **URL**: https://apify.com/pratikdani/discover-linkedin-company-posts.md
- **Developed by:** [Pratik Dani](https://apify.com/pratikdani) (community)
- **Categories:** Social media, Developer tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 224 total users, 7 monthly users, 95.5% runs succeeded, 7 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.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

## Discover LinkedIn Posts by Company URL Actor

### Overview

The **Discover LinkedIn Posts by Company URL Actor** tool extracts all posts from a valid LinkedIn company profile URL. It provides detailed insights into each post, including the title, post text, date posted, media links, and more.
Interested in using this scraper? Get it here: [LinkedIn Posts Scraper](https://apify.com/pratikdani/discover-linkedin-company-posts).

### Features

- Extract posts from a LinkedIn company profile using the company URL.
- Return detailed post data such as text, media, likes, and comments.
- Provide post metadata like date posted and user follower count.
- Supports extraction of videos and other media content from the posts.

### Output Fields

Each post's output includes the following fields:

| **Field Name**          | **Type**            | **Description**                                                                                           |
|-------------------------|---------------------|-----------------------------------------------------------------------------------------------------------|
| `url`                   | `string`            | The URL of the LinkedIn post.                                                                             |
| `id`                    | `string`            | Unique identifier for the post.                                                                           |
| `user_id`               | `string` or `null`  | User ID (if available).                                                                                   |
| `use_url`               | `string`            | LinkedIn company URL.                                                                                     |
| `title`                 | `string`            | Title of the post.                                                                                         |
| `headline`              | `string`            | A brief headline for the post.                                                                             |
| `post_text`             | `string`            | The main content of the post.                                                                              |
| `date_posted`           | `string`            | Timestamp of when the post was made.                                                                       |
| `hashtags`              | `string` or `null`  | Any hashtags associated with the post (if applicable).                                                     |
| `embedded_links`        | `string` or `null`  | Links embedded in the post (if any).                                                                      |
| `images`                | `string` or `null`  | Image URLs associated with the post (if available).                                                       |
| `videos`                | `array` of `string` | Video URLs associated with the post.                                                                      |
| `num_likes`             | `integer`           | The number of likes the post has received.                                                                |
| `num_comments`          | `integer`           | The number of comments on the post.                                                                       |
| `more_articles_by_user` | `array` or `null`   | Other articles posted by the user (if available).                                                         |
| `more_relevant_posts`   | `array` or `null`   | Other posts relevant to the company (if available).                                                       |
| `top_visible_comments`  | `array` or `null`   | Top visible comments (if applicable).                                                                    |
| `user_followers`        | `integer`           | The follower count of the user/company.                                                                   |
| `user_posts`            | `integer`           | The total number of posts made by the user/company.                                                       |
| `user_articles`         | `integer`           | The total number of articles posted by the user/company.                                                  |
| `post_type`             | `string`            | Type of post (e.g., "post").                                                                               |
| `account_type`          | `string`            | The account type of the user (e.g., "Organization").                                                      |
| `post_text_html`        | `string`            | HTML version of the post text.                                                                            |
| `repost`                | `object`            | Information on any repost of the original post (if applicable).                                           |
| `tagged_companies`      | `array` of `string` | Any companies tagged in the post.                                                                         |
| `tagged_people`         | `array` of `string` | Any people tagged in the post.                                                                            |
| `user_title`            | `string`            | Title of the user (e.g., follower count).                                                                 |
| `timestamp`             | `string`            | The timestamp of the data extraction.                                                                     |
| `input`                 | `object`            | Input URL of the post.                                                                                    |
| `discovery_input`       | `object`            | The input URL of the company profile.                                                                     |

### Example Output

```json
[
  {
    "url": "https://www.linkedin.com/posts/green-philly_did-we-just-step-into-a-time-machine-activity-7283554398381780993-jW33",
    "id": "7283554398381780993",
    "user_id": null,
    "use_url": "https://www.linkedin.com/company/green-philly",
    "title": "Green Philly on LinkedIn: Did we just step into a time machine? 🚋 SEPTA’s Kawasaki LRV No. 9000…",
    "headline": "Green Philly’s Post",
    "post_text": "Did we just step into a time machine? 🚋 SEPTA’s Kawasaki LRV No. 9000, which first hit the tracks in November 1980, is back in its original retro paint scheme! 🎨 Have you taken a ride on this blast from the past yet? ✨",
    "date_posted": "2025-01-10T18:44:50.441Z",
    "hashtags": null,
    "embedded_links": null,
    "images": null,
    "videos": [
      "https://dms.licdn.com/playlist/vid/v2/D4E10AQEnVHnj_5S17g/mp4-640p-30fp-crf28/mp4-640p-30fp-crf28/0/1736534687686?e=2147483647&v=beta&t=UTKFGM6McXox_D9M_GvcBaG4mHWKI4-NPR-9knm4NqI"
    ],
    "num_likes": 0,
    "num_comments": 0,
    "more_articles_by_user": null,
    "more_relevant_posts": null,
    "top_visible_comments": null,
    "user_followers": 1032,
    "user_posts": 0,
    "user_articles": 0,
    "post_type": "post",
    "account_type": "Organization",
    "post_text_html": "Did we just step into a time machine? &#x1F68B; <br/><br/>SEPTA&#x2019;s Kawasaki LRV No. 9000, which first hit the tracks in November 1980, is back in its original retro paint scheme! &#x1F3A8; <br/><br/>Have you taken a ride on this blast from the past yet? &#x2728; ",
    "repost": {
      "repost_url": null,
      "repost_user_id": null,
      "repost_user_name": null,
      "repost_text": null,
      "repost_hangtags": null,
      "repost_date": null,
      "repost_attachments": null,
      "repost_id": null,
      "tagged_users": null,
      "tagged_companies": null,
      "repost_user_title": null
    },
    "tagged_companies": [],
    "tagged_people": [],
    "user_title": "1,032 followers",
    "timestamp": "2025-01-14T12:49:09.136Z",
    "input": {
      "url": "https://www.linkedin.com/posts/green-philly_did-we-just-step-into-a-time-machine-activity-7283554398381780993-jW33"
    },
    "discovery_input": {
      "url": "https://www.linkedin.com/company/green-philly"
    }
  }
]
```

# Actor input Schema

## `url` (type: `string`):

URL of the LinkedIn Profile URL

## `number` (type: `integer`):

Number of posts to scrape

## Actor input object example

```json
{
  "url": "https://www.linkedin.com/company/google",
  "number": 10
}
```

# 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 = {
    "url": "https://www.linkedin.com/company/google",
    "number": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("pratikdani/discover-linkedin-company-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 = {
    "url": "https://www.linkedin.com/company/google",
    "number": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("pratikdani/discover-linkedin-company-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 '{
  "url": "https://www.linkedin.com/company/google",
  "number": 10
}' |
apify call pratikdani/discover-linkedin-company-posts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pratikdani/discover-linkedin-company-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/htXP3nb9tVeVqyRLm/builds/bnnaYIQXEkh0RbGyL/openapi.json
