# Linkedin Post Search Scraper (No Cookies) (`harvestapi/linkedin-post-search`) Actor

Search LinkedIn Posts with advanced filters by target profiles or companies. No cookies or account required.

- **URL**: https://apify.com/harvestapi/linkedin-post-search.md
- **Developed by:** [HarvestAPI](https://apify.com/harvestapi) (community)
- **Categories:** Lead generation, Social media, Automation
- **Features:** Limited permissions
- **Stats:** 43,322 total users, 11,994 monthly users, 100.0% runs succeeded, 444 bookmarks
- **User rating**: 4.95 out of 5 stars

## Pricing

from $1.50 / 1,000 posts

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

### LinkedIn Posts Search scraper

Our powerful tool helps you search posts by text and filter by LinkedIn profiles or companies without compromising security or violating platform policies. Extract full post data, engagement metrics, and additionally scrape reactions and comments. This greatly helps with engagement analysis and outreach purposes.

#### Key Benefits

- No cookies or account required: Access profile data without sharing cookies or risking account restrictions
- Low pricing: $2 per 1k posts.
- Fast response times deliver data in seconds 🚀
- No caching, fresh data.

### How It Works

- `searchQueries` (required): List of search queries (e.g., `b2b sales`). The search supports operators for more complex queries; see [Use Boolean search on LinkedIn](https://www.linkedin.com/help/linkedin/answer/a524335). One search query is limited to 500 characters and 5 boolean operators (AND/OR/NOT).
- `authorUrls` (optionally): List of LinkedIn profile/company URLs of those who posted or re-posted the content
- `authorsCompanies` (optionally): List of LinkedIn companies where authors of posts work (e.g., `Microsoft`, `Google`).

Note: This is Post Search scraper, so a list of search queries is required. If you don't need to scrape specific search queries, and you want to scrape all posts from specific companies or authors, our [LinkedIn Profile Posts Scraper](https://apify.com/harvestapi/linkedin-profile-posts) works better for this use case

Other params (optionally):

- `postedLimit` - Fetch posts no older than X time. Options: '1h', '24h', 'week', 'month', '3months', '6months', 'year'.
- `postedLimitDate` - Scrape posts from now up to and including this date. It supports the [Date time string format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format). For example, "2011-10-10", or "2011-10-10T14:48:00.000+09:00" or a timestamp: "628021800000".
- `sortBy` - Sort by 'relevance' (of the search query) or 'date' (newest first).
- `maxPosts` - Maximum number of posts to scrape per each search query. This overrides `scrapePages` pagination. Default is 100. If you set this to 0, it will scrape all posts.
- `startPage` - The page number to start scraping from. Default is 1.
- `scrapePages` - The number of pages to scrape, if `maxPosts` is not set.

Additional content:

- `scrapeReactions` - Enable to scrape reactions to posts. Default is `false`. Reactions will be charged as a separate post and pushed into the dataset. Each post will also contain a nested list of its own reactions.
- `maxReactions` - Maximum number of reactions to scrape per post. Default is 10.
- `scrapeComments` - Enable to scrape comments to posts. Default is `false`. Comments will be charged as a separate post and pushed into the dataset. Each post will also contain a nested list of its own comments.
- `maxComments` - Maximum number of comments to scrape per post. Default is 10.

#### Data You'll Receive

- Post content
- Author information
- Social engagement metrics
- Media: images, videos, and links
- Content of reposts
- Comments and reactions (if enabled, each item will be charged as a separate post)

Due to LinkedIn's limitations, it's possible to scrape up to 400-500 posts per query. We recommend segmenting your queries to extract more posts.

#### Sample output data

For example, you can search posts by Google (or other company) employees who hire software engineers:

```json
{
  "searchQueries": [
    "Hiring software engineer",
    "Hiring full stack developer",
    "Hiring backend developer"
  ],
  "authorsCompanyPublicIdentifiers": ["google", "microsoft", "amazon", "meta"]
}
```

Here is the example post output of this actor:

```json
{
  "type": "post",
  "id": "7330988768578920448",
  "linkedinUrl": "https://www.linkedin.com/posts/nickbennett05_hiring-activity-7330988768578920448-Je01",
  "content": "I’m #hiring. Are you passionate about the intersection of physical and virtual worlds, including AI-powered systems and agent-based workflows? If so, I'm hiring for an exciting position on my team. See the details below.",
  "author": {
    "universalName": null,
    "publicIdentifier": "nickbennett05",
    "type": "profile",
    "name": "Nick Bennett",
    "linkedinUrl": "https://www.linkedin.com/in/nickbennett05?miniProfileUrn=urn%3Ali%3Afsd_profile%3AACoAAAMs-kQBF8xYdTGLvYN4zwhqDGh2UlSXIpY",
    "info": "UX Leadership at Amazon | Amazon Fulfillment Technology | UXMC",
    "website": null,
    "websiteLabel": null,
    "avatar": {
      "url": "https://media.licdn.com/dms/image/v2/D4D35AQEiacuf_U3fqQ/profile-framedphoto-shrink_800_800/B4DZbzmaiuGkAg-/0/1747843656196?e=1748552400&v=beta&t=Tr-pqK_0lShKXF6FqeqSrGMqlZabG26Nt6FyAEiIzWs",
      "width": 674,
      "height": 674,
      "expiresAt": 1748552400000
    }
  },
  "postedAt": {
    "timestamp": 1747843925614,
    "date": "2025-05-21T16:12:05.614Z",
    "postedAgoShort": "1d",
    "postedAgoText": "1 day ago • Visible to anyone on or off LinkedIn"
  },
  "postImages": [],
  "socialContent": {
    "hideCommentsCount": false,
    "hideReactionsCount": false,
    "hideSocialActivityCounts": false,
    "hideShareAction": true,
    "hideSendAction": true,
    "hideRepostsCount": false,
    "hideViewsCount": false,
    "hideReactAction": false,
    "hideCommentAction": false,
    "shareUrl": "https://www.linkedin.com/posts/nickbennett05_hiring-activity-7330988768578920448-Je01?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAExUClQBdCKsvo8NLfk3HZMfrSLtXnxHlNs",
    "showContributionExperience": false,
    "showSocialDetail": true
  },
  "engagement": {
    "likes": 13,
    "comments": 1,
    "shares": 9,
    "reactions": [
      {
        "type": "LIKE",
        "count": 12
      },
      {
        "type": "PRAISE",
        "count": 1
      }
    ]
  }
}
```

### LinkedIn Post Search API

The actor stores results in a dataset. You can export data in various formats such as CSV, JSON, XLS, etc. You can scrape and access data on demand using the API.

#### Support and Feedback

We continuously enhance our tools based on user feedback. If you encounter technical issues or have suggestions for improvement:

- Create an issue on the actor’s Issues tab in Apify Console
- Or contact us at contact@harvestapi.io

**\* \* \***

**Disclaimer**: This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by LinkedIn Corporation. LinkedIn® is a registered trademark of LinkedIn Corporation. All trademarks are property of their respective owners.

# Actor input Schema

## `searchQueries` (type: `array`):

Queries to search LinkedIn posts. The same query as you would use in the LinkedIn search bar.

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

Maximum number of posts to scrape per each search query. If you set this to 0, it will scrape all posts.

## `postedLimit` (type: `string`):

Fetch posts no older than X time. Options: '1h', '24h', 'week', 'month'.

## `postedLimitDate` (type: `string`):

Scrape posts from now up to and including this date. It supports the [Date time string format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format). For example, "2011-10-10", or "2011-10-10T14:48:00.000+09:00" or a timestamp: "628021800000"

## `sortBy` (type: `string`):

Sort by 'relevance' or 'date'.

## `authorUrls` (type: `array`):

List of LinkedIn profile or company URLs to scrape. Example: `https://www.linkedin.com/in/williamhgates` will fetch posted or re-posted content by Bill Gates.

## `authorsCompanies` (type: `array`):

Scrape posts of profile-authors who assigned to LinkedIn Company Names of these companies. Example: `Google` will fetch posts of Google employees or ex-employees in some cases.

## `mentioningMember` (type: `array`):

List of LinkedIn profile URLs of members mentioned in posts. Example: `https://www.linkedin.com/in/williamhgates` will fetch posts mentioning Bill Gates.

## `mentioningCompany` (type: `array`):

List of LinkedIn Company Names mentioned in posts. Example: `https://www.linkedin.com/company/google` will fetch posts mentioning Google.

## `contentType` (type: `string`):

Filter posts by content type. For example, if you choose 'Videos', it will scrape only posts containing videos.

## `authorsIndustryId` (type: `array`):

Scrape posts of profile-authors who assigned to LinkedIn Industry IDs of these industries. Full list: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng.csv

## `authorKeywords` (type: `string`):

Scrape posts of profile-authors whose profiles contain at least one of these keywords in the headline or job title sections.

## `profileScraperMode` (type: `string`):

Choose the mode for scraping LinkedIn profiles. The Short mode provides basic information, while the Full mode includes full detailed profile data.

## `startPage` (type: `integer`):

The page number to start scraping from.

## `scrapePages` (type: `integer`):

The number of search pages to scrape. Each page contains 100 posts

## `scrapeReactions` (type: `boolean`):

Scrape reactions of posts.

## `maxReactions` (type: `integer`):

Maximum number of reactions to scrape per post. Default is 10.

## `reactionsProfileScraperMode` (type: `string`):

Choose the mode for scraping LinkedIn profiles. The Short mode provides basic information, while the Full mode includes full detailed profile data.

## `postNestedReactions` (type: `boolean`):

Whether to add reactions items inside post items. In a case of hundreds of reactions, the Actor might hit the max item size limit and won't be able to save a post.

## `scrapeComments` (type: `boolean`):

Scrape comments of posts.

## `commentsPostedLimit` (type: `string`):

Fetch comments no older than X time. Options: '1h', '24h', 'week', 'month'.

## `maxComments` (type: `integer`):

Maximum number of comments to scrape per post. Default is 10.

## `commentsProfileScraperMode` (type: `string`):

Choose the mode for scraping LinkedIn profiles. The Short mode provides basic information, while the Full mode includes full detailed profile data.

## `postNestedComments` (type: `boolean`):

Whether to add comments items inside post items. In a case of hundreds of comments, the Actor might hit the max item size limit and won't be able to save a post.

## Actor input object example

```json
{
  "searchQueries": [
    "b2b sales"
  ],
  "maxPosts": 20,
  "profileScraperMode": "short",
  "startPage": 1,
  "scrapeReactions": false,
  "reactionsProfileScraperMode": "short",
  "postNestedReactions": false,
  "scrapeComments": false,
  "commentsProfileScraperMode": "short",
  "postNestedComments": 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 = {
    "searchQueries": [
        "b2b sales"
    ],
    "maxPosts": 20,
    "scrapeReactions": false,
    "postNestedReactions": false,
    "scrapeComments": false,
    "postNestedComments": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("harvestapi/linkedin-post-search").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 = {
    "searchQueries": ["b2b sales"],
    "maxPosts": 20,
    "scrapeReactions": False,
    "postNestedReactions": False,
    "scrapeComments": False,
    "postNestedComments": False,
}

# Run the Actor and wait for it to finish
run = client.actor("harvestapi/linkedin-post-search").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 '{
  "searchQueries": [
    "b2b sales"
  ],
  "maxPosts": 20,
  "scrapeReactions": false,
  "postNestedReactions": false,
  "scrapeComments": false,
  "postNestedComments": false
}' |
apify call harvestapi/linkedin-post-search --silent --output-dataset

```

## MCP server setup

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

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/buIWk2uOUzTmcLsuB/builds/9BWuRUTT3NouYMxcU/openapi.json
