# LinkedIn Company Scraper (`datahamster/linkedin-company-scraper`) Actor

LinkedIn company scraper for public company pages: industry, size, headquarters, founded, website, followers, specialties, about and the latest posts with reactions and comments. No login, no cookies. Monitor mode alerts on new posts and profile changes.

- **URL**: https://apify.com/datahamster/linkedin-company-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.24 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## LinkedIn Company Scraper

LinkedIn Company Scraper reads public LinkedIn company pages and gives you one row per company: name, tagline, industry, company size, headquarters, founding year, website, follower count, specialties, logo, the full About text and the company's ~10 most recent posts with reactions and comments. No LinkedIn account, no cookies, no browser.

**Try it:** the prefilled example returns 3 rows in about 12 seconds and costs about $0.009. Results cost $2.80 per 1,000.

### What you get

Real rows from the example dataset (`companies: ["microsoft", "stripe", "posthog"]`):

| name | industry | companySize | headquarters | founded | followers | employeesOnLinkedIn | recentPosts |
|---|---|---|---|---|---|---|---|
| Microsoft | Software Development | 10,001+ employees | Redmond, Washington | `null` | `29421445` | `231133` | 10 posts |
| Stripe | Technology, Information and Internet | 5,001-10,000 employees | South San Francisco, California | `2010` | `1799253` | `16694` | 10 posts |
| PostHog | Software Development | 51-200 employees | San Francisco | `2020` | `59955` | `234` | 10 posts |

Microsoft shows `founded: null` because its page has no Founded entry. A company post from Stripe's `recentPosts` (text shortened here):

```json
{
  "url": "https://www.linkedin.com/feed/update/urn:li:activity:7520884289719324672/",
  "activityId": "7520884289719324672",
  "text": "Introducing 'stripe pay', for instant business-to-business transfers. Find companies using their Stripe profil...",
  "postedAgo": "5d",
  "reactions": 313,
  "comments": 25,
  "byCompany": true,
  "isRepost": false
}
```

An employee post Stripe reposted keeps the text (omitted here) and the counters:

```json
{
  "url": "https://www.linkedin.com/feed/update/urn:li:activity:7521240251923824640/",
  "activityId": "7521240251923824640",
  "postedAgo": "4d",
  "reactions": 43,
  "comments": 4,
  "byCompany": false,
  "isRepost": true
}
```

Full row: `id`, `url`, `companyUrl`, `slug`, `name`, `tagline`, `industry`, `companySize`, `headquarters`, `address` (street, city, region, postalCode, country), `founded`, `type`, `specialties`, `website`, `followers`, `employeesOnLinkedIn`, `logoUrl`, `about`, `recentPosts`, `query`, `scrapedAt`.

