# LinkedIn Post Search API | No Login, No Cookies (`johnvc/linkedin-post-search-api`) Actor

Search public LinkedIn posts by keyword, name, phrase or #hashtag and get each post as JSON: full text, author and headline, date, reactions, comments, images and links. Filter by past day, week, month or a date range. Mention monitoring with no login, no cookie, no LinkedIn account.

- **URL**: https://apify.com/johnvc/linkedin-post-search-api.md
- **Developed by:** [John](https://apify.com/johnvc) (community)
- **Categories:** Social media, News, AI
- **Stats:** 3 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.19 / 1,000 post scrapeds

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

LinkedIn post search by keyword, name, phrase or #hashtag: this API finds the public posts on
[LinkedIn](https://www.linkedin.com/) that mention what you search for and returns each one as clean
JSON, with the full text, the author and their headline, the date, reactions, comments, images and
links. No LinkedIn account, no login and no session cookie.

Give it "Jackson Hole Symposium", your brand, a person's name, or "#semiconductors", pick a window such
as the past day or past week, and it returns the public posts that mention it. Run it on a schedule and
it becomes a LinkedIn mention monitor: one saved search per keyword, a fresh list of new posts every
morning. It is not affiliated with, endorsed by, or connected to LinkedIn; it reads only what LinkedIn
shows to any signed-out visitor.

### 🧩 Part of the Alpha OSINT LinkedIn suite: no login, no cookies

Nine Actors that read only what LinkedIn shows to a signed-out visitor. None of them asks for your
account, your password or an `li_at` session cookie, so none of them can get your LinkedIn account
restricted.

| You want to | Use |
|---|---|
| Find posts that mention a keyword, name or hashtag | **LinkedIn Post Search API** (this Actor) |
| Read everything one person or company has posted | [LinkedIn Posts API](https://apify.com/johnvc/linkedin-posts-api?fpr=9n7kx3) |
| Turn the authors you find into full structured profiles | [LinkedIn Profile API](https://apify.com/johnvc/linkedin-profile-api?fpr=9n7kx3) |
| Enrich the companies behind the posts | [LinkedIn Company API](https://apify.com/johnvc/linkedin-company-api?fpr=9n7kx3) |
| Find people by name, job title, company or school | [LinkedIn People Search API](https://apify.com/johnvc/linkedin-people-search-api?fpr=9n7kx3) |
| List the people who work at a company | [LinkedIn Company Employees API](https://apify.com/johnvc/linkedin-company-employees-api?fpr=9n7kx3) |
| See what a company is hiring for | [LinkedIn Jobs API](https://apify.com/johnvc/linkedin-jobs-api?fpr=9n7kx3) |

A worked map of these chains is at [alphaosint.com/linkedin](https://alphaosint.com/linkedin/).

### What the LinkedIn Post Search API returns

- One row per public post that matches a keyword, with the post text, title line, date and URL.
- The author's name, profile or company URL, type (person or organization), headline and follower count.
- Engagement: reactions, comment count, and up to 10 of the comments a signed-out visitor can see.
- Media and links: images, videos, embedded links, @-tagged people and companies, hashtags, documents, and the original post when the match is a share.
- Search context: which keyword found the post, the result page and rank, and whether the post came from the shared cache.

What makes it different: no login or cookie, a date window that is checked against each post's own
timestamp, a shared cache that makes repeat searches cheaper, and a per-page search fee instead of a
per-run start fee.

### Use cases

- **Monitor LinkedIn mentions of your brand, product or executives** every morning with a past-day search on a schedule.
- **LinkedIn social listening for a topic or industry**: follow what people say about an event, a regulation or a competitor, with reactions and comments for context.
- **LinkedIn hashtag analytics**: pull every recent post under a hashtag and rank them by reactions to see which posts and authors lead the conversation.
- **Journalism and PR research**: find the public posts that discuss a story or a public figure in a date range, with authors and links ready to cite.
- **Find the most liked LinkedIn posts on a topic** this week, for content research or competitor benchmarking.

### Input parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `keywords` | array of strings | yes | | Names, phrases, companies or #hashtags to find, one per line, as plain words. Each is searched as an exact phrase. Up to 20 per run. Search operators and quote marks are refused. |
| `postedWithin` | string | no | `any` | Only posts from the past `day`, `week`, `month` or `year`. Ignored when a start or end date is set. |
| `startDate` | string (YYYY-MM-DD) | no | | Only posts published on or after this day (UTC). Overrides `postedWithin`. |
| `endDate` | string (YYYY-MM-DD) | no | | Only posts published on or before this day (UTC). |
| `maxPostsPerKeyword` | integer | no | `50` | Stop after delivering this many posts for one keyword (1 to 1,000). Caps cost. |
| `includeArticles` | boolean | no | `false` | Also search long-form LinkedIn articles (linkedin.com/pulse). Each keyword then runs two searches. |

A daily mention monitor:

```json
{ "keywords": ["Your Company Name", "Your CEO's Name"], "postedWithin": "day", "maxPostsPerKeyword": 100 }
```

A one-off pull for an event:

```json
{ "keywords": ["Jackson Hole Symposium"], "startDate": "2026-08-18", "endDate": "2026-08-25" }
```

### Example output

One row per post. A post found by two of your keywords is delivered once, under the first. Error rows
(`resultType: "error"`) explain a keyword or post that could not be read and are never charged.

| Field | Description |
|---|---|
| `postUrl`, `postId` | The public post link and LinkedIn's post id |
| `datePosted` | When the post was published (UTC) |
| `text`, `title` | The full post text and its first line |
| `authorName`, `authorUrl`, `authorType` | Who posted it: a person or an organization |
| `authorHeadline`, `authorFollowers` | The author's headline and follower count, when shown |
| `numLikes`, `numComments` | Reactions and comments |
| `topComments` | Up to 10 of the comments LinkedIn shows a signed-out visitor |
| `mediaType` | text, image, video, document or article |
| `images`, `videos`, `embeddedLinks` | Media and links in the post |
| `taggedPeople`, `taggedCompanies` | People and companies mentioned with an @ tag |
| `hashtags` | Hashtags used in the post |
| `resharedPost` | The original post, when this one shares another |
| `matchedKeyword` | Which of your keywords found it |
| `searchPage`, `searchRank` | Where it ranked in the search results |
| `fromCache`, `fetchedAt` | Whether the post came from the shared cache, and when it was read |

A real row from a run, shortened:

```json
{
  "resultType": "post",
  "postId": "7363908644226125825",
  "postUrl": "https://www.linkedin.com/posts/andrew-krei-cfa_the-feds-jackson-hole-symposium-is-always-activity-7363908644226125825-w3c1",
  "postType": "repost",
  "mediaType": "image",
  "datePosted": "2025-08-20T12:23:55.561Z",
  "text": "The Fed's Jackson Hole symposium is always a big event for markets, but this week's gathering will be especially important as investors have been pressing bets on rate cuts resuming in September...",
  "authorName": "Andrew Krei, CFA",
  "authorUrl": "https://www.linkedin.com/in/andrew-krei-cfa",
  "authorFollowers": 2758,
  "authorType": "Person",
  "numLikes": 58,
  "numComments": 1,
  "taggedCompanies": [{ "name": "Bloomberg News", "link": "https://www.linkedin.com/company/bloomberg-news" }],
  "summary": "Post by Andrew Krei, CFA, 58 reactions, 1 comments, posted 2025-08-20",
  "matchedKeyword": "Jackson Hole Symposium",
  "searchRank": 1,
  "searchPage": 1,
  "fromCache": false,
  "fetchedAt": "2026-10-10T14:03:22Z"
}
```

#### What it can and cannot see

This API finds public posts through search-engine indexing of LinkedIn, then reads each post's own
public page. Three consequences are worth knowing before you rely on it:

- **Coverage is the public, indexed part of LinkedIn.** Posts from members who keep their activity private, and posts no search engine has indexed yet, are not found. LinkedIn's own in-app search needs a login, so no cookie-free tool can promise every post.
- **New posts appear within hours, not seconds.** In testing, posts showed up in a past-day search three to four hours after they were published.
- **A signed-out visitor sees up to 10 comments per post**, and no repost or share counts.

For a mention monitor this is usually exactly what you want: the posts that are public and spreading,
delivered as data, with no account at risk.

### Pricing: pay per search page and per post

There is no subscription and no start fee. A run is billed for two things only:

| Event | When you are charged |
|---|---|
| Search page | Once per page of search results fetched fresh for one of your keywords. A page holds about 8 to 10 posts. Pages already in the shared cache are free. |
| Post scraped | Once per post delivered to your dataset. Never for an error row, a post outside your date window, or a post already delivered in this run. |

A one-day monitor on a quiet keyword usually costs one search page and a handful of posts. Current
prices are on the Store page. Free Apify plans include a monthly allowance for this Actor.

### How to get started

1. Open the Actor: [LinkedIn Post Search API on Apify Store](https://apify.com/johnvc/linkedin-post-search-api?fpr=9n7kx3)
2. Enter one or more keywords, names or #hashtags.
3. Pick a window: past day for a monitor, or a date range for research.
4. Set `maxPostsPerKeyword` to cap how many posts each keyword returns.
5. Run it, then download the dataset as JSON, CSV or Excel.

Prefer code? The [example GitHub repo](https://github.com/johnisanerd/Apify-LinkedIn-Post-Search-API) is a
Python quick-start with uv, three recipe helpers (hashtag tracking, daily brand mentions, most liked posts)
and MCP install walkthroughs for Claude, Cursor and ChatGPT.

### 🔌 Use this API from Claude (MCP)

Add this API as a tool in [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial),
[Claude Cowork](https://claude.ai/referral/uIlpa7nPLg) (free trial), or any other MCP client through
the hosted Apify MCP server:

```
https://mcp.apify.com/?tools=actors,docs,johnvc/linkedin-post-search-api
```

Then ask in plain language, for example "find LinkedIn posts from the past week that mention our
product and tell me which ones have the most engagement", and the agent runs the search and reads
the results itself.

Apify's MCP integration docs: https://docs.apify.com/platform/integrations/mcp

https://www.youtube.com/watch?v=jREWahDGhJM

### 💸 Pay per run with crypto (x402)

The LinkedIn Post Search API supports agentic payments via the [x402 protocol](https://docs.apify.com/platform/integrations/x402).
AI agents and MCP clients can pay for runs in USDC (on Base) with no Apify account or API token needed:
point your agent at the [Apify MCP server](https://mcp.apify.com/?tools=actors,docs,johnvc/linkedin-post-search-api) and it can
discover, pay for, and run this Actor autonomously. Read the
[Apify x402 announcement](https://apify.com/change-log/pay-for-apify-actors-with-x402?fpr=9n7kx3) for details.

### 🔌 Integrations: monitor LinkedIn mentions on a schedule

A single run answers one question: who mentioned this today? The value comes from asking it every
day. Saved tasks and schedules turn this API into a LinkedIn social listening feed that lands in the
tools you already use, through [Apify platform integrations](https://docs.apify.com/platform/integrations).

#### Tasks and schedules: one keyword, one task, one schedule

Create a [saved task](https://docs.apify.com/platform/actors/running/tasks) per thing you watch, for
example "Mentions: Acme" with `{ "keywords": ["Acme"], "postedWithin": "day" }`. Then attach a
[schedule](https://docs.apify.com/platform/schedules) from the Actor's Actions menu: `0 7 * * *` runs
every morning at 7, `0 */6 * * *` every six hours, `0 9 * * 1` on Mondays. One schedule can trigger
many tasks, so ten keywords are ten tasks on one timer. Each run's dataset is that day's mention list,
and posts seen before come back from the shared cache at no search cost.

#### n8n, Make and Zapier

In n8n, the [Apify n8n integration](https://docs.apify.com/platform/integrations/n8n) gives you a
four-node workflow: Schedule Trigger, then the Apify Actor node running this API, then a Filter on
`numLikes` or `authorType`, then Slack or email. [Make](https://docs.apify.com/platform/integrations/make)
and [Zapier](https://docs.apify.com/platform/integrations/zapier) follow the same pattern: run the
task, then act on each new row.

#### Supabase and storage: keep a history of mentions

No-code: an n8n Actor node followed by a Supabase node inserts each row into a `linkedin_mentions`
table. In Python, run the Actor and bulk-insert the flat rows:

```python
from apify_client import ApifyClient
from supabase import create_client

apify = ApifyClient("YOUR_APIFY_TOKEN")
db = create_client("https://YOUR_PROJECT.supabase.co", "YOUR_SERVICE_KEY")

run = apify.actor("johnvc/linkedin-post-search-api").call(run_input={
    "keywords": ["Acme", "#semiconductors"], "postedWithin": "day", "maxPostsPerKeyword": 100,
})
rows = [
    {k: item.get(k) for k in ("postId", "postUrl", "datePosted", "text", "authorName", "authorUrl",
                              "authorType", "numLikes", "numComments", "matchedKeyword")}
    for item in apify.dataset(run["defaultDatasetId"]).iterate_items()
    if item.get("resultType") == "post"
]
db.table("linkedin_mentions").upsert(rows, on_conflict="postId").execute()
```

The `postId` key makes the upsert idempotent, so a daily run accumulates a clean history of every
public post about your keywords.

#### MCP and AI agents

Through the [Apify MCP server](https://mcp.apify.com/), Claude, Cursor and other agents call this API
as a tool. A useful question: "Which LinkedIn posts about #semiconductors this week got the most
reactions, and who wrote them?" The agent runs the search, sorts by `numLikes` and answers with the
authors and links. See the MCP section above for the URL.

#### Webhooks

For anything custom, an [Apify webhook](https://docs.apify.com/platform/integrations/webhooks) on
`ACTOR.RUN.SUCCEEDED` posts the run's dataset link to your endpoint as soon as a scheduled run finishes.

### 🔗 Related Tools

- [LinkedIn Posts API](https://apify.com/johnvc/linkedin-posts-api?fpr=9n7kx3): every recent post from a person or company you already know, when you want an author's feed rather than a keyword search.
- [LinkedIn Profile API](https://apify.com/johnvc/linkedin-profile-api?fpr=9n7kx3): full public profiles for the authors this search finds.
- [LinkedIn Company API](https://apify.com/johnvc/linkedin-company-api?fpr=9n7kx3): firmographics for the companies that post.
- [LinkedIn People Search API](https://apify.com/johnvc/linkedin-people-search-api?fpr=9n7kx3): find people by name, title, company or school, with no login.
- [Google News API](https://apify.com/johnvc/googlenewsapi?fpr=9n7kx3): news coverage of the same keywords, for a fuller media picture next to the LinkedIn conversation.

For contrast, [LinkedIn Posts Search Scraper by powerai](https://apify.com/powerai/linkedin-posts-search-scraper?fpr=9n7kx3)
covers similar ground but carries a per-run start fee on top of its per-result price and has a
low user rating on the Store. This API charges per search page and per post only, is maintained
weekly, and returns the author, engagement and tagged entities for every post.

### ❓ FAQ

#### Will this put my LinkedIn or LinkedIn Recruiter account at risk?

No. It reads public LinkedIn pages only, the ones anyone can open while signed out. It never logs in and never asks for your cookies: there is no input for an account, a password or an `li_at` session cookie. Nothing it does is tied to your LinkedIn account, your LinkedIn Recruiter seat or your Sales Navigator license. The requests run on Apify's servers, not in your browser, so nothing connects them to you, and you can keep working in Recruiter while a run is going.

#### How do I search LinkedIn posts by keyword?

Enter the keyword, name or phrase in `keywords`, as plain words, and run the Actor. Each keyword is
matched as an exact phrase across public posts on [LinkedIn](https://www.linkedin.com/), and every
matching post comes back as a row with its text, author, date and engagement. Add `postedWithin` or a
date range to narrow it, and `maxPostsPerKeyword` to cap the cost.

#### Can I search LinkedIn posts without an account or login?

Yes, for posts that are public. LinkedIn's own content search needs a login, so this API finds public
posts through search-engine indexing and then reads each post's public page the way a signed-out
visitor sees it. It never asks for your credentials or an `li_at` cookie, and nothing is attributed to
your account.

#### Can I schedule this LinkedIn post search to run every day?

Yes, and that is the way most people use it. Save your input as a
[task](https://docs.apify.com/platform/actors/running/tasks), then attach a
[schedule](https://docs.apify.com/platform/schedules) from the Actor's Actions menu: `0 7 * * *` for
every morning at 7, `0 */6 * * *` for every six hours, `0 9 * * 1` for Mondays. One schedule can
trigger many tasks at once, so a keyword list becomes a set of daily monitors. Use `postedWithin: "day"`
so each run returns only that day's posts. The Integrations section above has the full recipe,
including where to send the rows.

#### Should I use an API or a Web Scraper for LinkedIn posts?

LinkedIn has no public API for searching posts, and its partner APIs are gated and quota bound. A
no-code web scraper gives you the page data but leaves you to build the search, the paging and the
date filter. This Actor combines the two: a clean [API](https://en.wikipedia.org/wiki/API) you call
with keywords and a window, backed by [web scraping](https://en.wikipedia.org/wiki/Web_scraping) of
the public post pages, with no quotas and no login.

#### Can I integrate this LinkedIn Scraper with other apps?

Yes. Through [Apify integrations](https://docs.apify.com/platform/integrations) the results flow to
[Make](https://docs.apify.com/platform/integrations/make),
[Zapier](https://docs.apify.com/platform/integrations/zapier),
[Slack](https://docs.apify.com/platform/integrations/slack), n8n, Google Sheets and Airtable, and an
[Apify webhook](https://docs.apify.com/platform/integrations/webhooks) on `ACTOR.RUN.SUCCEEDED`
triggers anything custom. The Integrations section above has copy-paste recipes.

#### Can I use the LinkedIn Post Search API from code?

Yes. The Apify API runs the Actor, schedules it and fetches datasets, and the `apify-client` package
exists for Python and Node.js. The Actor's own API tab shows the exact calls:
[LinkedIn Post Search API tab](https://apify.com/johnvc/linkedin-post-search-api/api?fpr=9n7kx3).

#### Can I use this Actor through an MCP server?

Yes. Point any MCP client at `https://mcp.apify.com/?tools=actors,docs,johnvc/linkedin-post-search-api`
and it becomes a tool your agent can call, in [Claude Code](https://claude.ai/referral/uIlpa7nPLg)
(free trial), Cursor and others. The [Apify MCP docs](https://docs.apify.com/platform/integrations/mcp)
cover setup.

#### Is there a social listening API for LinkedIn?

This is one: keyword in, public posts with authors and engagement out, on a schedule if you want it.
[Social listening](https://en.wikipedia.org/wiki/Social_media_measurement) tools usually cover
LinkedIn thinly because LinkedIn's content search needs a login; this API reads the public side of
LinkedIn without one, so it fills that gap for brand mentions, competitor tracking and topic research.

#### How do I track a hashtag on LinkedIn?

Enter the hashtag with the `#`, for example `#semiconductors`, and pick a window. Every post under the
hashtag comes back with `numLikes`, `numComments`, `hashtags` and its author, so LinkedIn hashtag
analytics is a sort away: rank by reactions to see which posts and authors lead the tag this week.

#### Does it find every post that mentions my keyword?

It finds the public posts that search engines have indexed, which for most keywords is the large
majority of the visible conversation. Posts from private accounts and posts indexed in the last few
hours may be missing. For a daily monitor, yesterday's posts are usually complete by the next morning.

#### Can I search LinkedIn posts by date?

Yes. `postedWithin` covers the past day, week, month or year, and `startDate` with `endDate` covers
any range. Every post's own timestamp is checked against the window before it is delivered, so you are
not billed for posts outside it.

#### Does it return comments and reactions?

It returns the reaction and comment counts for every post, and up to 10 comments per post, which is
what LinkedIn shows a signed-out visitor. It does not list who reacted.

#### Why did a keyword stop before my maximum?

The search ran out of matching public posts, the date window was exhausted, or the results started
repeating. Each keyword's reason is in the `RUN_SUMMARY` record and the run log.

#### Are results ever served from a cache?

Yes. Posts and search result pages read in the last 7 days are reused, so a repeat of the same search
costs less and finishes faster. Past-day and past-week searches refresh more often (every 6 hours and
every day) so a monitor never misses new posts. A cached post has `fromCache: true` and is billed like
a fresh one; a cached search page is not billed at all.

#### What happens if a search page cannot be fetched?

Busy search pages are retried automatically. A page that still cannot be fetched produces an error row
explaining which keyword and page were affected, and it is never charged.

#### How else can I collect LinkedIn data without a login?

Use the [LinkedIn Posts API](https://apify.com/johnvc/linkedin-posts-api?fpr=9n7kx3) for a known
author's feed, the [LinkedIn Profile API](https://apify.com/johnvc/linkedin-profile-api?fpr=9n7kx3)
to turn the authors you find into full profiles, and the
[LinkedIn People Search API](https://apify.com/johnvc/linkedin-people-search-api?fpr=9n7kx3) to find
people by name, title or company. All of them read only public pages, with no cookies.

***

### 🌐 About Alpha OSINT

This Actor is part of [Alpha OSINT](https://www.alphaosint.com), toolset of financial and operations data sources and APIs.
For support or requests for this actor, please start a ticket [directly on our support page](https://apify.com/johnvc/linkedin-post-search-api/issues/open?fpr=9n7kx3).

Last Updated: 2026.10.20

# Actor input Schema

## `keywords` (type: `array`):

What to find in public LinkedIn posts, one per line, as plain words: a person's name, a company, an event, a phrase or a #hashtag. Each is searched as an exact phrase. Up to 20 per run. Search operators (site:, -word, quotes) are not needed and are refused.

## `postedWithin` (type: `string`):

Only find posts from this recent period. Use 'Past day' for a daily mention monitor. Ignored when a start or end date is set.

## `maxPostsPerKeyword` (type: `integer`):

Stop after delivering this many posts for one keyword. Caps cost. Busy topics can return several hundred; most niche phrases return fewer than 50.

## `startDate` (type: `string`):

Only posts published on or after this day (YYYY-MM-DD, UTC).

## `endDate` (type: `string`):

Only posts published on or before this day (YYYY-MM-DD, UTC).

## `includeArticles` (type: `boolean`):

Also search long-form LinkedIn articles (linkedin.com/pulse) for each keyword. Each keyword then runs two searches.

## Actor input object example

```json
{
  "keywords": [
    "Jackson Hole Symposium",
    "#semiconductors"
  ],
  "postedWithin": "any",
  "maxPostsPerKeyword": 20,
  "includeArticles": false
}
```

# Actor output Schema

## `allResults` (type: `string`):

Every dataset item from this run, including any error rows.

## `posts` (type: `string`):

The matching posts in table form, without error rows.

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

Counts for this run: search pages fetched and served from cache, posts delivered, and why each keyword stopped.

# 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 = {
    "keywords": [
        "Jackson Hole Symposium"
    ],
    "maxPostsPerKeyword": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnvc/linkedin-post-search-api").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 = {
    "keywords": ["Jackson Hole Symposium"],
    "maxPostsPerKeyword": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("johnvc/linkedin-post-search-api").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 '{
  "keywords": [
    "Jackson Hole Symposium"
  ],
  "maxPostsPerKeyword": 20
}' |
apify call johnvc/linkedin-post-search-api --silent --output-dataset

```

## MCP server setup

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

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/38C6mzW6yYzSU2aYs/builds/vPaGFzF1fNAwEGxhD/openapi.json
