# LinkedIn Post Comments Scraper (No Cookies) (`capable_cauldron/linkedin-post-comments-scraper`) Actor

Comments, replies and everyone who reacted on any public LinkedIn post. No cookies or login. Per-comment reaction breakdown, post-author flag, thread position, keyword and recency filters.

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

## Pricing

from $1.50 / 1,000 comment scrapeds

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

This **LinkedIn post comments scraper** collects **comments, replies and reactions** from any public post link and exports them as **JSON, CSV or Excel**, with no LinkedIn login or cookies. Paste one or more post URLs, say how many comments you want, and every row comes back with the commenter's name, headline, profile URL, the comment text, a 7-way reaction breakdown and a flag telling you whether the post author wrote it. Turn on reactions and you also get the people who liked or celebrated the post without commenting.

Built on Apify, so you can **schedule** runs, call it from the **API** or a webhook, push rows to **Google Sheets** or your CRM, and cap spend per run. Click **Try for free** to open it in Console. Apify's free plan includes $5 of monthly credit, which buys about **3,000 comments**.

See a real run in 47 seconds:

[![LinkedIn Post Comments Scraper demo video, 47 seconds](https://api.apify.com/v2/key-value-stores/9FGooi7IrKs0P8DcV/records/linkedin-post-comments-scraper-demo-poster.jpg)](https://api.apify.com/v2/key-value-stores/9FGooi7IrKs0P8DcV/records/linkedin-post-comments-scraper-demo.mp4)

▶️ [Watch the 47-second demo](https://api.apify.com/v2/key-value-stores/9FGooi7IrKs0P8DcV/records/linkedin-post-comments-scraper-demo.mp4) (MP4, 23 MB, opens in your browser) · [Transcript](https://api.apify.com/v2/key-value-stores/9FGooi7IrKs0P8DcV/records/linkedin-post-comments-scraper-demo-transcript.srt)

### What can LinkedIn Post Comments Scraper do?

- 💬 Scrape **comments and replies** from any public LinkedIn post, no cookies needed
- 👍 Pull **everyone who reacted** (like, celebrate, love, insightful, support, funny, curious), filterable by type
- 👤 Return **name, headline, profile URL, profile id and person/company type** for every commenter and reactor
- 📊 Give each comment its **reaction breakdown, reply count, thread rank and engagement score**
- 🏷️ Flag **the post author's own comments** and measure **hours between post and comment**
- 🔎 Filter by **keyword, minimum reactions, recency window**, or drop the author's replies
- 🧹 **One row per person** mode for a clean lead list across many posts
- 💸 **Pay per row**. Rows removed by a filter are never billed

#### What data can you extract from LinkedIn comments?

Every comment or reply row carries 49 fields. The ones people use most:

| Field | Description |
|---|---|
| `itemType` | `comment`, `reply` or `reaction` |
| `text` | Full comment text |
| `commentUrl` | Direct link to the comment on LinkedIn |
| `createdAt` | When it was posted (ISO 8601, UTC) |
| `personName`, `personHeadline`, `personUrl` | Who wrote or reacted, with their headline and profile link |
| `personProfileId` | Stable LinkedIn id. Use it to match people across posts |
| `personType` | `person` or `company` (company pages comment and react too) |
| `isPostAuthor` | `true` when the comment is by the account that published the post |
| `isReply`, `parentCommentId`, `parentCommenterName` | Thread position |
| `totalReactions`, `reactionLike` ... `reactionCurious` | How the comment itself was received |
| `replyCount`, `engagement`, `rank` | Reply count, reactions plus replies, and order in the thread |
| `hoursAfterPost` | Hours between the post and the comment |
| `isQuestion`, `hasUrl`, `urls`, `hashtags`, `wordCount` | Text signals for sorting and filtering |
| `reactionType` | On reaction rows: `like`, `celebrate`, `love`, `insightful`, `support`, `funny` or `curious` |
| `postUrl`, `postAuthorName`, `postPostedAt`, `postCommentsTotal` | The post each row belongs to |

The Console **People** view lists commenters and reactors side by side; **Top comments** sorts the thread by engagement.

### How to scrape LinkedIn post comments

1. Click **Try for free** to open the Actor in Apify Console.
2. Paste your **LinkedIn post URLs**. Any post link works: the `/posts/...` link from the share button, a `/feed/update/urn:li:activity:...` link, or the bare activity id.
3. Set **Max comments per post**. 50 is enough to see what the data looks like.
4. Optional: tick **Also scrape who reacted** and pick the reaction types you care about.
5. Click **Start**. Rows stream into the dataset as each post is processed.
6. Open the **Storage** tab and export as CSV, Excel or JSON, or fetch the dataset from the API.

No LinkedIn account is involved at any point.

### How much does it cost to scrape LinkedIn post comments?

Pricing is per row. There is no charge for compute time.

| Event | When it fires | Price |
|---|---|---|
| `comment-scraped` | Each comment or reply added to your dataset | $0.0015 |
| `reaction-scraped` | Each reaction row added to your dataset | $0.0008 |
| `post-processed` | Each post URL processed, even if it returns nothing | $0.01 |

**Worked examples**

- 100 comments from 1 post costs **$0.16**
- 2,000 comments from 10 posts costs **$3.10**
- 5 posts with 100 comments and 500 reactions each costs **$2.80**

Apify's free plan ($5/month) covers roughly 3,000 comments. Rows removed by `keywords`, `minCommentReactions`, `postedWithin` or `dedupePeople` are never pushed, so they cost nothing. To cap spend, set `maxCommentsPerPost`, `maxReactionsPerPost` and `maxDatasetItems`; the run stops as soon as a limit is hit.

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `postUrls` | array | yes | — | LinkedIn post URLs, `urn:li:activity:...` URNs or bare ids. Up to 1,000 per run |
| `maxCommentsPerPost` | integer | no | 100 | Comment rows per post, 1 to 5,000. Replies count toward it |
| `includeReplies` | boolean | no | `true` | Return replies as their own rows with `parentCommentId` |
| `sortOrder` | string | no | `mostRelevant` | `mostRelevant` (LinkedIn's thread order) or `mostRecent` (newest first) |
| `postedWithin` | string | no | `any` | Keep only comments from the last `24h`, `week`, `month`, `3months`, `6months` or `year` |
| `keywords` | array | no | `[]` | Keep only comments containing one of these words or phrases |
| `minCommentReactions` | integer | no | 0 | Skip comments with fewer reactions than this |
| `excludeAuthorComments` | boolean | no | `false` | Drop comments and replies written by the post's author |
| `includeReactions` | boolean | no | `false` | Also return one row per reaction |
| `maxReactionsPerPost` | integer | no | 100 | Reaction rows per post, 1 to 5,000 |
| `reactionTypes` | array | no | `[]` | Only these reaction types: `like`, `celebrate`, `love`, `insightful`, `support`, `funny`, `curious` |
| `dedupePeople` | boolean | no | `false` | Keep the first row per person across the whole run |
| `maxDatasetItems` | integer | no | 10000 | Hard cap on rows saved across all posts |

```json
{
  "postUrls": [
    "https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08"
  ],
  "maxCommentsPerPost": 50,
  "includeReplies": true,
  "sortOrder": "mostRelevant",
  "includeReactions": true,
  "maxReactionsPerPost": 50
}
```

#### Which sort order should I pick?

`mostRelevant` walks the thread the way LinkedIn shows it and is the default. `mostRecent` lists newest first and pairs with `postedWithin`: the run stops paging the moment it reaches comments older than the window, so a scheduled "what came in this week" job costs only the new rows.

### Output

Each comment, reply or reaction is one dataset item. This is a comment row from the input above:

```json
{
  "itemType": "comment",
  "commentId": "7197584194053513216",
  "commentUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7196223849250627584?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7196223849250627584%2C7197584194053513216%29",
  "text": "Why isn't there any Customer Service with Google? When someone is stealing your ad and reviews, you can not reach anyone by phone nor email.",
  "createdAt": "2024-05-18T13:09:56.511000Z",
  "createdAtTimestamp": 1716037796511,
  "isReply": false,
  "parentCommentId": null,
  "parentCommenterName": null,
  "replyCount": 3,
  "isEdited": false,
  "isPinned": false,
  "rank": 1,
  "personName": "Pat M.",
  "personHeadline": "Hard Worker with many different skills to share.",
  "personUrl": "https://www.linkedin.com/in/pat-m-5314221b6",
  "personProfileId": "ACoAADJAgnUBVjObaUWmRKkntr2JIlK5FIQYFa8",
  "personUsername": "pat-m-5314221b6",
  "personPicture": "https://media.licdn.com/dms/image/v2/.../profile-displayphoto-shrink_800_800/0/1662051050466",
  "personType": "person",
  "isPostAuthor": false,
  "totalReactions": 19,
  "reactionLike": 18,
  "reactionCelebrate": 0,
  "reactionLove": 1,
  "reactionInsightful": 0,
  "reactionSupport": 0,
  "reactionFunny": 0,
  "reactionCurious": 0,
  "engagement": 22,
  "wordCount": 26,
  "charCount": 141,
  "hashtags": [],
  "urls": [],
  "hasUrl": false,
  "isQuestion": true,
  "hoursAfterPost": 90.1,
  "reactionType": null,
  "postId": "7196224250288955393",
  "postUrn": "urn:li:activity:7196224250288955393",
  "postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7196224250288955393/",
  "inputUrl": "https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08",
  "postAuthorName": "Google",
  "postAuthorUrl": "https://www.linkedin.com/company/google/",
  "postPostedAt": "2024-05-14T19:06:00.650000Z",
  "postTotalReactions": 7095,
  "postCommentsTotal": 436,
  "postRepostsCount": 613,
  "scrapedAt": "2026-09-16T10:30:00Z"
}
```

A reaction row has `itemType: "reaction"`, `reactionType`, the same `person*` and `post*` blocks, and no comment fields.

A run summary is saved to the key-value store as `OUTPUT`, with per-post counts (`commentsTotal` on the post versus what was collected). Its `message` is also shown as the run's status in Console:

```json
{
  "status": "SUCCESS",
  "reason": null,
  "stats": { "comments": 41, "replies": 9, "reactions": 50, "posts_processed": 1, "filtered_out": 0, "items": 100 },
  "posts": [
    { "postId": "7196224250288955393", "commentsTotal": 436, "commentsCollected": 41, "repliesCollected": 9, "reactionsCollected": 50, "postAuthorName": "Google", "error": null }
  ],
  "message": "Collected 41 comments, 9 replies and 50 reactions from 1 of 1 post."
}
```

`status` is `SUCCESS`, `PARTIAL_SUCCESS` (some posts could not be read), `NO_RESULTS`, `STOPPED` (the run could not continue, and `message` says why) or `VALIDATION_ERROR` (a problem with the input). A post that could not be read carries its reason in `posts`, and is not charged.

### Use cases

Start with one of these six prefilled examples:

- [Scrape comments from a LinkedIn post (no cookies)](https://apify.com/capable_cauldron/linkedin-post-comments-scraper/examples/lpcs-scrape-comments-from-a-linkedin-post-no-cookies)
- [Build a lead list from everyone who engaged with a post](https://apify.com/capable_cauldron/linkedin-post-comments-scraper/examples/lpcs-build-a-lead-list-from-everyone-who-engaged)
- [Find who reacted to a LinkedIn post](https://apify.com/capable_cauldron/linkedin-post-comments-scraper/examples/lpcs-find-who-reacted-to-a-linkedin-post)
- [Pull the 'interested' comments from a giveaway post](https://apify.com/capable_cauldron/linkedin-post-comments-scraper/examples/lpcs-pull-comment-interested-replies-from-a-post)
- [Monitor new comments on a post this week](https://apify.com/capable_cauldron/linkedin-post-comments-scraper/examples/lpcs-monitor-new-comments-on-a-post-this-week)
- [Rank the top comments on a LinkedIn post](https://apify.com/capable_cauldron/linkedin-post-comments-scraper/examples/lpcs-rank-the-top-comments-on-a-linkedin-post)

### API and integrations

Run it from your own code with the Apify API. Swap in your token; the Actor id stays as written.

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("capable_cauldron/linkedin-post-comments-scraper").call(run_input={
    "postUrls": ["https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08"],
    "maxCommentsPerPost": 100,
    "includeReactions": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["itemType"], item["personName"], "-", item.get("text") or item.get("reactionType"))
```

**JavaScript**

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "<YOUR_API_TOKEN>" });
const run = await client.actor("capable_cauldron/linkedin-post-comments-scraper").call({
  postUrls: ["https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08"],
  maxCommentsPerPost: 100,
  includeReactions: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**CLI**

```bash
apify call capable_cauldron/linkedin-post-comments-scraper --input-file input.json --silent --output-dataset
```

Connect results to **Google Sheets, HubSpot, Airtable, Slack, Make, Zapier or n8n** from the Actor's **Integrations** tab, run it on a **Schedule** to watch a post over time, or fire a **webhook** when a run finishes.

### FAQ

#### Is it legal to scrape LinkedIn comments?

This Actor collects comments and reactions that are publicly visible on LinkedIn, without logging in. You are responsible for how you use the data, including compliance with LinkedIn's terms and the data-protection laws that apply to you (GDPR, CCPA). If you build outreach lists, respect opt-outs and local rules on unsolicited contact.

#### Do I need a LinkedIn account or cookies?

No. You paste post links and nothing else. Nothing is done with your LinkedIn account and there is nothing to refresh weekly.

#### Why did I get fewer comments than I asked for?

Either the post has fewer public comments than `maxCommentsPerPost` (the run summary shows `commentsTotal` for the post), a filter removed some (`filtered_out` in the summary), or `maxDatasetItems` was reached across all posts. Replies are returned as LinkedIn attaches them to a comment, so very long reply chains can be shorter than `replyCount`.

#### Why is `isPostAuthor` null on some rows?

The author check needs the post's own details. When those cannot be loaded for a post, the flag is `null` rather than a guess, and `hoursAfterPost` is `null` too. Everything else on the row is unaffected.

#### Can I get only the people who reacted, without comments?

Set `maxCommentsPerPost` to 1, turn on `includeReactions`, and set `maxReactionsPerPost` to the number you need. Pick specific `reactionTypes` if you only want, say, celebrations.

#### Can I scrape LinkedIn comments with Python?

Yes. See the Python snippet under **API and integrations**. The `apify-client` package is on PyPI; pass the same input you would use in Console.

#### How do I find the posts to scrape?

Pair this Actor with [LinkedIn Profile Posts Scraper](https://apify.com/capable_cauldron/linkedin-profile-posts-scraper). Scrape a profile's posts first, then feed the `post_url` values into `postUrls` here. Both run without cookies.

### Other Actors by capable_cauldron

| Actor | What it does |
|---|---|
| [App Store Reviews Scraper](https://apify.com/capable_cauldron/app-store-reviews-scraper) | Reviews and ratings for iPhone and iPad apps, grouped by app and country |
| [Company Job Postings Scraper](https://apify.com/capable_cauldron/ats-jobs-scraper) | Open roles and hiring summaries from supported company job boards |
| [Bulk Email Validator](https://apify.com/capable_cauldron/email-validator) | Syntax, mail-routing, disposable-domain and role-inbox checks |
| [Verified Work Email Finder](https://apify.com/capable_cauldron/verified-work-email-finder) | Verified professional emails from LinkedIn URLs or a name and company domain |
| [GTM Account Enrichment](https://apify.com/capable_cauldron/gtm-account-enrichment) | Public company contacts, technologies and hiring signals with an account fit score |
| [LinkedIn Profile Posts & Comments Scraper](https://apify.com/capable_cauldron/linkedin-profile-posts-comments-scraper) | Posts from any LinkedIn profile with up to 50 comments and replies per post, no cookies needed |
| [Investor Database Search](https://apify.com/capable_cauldron/investor-database-search) | Filter investors by stage, industry and geography and export available partner contacts |
| [LinkedIn Comment Scraper](https://apify.com/capable_cauldron/linkedin-comment-scraper) | LinkedIn comments and replies using your own session cookies |
| [LinkedIn Profile Posts Scraper](https://apify.com/capable_cauldron/linkedin-profile-posts-scraper) | Public profile posts with 56 enriched fields, including engagement and content metadata |
| [Ad Scraper: Meta, Google, LinkedIn & TikTok](https://apify.com/capable_cauldron/multi-channel-ad-intelligence) | Competitor ads from Meta, Google, LinkedIn and TikTok in one dataset |
| [TikTok Shop USA Scraper](https://apify.com/capable_cauldron/tiktok-shop-usa-scraper) | US product, shop, creator and shoppable-video data from TikTok Shop |
| [Website Contact Scraper](https://apify.com/capable_cauldron/website-contact-scraper) | Public emails, phone numbers and social profile links from company websites |
| [Website Tech Stack Detector](https://apify.com/capable_cauldron/website-tech-stack-detector) | Visible website technologies and the evidence supporting each detection |
| [LinkedIn Post Search Scraper](https://apify.com/capable_cauldron/linkedin-post-search-scraper) | Keyword searches for public LinkedIn posts with text, authors and engagement |

### Support

Found a bug or need a field that isn't here? Open an issue on the Actor's **Issues** tab. Issues are usually answered within 24 hours. If you need a custom version (profile enrichment for each commenter, sentiment labels, a private deployment), describe it in an issue and we will scope it.

# Actor input Schema

## `postUrls` (type: `array`):

One or more LinkedIn posts. Any of these forms work:

- https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08
- https://www.linkedin.com/feed/update/urn:li:activity:7196224250288955393/
- urn:li:activity:7196224250288955393 or the bare id 7196224250288955393

Tracking parameters (utm_source, rcm, ...) are stripped automatically. Up to 1,000 posts per run.

## `maxCommentsPerPost` (type: `integer`):

Upper bound on comment rows per post. Replies count toward it when they are included. The post is billed for the rows you actually receive.

## `includeReplies` (type: `boolean`):

Also return replies under each comment as their own rows (itemType = reply, with parentCommentId). Turn off for top-level comments only.

## `sortOrder` (type: `string`):

Most relevant is LinkedIn's default thread order. Most recent lists newest first and is the right choice with a Posted within window or when you monitor a post on a schedule.

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

Keep only comments posted inside this window. Combine with Most recent so the run stops paging as soon as it reaches older comments.

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

Keep only comments whose text contains at least one of these words or phrases (case-insensitive). Example: interested, send me, DM. Leave empty for all comments.

## `minCommentReactions` (type: `integer`):

Skip comments with fewer reactions than this. Set to 1 or more to keep only comments that got a response.

## `excludeAuthorComments` (type: `boolean`):

Drop comments and replies written by the person or company that published the post.

## `includeReactions` (type: `boolean`):

Add one row per reaction (itemType = reaction) with the reactor's name, headline, profile URL and reaction type. Billed as a separate, cheaper event.

## `maxReactionsPerPost` (type: `integer`):

Upper bound on reaction rows per post.

## `reactionTypes` (type: `array`):

Only collect these reaction types. Leave empty for all of them.

## `dedupePeople` (type: `boolean`):

Keep only the first row for each person across every post in the run, so the dataset is a clean lead list instead of a full transcript. Skipped duplicates are not billed.

## `maxDatasetItems` (type: `integer`):

Hard cap on rows saved across all posts. The run stops when it is reached.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08"
  ],
  "maxCommentsPerPost": 100,
  "includeReplies": true,
  "sortOrder": "mostRelevant",
  "postedWithin": "any",
  "keywords": [],
  "minCommentReactions": 0,
  "excludeAuthorComments": false,
  "includeReactions": false,
  "maxReactionsPerPost": 100,
  "reactionTypes": [],
  "dedupePeople": false,
  "maxDatasetItems": 10000
}
```

# Actor output Schema

## `rows` (type: `string`):

Dataset rows. `itemType` is comment, reply or reaction; every row carries the person\* block and the post\* block.

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

Status, per-post counts (commentsTotal vs collected), and categorised error counters.

# 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 = {
    "postUrls": [
        "https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("capable_cauldron/linkedin-post-comments-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 = { "postUrls": ["https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08"] }

# Run the Actor and wait for it to finish
run = client.actor("capable_cauldron/linkedin-post-comments-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 '{
  "postUrls": [
    "https://www.linkedin.com/posts/google_welcome-to-the-gemini-era-activity-7196224250288955393-hd08"
  ]
}' |
apify call capable_cauldron/linkedin-post-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,capable_cauldron/linkedin-post-comments-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/HvxzgCgw3OKSrIgFq/builds/ADZHFe2tvBaWutvvq/openapi.json