Each item of `recentPosts`: `url` (the neutral `/feed/update/urn:li:activity:<id>/` permalink), `activityId`, `text`, `postedAgo` ("7h", "2d", "1w"), `reactions`, `comments`, `byCompany` (the company wrote it), `isRepost` (the company reposted someone else's post).

### Use cases

- **Sales and agencies** enrich a list of target accounts with industry, size band, headquarters and website before outreach.
- **Investors and analysts** track follower growth and what a set of companies posted this week.
- **Marketing teams** benchmark competitors' posting rhythm and engagement on LinkedIn.
- **Monitor mode** alerts you when a company changes its size band, industry, headquarters or website, publishes a new post, or its follower count moves by at least 1% (and at least 100 followers).

### Try it in 10 seconds

Hit **Start**: the input already works with `companies: ["microsoft", "stripe", "posthog"]` and `maxItems: 10`, nothing required.

To watch companies on a schedule, save the input as a task, set **Mode** to `monitor` and add a schedule (for example cron `0 8 * * 1`, every Monday). Each run then returns only the companies whose size, industry, headquarters or website changed, which published a post the previous run had not seen, or whose follower count moved by at least 1% (and at least 100) since the last time it was reported. Daily follower drift and reaction counts moving on old posts never count as a change on their own, but slow growth adds up until it crosses the threshold.

### Related actors

- [Facebook Pages Search: Business Contacts, Followers, Monitor](https://apify.com/datahamster/facebook-pages-search): the same companies' Facebook pages with public business contacts.
- [Career Site Jobs Monitor: Greenhouse, Lever, Ashby, Workday](https://apify.com/datahamster/ats-jobs): the open roles a company posts on its own career site.
- [Glassdoor Jobs Scraper: Salary Estimates, Ratings, Monitor](https://apify.com/datahamster/glassdoor-jobs): jobs with salary estimates and company ratings.
- [LinkedIn Jobs Scraper](https://apify.com/datahamster/linkedin-jobs-scraper): the jobs the same companies post on LinkedIn.

### Input

| Field | Meaning | Default |
|---|---|---|
| `companies` | LinkedIn company URLs or slugs: `microsoft`, `https://www.linkedin.com/company/stripe/`, `https://de.linkedin.com/company/posthog`. A numeric company id works too. | none (prefilled with `["microsoft", "stripe", "posthog"]`) |
| `includePosts` | Add the recent posts block of the same page. It costs no extra request. | `true` |
| `maxItems` | Stop after this many companies | `100` |
| `mode` | `scrape`, or `monitor` (only companies that changed since the last run) | `scrape` |
| `monitorStateId`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor-mode state key and alert targets | empty |

### How it works

1. Each entry is turned into a company slug. Personal profiles (`/in/`), schools, showcase pages, job links and other sites are rejected before any request is made.
2. The public page `linkedin.com/company/<slug>/` is read once per company, the same page a logged-out visitor sees. The structured data LinkedIn embeds for search engines gives the name, address, logo and About text; the page itself gives industry, size, followers, specialties, website and the recent posts.
3. LinkedIn throttles guests with HTTP 999 (an authwall stub) or 429. Every request uses a fresh client without cookies, and the actor pauses between companies. A refused page is tried once more on the same proxy tier after a short wait, then the actor moves to a datacenter and then a residential proxy, and stays on the tier that worked for the rest of the run.
4. A company slug LinkedIn does not know (HTTP 404) returns nothing and costs nothing. If no company could be read because every page was refused, `RUN_SUMMARY` says `blocked`; if every read failed with a server error or timeout, it says `upstream_error`. Neither ends as an empty `no_matches`.

### Pricing

| Event | Price |
|---|---|
| result | $0.0028 per company ($2.80 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0028 per new or changed company |

You pay only for companies actually returned. Recent posts come with the company row at no extra charge. Platform usage (compute and any proxy traffic) is billed by Apify on top.

**Found it useful?** A short review on the Store page helps other people find this actor and tells us what to improve. If something is wrong, open an issue on the actor page and we will answer within a day.

### What is NOT collected

This is company data only. The actor does not collect employees, people who work at the company, followers, or anyone's profile or contact details. `employeesOnLinkedIn` is a single number, the count LinkedIn prints on the page.

The recent posts block on a company page often includes posts written by employees that the company reposted. For those posts the row keeps the text and the counters only: no author name and no profile link. Every post `url` is the neutral `linkedin.com/feed/update/urn:li:activity:<id>/` permalink, because LinkedIn's own `/posts/...` link spells out the author's handle or words of the post, including names the text masks. In post text, every linked @mention of a LinkedIn member is replaced with `@member`, and so is any plain-text occurrence of a name the same page links to a member profile. Names of people who are not linked as members anywhere on the page (for example a guest mentioned only in words) can remain in the text.

### Limits

- Only what LinkedIn shows a logged-out visitor. The Posts tab, People tab, Jobs tab and insights need a login and are not read.
- `recentPosts` holds what the company page itself shows, usually the last 10 updates. It is not a full post history.
- `postedAgo` is LinkedIn's relative label ("2d", "1w"); an exact date is not shown on the page for every post.
- `tagline`, `founded`, `specialties` and `employeesOnLinkedIn` are empty when the company did not fill them in or LinkedIn does not show them.
- `followers` changes daily for large companies. Monitor mode reports a follower change only when the count moved by at least 1% (and at least 100) since it was last reported, so a large company does not show up on every run; the value in the row is always the current count.
- LinkedIn throttles guest traffic. Large lists run slower because of the pauses, and a run can escalate to a residential proxy, which costs more platform usage.

### FAQ

**Does it need a LinkedIn account or cookies?** No. Every request is a plain public web request, the same one a search engine makes.

**Can it search companies by keyword?** No. Bring the company URLs or slugs.

**Why did a company return nothing?** Either LinkedIn has no company under that slug, or LinkedIn refused the page on every proxy tier. The run log has one line such as `companies: ok=2 not_found=1 walled=0` that says which. When nothing at all came back, `emptyReason` in the `RUN_SUMMARY` record is `no_matches` for unknown slugs, `blocked` for refused pages and `upstream_error` for server errors.

### Changelog

- 0.1.7: the last post of the block no longer reads 0 reactions and comments when it is an article; post URLs are always the neutral feed permalink; a wall on the first company no longer ends a run whose other companies read fine.
- 0.1: first release. Company pages by URL or slug, about block, followers, specialties, address, recent posts with reactions and comments, monitor mode.

# Actor input Schema

## `companies` (type: `array`):

Company page URLs or slugs, one per line: "microsoft", "https://www.linkedin.com/company/stripe/". Personal profiles, schools and showcase pages are skipped.

## `includePosts` (type: `boolean`):

Add the ~10 recent posts shown on the company page (text, age, URL, reactions, comments). Read from the same page, no extra request or charge.

## `maxItems` (type: `integer`):

Stop after this many companies (you are charged only for pushed rows)

## `mode` (type: `string`):

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "companies": [
    "microsoft",
    "stripe",
    "posthog"
  ],
  "includePosts": true,
  "maxItems": 10,
  "mode": "scrape"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "companies": [
        "microsoft",
        "stripe",
        "posthog"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/linkedin-company-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 = {
    "companies": [
        "microsoft",
        "stripe",
        "posthog",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/linkedin-company-scraper").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 '{
  "companies": [
    "microsoft",
    "stripe",
    "posthog"
  ],
  "maxItems": 10
}' |
apify call datahamster/linkedin-company-scraper --silent --output-dataset

```

## MCP server setup

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

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/Rl9vGtD6dCqNR7SfO/builds/oh3QKhTA3dA9T5W7x/openapi.json
