# \[NO COOKIES] LinkedIn Search Posts Scraper (`scary_good_apis/linkedin-search-posts`) Actor

Easily and quickly search LinkedIn for posts matching your exact keywords and filters without needing to risk your own LinkedIn account or using your cookies.

- **URL**: https://apify.com/scary_good_apis/linkedin-search-posts.md
- **Developed by:** [Scary Good APIs](https://apify.com/scary_good_apis) (community)
- **Categories:** Lead generation, Social media
- **Features:** Limited permissions
- **Stats:** 450 total users, 31 monthly users, 96.5% runs succeeded, 5 bookmarks
- **User rating**: 4.88 out of 5 stars

## Pricing

from $0.05 / search request

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Post Search Actor

***

### 🚀 Features

- **Pay-Per-Result Pricing** - Pay only for posts delivered
- **LinkedIn Post Search** - Search LinkedIn posts by keywords and advanced filters
- **Rich Data Extraction** - Complete post data including engagement, media, and author info
- **Advanced Filtering** - Filter by author type, engagement, media type, and more

### 💰 Pricing

#### Pay-Per-Result Model

- **LinkedIn Posts**: $0.0035 per LinkedIn post found
- **Cost per successful run**: $0.05 per search run
- **No infrastructure costs** - You only pay for actual results delivered, not the Actor runtime
- **No failed searches charged** - API errors and empty results are free

#### Example Costs

| Search Type                 | Cost      |
| --------------------------- | --------- |
| Cost per search             | **$0.05** |
| Search returning 1000 posts | **$3.50** |
| Total                       | **$3.55** |

### 📊 Output Data

#### LinkedIn Post Data Includes:

- **Author Information**: Name, profile URL, type (Person/Company)
- **Post Content**: Full text, media (images, videos, documents)
- **Engagement Metrics**: Likes, comments, shares, reactions breakdown
- **Metadata**: Timestamp, URN, permissions
- **Search Context**: Query used, result position, total results

#### Multiple Output Views:

1. **Posts Overview** - Main table with key post information
2. **Engagement Metrics** - Detailed reaction and engagement data
3. **PPR Billing Details** - Transparent billing and search metadata
4. **Media Content** - Posts with images, videos, and documents

#### Example Raw Output

##### 🧑‍💼 Person

```json
{
    "urn": "urn:li:activity:7374186205246083073",
    "shareUrn": "urn:li:share:7374186203803222016",
    "approxPublishedAt": "25m",
    "timestamp": 1758142997085,
    "engagement": {
      "comments": 0,
      "reactions": {
        "LIKE": 0,
        "PRAISE": 0,
        "EMPATHY": 0,
        "INTEREST": 0,
        "APPRECIATION": 0,
        "ENTERTAINMENT": 0
      },
      "shares": 0
    },
    "content": {
      "edited": false,
      "text": "Fun experiment! To start, in AI MoE (Mixture of Experts) is when the model has a bunch of \"experts\" or \"specialists\" that, when you ask the model to do something, a router decides which of those \"specialists\" to call to answer your question. For oss20b there are 32 experts in each MoE block. So at any point it calls the expert to answer your question, but only a handful are used at a time. Each expert can learn different kinds of data, so one might be good at understanding legal text, another at coding, and another your cat pictures.\n\nSome of the experts, like some lawyers, are way better at understanding particular things and therefore called more often than the others. The ones that don't? Chuck em. Kind of like how you're on a call with outside counsel and it's 4 different lawyers, but only 3 are speaking and the 4th is playing Call of Duty the entire time. Don't need them going forward!\n\nAnyway, so I took two legal datasets available on HF (LEDGAR contracts + modified CUAD) and watched which MoE (Mixture of Experts) that oss20b used, layer by layer, when using the datasets. Then, I soft pruned the experts that were not used and reduced routing from k=4 to k=2, which cut MoE compute. Also, I lost no quality when soft pruning the unused ones. I.e. I'm only hiring 2 experts instead of 4; same answers less work.\n\nNext steps, hard prune to reduce memory usage.",
      "textAttributes": [],
      "quotePost": false,
      "quotedPost": null,
      "hasImage": true,
      "hasMultipleImages": false,
      "hasVideo": false,
      "hasDocument": false,
      "hasLink": false,
      "isCelebration": false,
      "isJobPosting": false,
      "media": {
        "images": [
          {
            "url": "https://media.licdn.com/dms/image/v2/D5622AQH2N1UcMWZAeA/feedshare-shrink_2048_1536/B56ZlZfRz3I8A0-/0/1758142996036?e=1761177600&v=beta&t=c7wJf8rSYdj0kbxYNrlFiCq1PQPwjQlNiDZpSwIyh38",
            "position": 0,
            "alt": "chart, bar chart, histogram",
            "width": 483,
            "height": 694
          }
        ],
        "videos": [],
        "articles": []
      }
    },
    "group": null,
    "permissions": {
      "canComment": true,
      "canReact": true,
      "canShare": true,
      "canMessage": true
    },
    "poster": {
      "type": "Person",
      "name": "Aaron Kelly",
      "title": "General Counsel @ Edge & Node",
      "profileUrl": "https://www.linkedin.com/in/aaronkellylaw",
      "profileImage": "https://media.licdn.com/dms/image/v2/D5603AQF-OvN1CNtULQ/profile-displayphoto-crop_800_800/B56Zkqn87HKMAI-/0/1757356741845?e=1761177600&v=beta&t=qmBo38998-qd_ctExlsqpYLHiR8zdZ0sUeCgw3gK_L0",
      "urn": "urn:li:member:5219962",
      "location": {
        "country": "US",
        "state": null,
        "city": null
      },
      "followersCount": 1496,
      "currentPosition": {
        "companyUrn": "urn:li:organization:71303412",
        "vanityId": "edgeandnode",
        "name": "Edge & Node",
        "minEmployeeCount": 62,
        "industry": "Software Development",
        "jobLocation": {
          "country": "US",
          "state": "California",
          "city": "San Francisco"
        }
      },
      "isFullDetails": true,
      "version": 1
    }
```

##### 🏢 Company

```json
{
    "urn": "urn:li:activity:7374185443296276480",
    "shareUrn": "urn:li:share:7374185442000162818",
    "approxPublishedAt": "28m",
    "timestamp": 1758142815422,
    "engagement": {
      "comments": 0,
      "reactions": {
        "LIKE": 0,
        "PRAISE": 0,
        "EMPATHY": 0,
        "INTEREST": 0,
        "APPRECIATION": 0,
        "ENTERTAINMENT": 0
      },
      "shares": 0
    },
    "content": {
      "edited": false,
      "text": "You don’t have to go with the first personal injury attorney you find. You have the right to shop around and choose the one you feel best meets your needs and you are most comfortable with (even if that doesn’t end up being us). \n\nHere are some qualifications you should consider during any consultation with a lawyer. \n\nhttps://lnkd.in/gfFhxkAe",
      "textAttributes": [
        {
          "startIndex": 321,
          "endIndex": 345,
          "url": "https://lnkd.in/gfFhxkAe"
        }
      ],
      "quotePost": false,
      "quotedPost": null,
      "hasImage": true,
      "hasMultipleImages": false,
      "hasVideo": false,
      "hasDocument": false,
      "hasLink": true,
      "isCelebration": false,
      "isJobPosting": false,
      "media": {
        "images": [
          {
            "url": "https://media.licdn.com/dms/image/v2/D5610AQHFR5-fK0aQVQ/image-shrink_1280/B56ZlZelb6JsAQ-/0/1758142815161?e=1758751200&v=beta&t=y40tmV9CxMavZuBh5iSgL1CK5LC0hNJ4SRiYvJUKBI0",
            "position": 0,
            "alt": "Close-up of a hand holding a pen poised to sign a legal document, representing personal injury law services by Maurer Law.",
            "width": 1080,
            "height": 1350
          }
        ],
        "videos": [],
        "articles": []
      }
    },
    "group": null,
    "permissions": {
      "canComment": true,
      "canReact": true,
      "canShare": true,
      "canMessage": true
    },
    "poster": {
      "type": "Company",
      "name": "Maurer Law",
      "followerCount": 26,
      "logo": "https://media.licdn.com/dms/image/v2/D560BAQGef0PSoFm0vA/company-logo_400_400/company-logo_400_400/0/1683658608157/maurerlaw_logo?e=1761177600&v=beta&t=yRwqKV6rm8iuP8b1Cv-vPQw-kjJ4Nmtd0ywNq0Hh2Mw",
      "urn": "urn:li:organization:19196622",
      "pageUrl": "https://www.linkedin.com/company/maurerlaw/",
      "locations": [
        {
          "country": "US",
          "state": "California",
          "city": "Auburn",
          "headquarters": true
        }
      ],
      "contactInfo": {
        "website": "https://www.maurer.law/",
        "phoneNumber": null
      },
      "size": 6,
      "yearFounded": 2019,
      "companyType": "Privately Held",
      "tagline": "Plaintiffs Personal Injury and Elder Abuse Law Firm",
      "description": "There are many law firms out there. Knowing where to turn for help can be difficult, and selecting the right lawyer and law firm to represent you is an extremely important decision, if not the most important decision to make in your case. With that in mind, it's important to know what we are not. We are not the law firm you see on television commercials, billboards or on the back of phone books. We are not the law firm that will send you out for unnecessary medical treatment, and we are not the law firm that pays for fake awards to try and bolster our credibility.\n\nWhat we are, however, is a law firm focusing on personal injury and elder abuse claims. We do quality work and get excellent results for our clients in the most effective and efficient way possible. Two of our core values are honesty and professionalism, and if you or a family member has been injured, we are here to help. We will give you straight answers, explain your options to you, and give you our advice and recommendations on what your next steps should be.",
      "isFullDetails": true,
      "version": 1
    },
```

### ⚙️ How to Use

#### Search

Just enter your search query and optionally set the maximum number of results:

- **Search Query**: Text search query (in LinkedIn's boolean search syntax)
- **Max Results**: 10 (default)
- **Limiter**: A limiter for the search request. Use either previousPost OR maxTime
- **Filters**: Search Filter

#### Example

```json
{
    "query": "hiring (developer OR engineer OR programmer)",
    "maxResults": 10,
    "limiter": {
        "previousPost": "urn:li:activity:7250170481335758841",
        "maxTime": null
    },
    "filters": {
        "posterType": "Person",
        "hasImage": true,
        "isJobPosting": null,
        "profile": {
            "minFollowerCount": 100
        }
    }
}
```

This searches all LinkedIn posts containing "hiring" and either "developer", "engineer", or "programmer" from individual profiles with at least 100 followers that include images, returning up to 10 results posted before the specified post.

### 📈 Use Cases

#### Content Research

- Monitor competitor content strategies
- Track industry trends and discussions
- Find viral posts in your niche

#### Lead Generation

- Find companies posting about your services
- Identify active professionals in your field
- Discover potential collaboration opportunities

#### Market Research

- Analyze engagement on industry topics
- Track company announcements and updates
- Monitor hiring trends and job postings

#### Social Media Analysis

- Study successful content formats
- Analyze posting patterns and timing
- Measure audience engagement preferences

### 🛡️ Data Quality & Reliability

- **Real-time Data** - Direct from LinkedIn
- **Complete Profiles** - Full author and company information
- **Accurate Metrics** - Real engagement counts and timestamps
- **Rate Limited** - Respects LinkedIn's usage policies
- **Error Handling** - Robust retry logic and error reporting

### 📋 Data Export

All data is available in multiple formats:

- **JSON** - Full structured data with all fields
- **CSV** - Flattened data perfect for spreadsheet analysis
- **Excel** - Formatted tables with proper data types
- **API Access** - Programmatic access via Apify API

### 🔗 Resources

- [LinkedIn Post Search Syntax](https://www.linkedin.com/help/linkedin/answer/a524335)
- [Data Export Options](https://docs.apify.com/platform/storage/dataset)

# Actor input Schema

## `query` (type: `string`):

Search query for LinkedIn posts. Follows LinkedIn's search syntax. See https://www.linkedin.com/help/linkedin/answer/a524335 for more details.

## `maxResults` (type: `number`):

Maximum number of posts to return. Use this to control your costs.

## `fullSearch` (type: `boolean`):

Pull full contact info, company data, etc., even when no filters depend on them.

## `limiter` (type: `object`):

Stop searching when either a specific post is reached OR a timestamp is reached. Use one or the other, not both.

## `filters` (type: `object`):

Advanced filtering options for posts.

## Actor input object example

```json
{
  "query": "hiring (developer OR engineer OR programmer)",
  "maxResults": 10,
  "fullSearch": false,
  "limiter": {
    "previousPost": "urn:li:activity:7250170481335758841",
    "maxTime": null
  },
  "filters": {
    "posterType": "Person",
    "hasImage": true,
    "hasVideo": false,
    "hasDocument": false,
    "isJobPosting": false,
    "profile": {
      "minFollowerCount": 100
    }
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "query": "hiring (developer OR engineer OR programmer)",
    "limiter": {
        "previousPost": "urn:li:activity:7250170481335758841",
        "maxTime": null
    },
    "filters": {
        "posterType": "Person",
        "hasImage": true,
        "hasVideo": false,
        "hasDocument": false,
        "isJobPosting": false,
        "profile": {
            "minFollowerCount": 100
        }
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scary_good_apis/linkedin-search-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 = {
    "query": "hiring (developer OR engineer OR programmer)",
    "limiter": {
        "previousPost": "urn:li:activity:7250170481335758841",
        "maxTime": None,
    },
    "filters": {
        "posterType": "Person",
        "hasImage": True,
        "hasVideo": False,
        "hasDocument": False,
        "isJobPosting": False,
        "profile": { "minFollowerCount": 100 },
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scary_good_apis/linkedin-search-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 '{
  "query": "hiring (developer OR engineer OR programmer)",
  "limiter": {
    "previousPost": "urn:li:activity:7250170481335758841",
    "maxTime": null
  },
  "filters": {
    "posterType": "Person",
    "hasImage": true,
    "hasVideo": false,
    "hasDocument": false,
    "isJobPosting": false,
    "profile": {
      "minFollowerCount": 100
    }
  }
}' |
apify call scary_good_apis/linkedin-search-posts --silent --output-dataset

```

## MCP server setup

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