# LinkedIn Post Scraper (`data_minds/linkedin-post-scraper`) Actor

Scrape public LinkedIn posts from company pages, profiles, post links, searches and keywords with no login or cookies. Full text, author, media, reactions and comments. Date and type filters, auto proxy fallback. Export JSON, CSV or Excel.

- **URL**: https://apify.com/data_minds/linkedin-post-scraper.md
- **Developed by:** [Data Minds](https://apify.com/data_minds) (community)
- **Security:** Limited permissions
- **Stats:** 8 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

### What is LinkedIn Post Scraper?

**LinkedIn Post Scraper** is a LinkedIn post scraper that turns public posts from post links, profiles, company pages and content searches into structured data, with no cookies or login. Add your LinkedIn URLs or keywords and get one row per post: text, author, media, reactions, comments and publish time, ready for lead generation, competitor monitoring and social listening. Pay per post: $1.50 per 1,000 on the Free plan, $1.00 on Gold. [🚀 Try it free](https://apify.com/data_minds/linkedin-post-scraper)

Use it when you want LinkedIn data extraction without building anything yourself:

- **Lead generation:** find the people and companies posting about your topic, with author headline and follower count.
- **Competitor monitoring:** follow what rival company pages publish and how their posts perform.
- **Social listening and brand monitoring:** collect public posts about a keyword or hashtag.
- **Content marketing research:** see which topics and formats earn reactions and comments, and spot trending topics.
- **Thought leadership research and influencer research:** compare authors by headline, followers and the influencer flag.
- **B2B market research and sales intelligence:** build a list of accounts and decision makers that post about your market.
- **Engagement analysis:** compare reactions, top reaction types and comment counts, as LinkedIn post analytics in a table.
- **AI dataset building:** use clean post text and metadata as AI training data or in an LLM data pipeline.

The Apify platform adds scheduling, an API, webhooks, integrations and export to JSON, CSV, Excel, XML or HTML.

#### What can LinkedIn Post Scraper do?

- 🔗 Scrape LinkedIn posts from any mix of post links, profile links, company, school and showcase pages, and content-search links.
- 🔎 Run a keyword or hashtag search and collect the matching public posts as a LinkedIn post search scraper.
- 📅 Keep only recent posts with a date cut-off such as `30 days` or `2026-01-01`.
- 💬 Collect post comments with author, text, time and reactions, and see how many exist in total.
- 🎯 Filter by post type, author type, minimum reactions or comments, phrases and hashtags.
- 📦 Download LinkedIn posts in bulk and export LinkedIn posts to CSV or JSON, with repost tracking through `isRepost` and `repostedBy`.
- 💳 Pay only for stored posts, with a spend limit you control.

### What data can LinkedIn Post Scraper extract?

Each dataset row is one LinkedIn post. With the option Flatten output turned on, nested fields are written as dotted keys such as `author.name`.

| Data | Fields | Notes |
|---|---|---|
| 🔗 Post identity | `url`, `urn`, `activityId`, `attributedUrn`, `shareUrl` | Link and IDs of the post |
| 📅 Time | `postedAt`, `postedAtRelative`, `isEdited` | Publish time and whether the post was edited |
| 📝 Content | `text`, `hashtags`, `mentions`, `links`, `language` | Full text, tags, mentioned profiles and external links |
| 🧩 Type | `postType`, `isRepost`, `repostedBy`, `reshared` | text, image, video, article, document, reshare or unknown |
| 👤 Author | `author.type`, `author.name`, `author.url`, `author.slug`, `author.headline`, `author.followers`, `author.imageUrl`, `author.isInfluencer` | Person or company that wrote the post |
| 🎬 Media | `media.images`, `media.videos`, `media.article`, `media.document` | Image URLs with alt text, video renditions, shared article, document or carousel |
| 👍 Engagement | `engagement.reactions`, `engagement.comments`, `engagement.reposts`, `engagement.topReactionTypes`, `likers` | Reaction and comment totals |
| 💬 Comments | `comments`, `commentsAvailable`, `commentsTruncated` | Each comment has `id`, `urn`, `parentUrn`, `text`, `postedAt`, `postedAtRelative`, `reactions`, `author` |
| 🧾 Source and status | `_source.url`, `_source.type`, `_source.discoveredVia`, `_status`, `_note`, `_parseWarnings`, `_scrapedAt`, `_schemaVersion` | Where the post came from and how complete the row is |
| 📁 Raw data | `raw` | Only when Get raw data is turned on |

> **Note:** Not every field exists on every post. `_parseWarnings` lists the core fields that could not be read for a row. `engagement.reposts` is part of each record but is currently left empty, and `likers` is always an empty list.

#### What data can't LinkedIn Post Scraper extract?

- Posts that LinkedIn shows only to logged-in members. If you enter such a post link directly, you get a short record with `_status` set to `gated` instead.
- The list of people who liked a post. Total reaction counts are returned.
- More than the comments that logged-out visitors can see, about 10 per post.

### How to scrape LinkedIn posts

1. Create a free Apify account at [console.apify.com/sign-up](https://console.apify.com/sign-up).
2. Open [LinkedIn Post Scraper](https://apify.com/data_minds/linkedin-post-scraper) on Apify.
3. Paste one or more LinkedIn links into **Source URLs**, or add topics and hashtags to **Keywords**.
4. Set **Limit per source** to the number of posts you want per link or keyword.
5. Optionally add a **Scrape until date**, post type, author type or text filters.
6. Click **Start** and watch posts appear in the Output tab while the run is going.
7. Export the dataset as JSON, CSV, Excel, XML or HTML, or read it through the API.

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

LinkedIn Post Scraper uses pay-per-event pricing: you pay for each post stored in the dataset, plus a small start fee per run. Apify platform usage is billed in addition. The price per post depends on your Apify plan.

| Plan | Price per post | Price per 1,000 posts |
|---|---|---|
| 🆓 Free | $0.0015 | $1.50 |
| 🥉 Bronze | $0.0013 | $1.30 |
| 🥈 Silver | $0.0012 | $1.20 |
| 🥇 Gold | $0.001 | $1.00 |

Each run also pays one start event of $0.00005, because the Actor starts with 1024 MB of memory (one start event per GB, minimum one).

**Worked example:** 1,000 posts on the Free plan cost $1.50 plus the $0.00005 start event, with platform usage billed in addition. The same 1,000 posts on the Gold plan cost $1.00.

Every row saved to the dataset is one billed post. That includes the short `gated` and `deleted` records for post links you entered directly, so turn off **Include login-only posts** if you do not want them. Set a maximum cost per run on Apify and the run stops cleanly when the limit is reached. See the [pricing page](https://apify.com/data_minds/linkedin-post-scraper/pricing) for current prices.

#### Is scraping LinkedIn free?

You can try it without paying: every Apify account gets a monthly free credit of $5. At the Free plan price of $0.0015 per post, $5 covers about 3,333 posts before platform usage. Higher plans pay less per post.

### Input

Only **Source URLs** is required in the input form. Keywords are optional and each keyword counts as one source. Here is the default input:

```json
{
  "urls": ["https://www.linkedin.com/company/amazon"],
  "limitPerSource": 10,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

See the full [input schema](https://apify.com/data_minds/linkedin-post-scraper/input-schema) for every option.

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `urls` | array | yes | none | Post, profile, company, school, showcase or content-search links, one per line |
| `keywords` | array | no | none | Topics or hashtags to find public posts about |
| `limitPerSource` | integer | no | 10 (also the form prefill) | Maximum posts per link or keyword; when left empty, 10 posts per source are collected |
| `scrapeUntil` | string | no | none | Keep posts on or after a date (`YYYY-MM-DD`) or a relative value such as `7 days` |
| `deepScrape` | boolean | no | `true` | Open each post page for comments, exact time, document info and related posts |
| `fetchDocumentDetails` | boolean | no | `false` | For document and carousel posts, add every page image and the text transcript |
| `numComments` | integer | no | `5` | Maximum comments per post, 0 to 1000 |
| `numLikes` | integer | no | `0` | Accepted for compatibility; `likers` stays empty |
| `rawData` | boolean | no | `false` | Add the unprocessed post data under `raw` |
| `discoverMorePosts` | boolean | no | `true` | Also collect older posts by the same author until the limit is reached |
| `includeReposts` | boolean | no | `true` | Keep posts the author reposted |
| `includeProfileActivity` | boolean | no | `false` | For profiles, also include posts by others that the person reposted or reacted to |
| `includeGated` | boolean | no | `true` | Return a short record for login-only post links you entered directly |
| `postTypes` | array | no | all | Keep only text, image, video, article, document, reshare or unknown posts |
| `authorTypes` | array | no | both | Keep only `person` or only `company` authors |
| `minReactions` | integer | no | none | Skip posts with fewer reactions |
| `minComments` | integer | no | none | Skip posts with fewer comments |
| `mustContain` | array | no | none | Keep a post only if its text has at least one phrase (case-insensitive) |
| `mustNotContain` | array | no | none | Skip a post if its text has any of these phrases |
| `hashtags` | array | no | none | Keep a post only if it uses at least one of these hashtags |
| `saveMedia` | boolean | no | `false` | Save images, the best video rendition and document pages to the key-value store |
| `maxMediaBytes` | integer | no | `52428800` | Skip media files larger than this many bytes (50 MB) |
| `flattenOutput` | boolean | no | `false` | Write nested objects as dotted keys, handy for CSV |
| `maxConcurrency` | integer | no | `4` | Posts processed at the same time, 1 to 32 |
| `requestDelaySeconds` | number | no | `2` | Seconds to wait between requests to the same site, 0 to 30 |
| `maxRetries` | integer | no | `3` | Retries for a failed request, 0 to 10 |
| `requestTimeoutSeconds` | integer | no | `30` | Seconds to wait for one page, 5 to 120 |
| `proxyConfiguration` | object | no | none | Optional proxy setting; the default works for most runs |

#### Tricky input fields

**Source URLs (`urls`)**

- ✅ Good: `https://www.linkedin.com/company/amazon` for a company page
- ✅ Good: `https://www.linkedin.com/in/satyanadella` for a profile
- ✅ Good: a LinkedIn content-search link, whose keywords are searched
- ❌ Bad: a link to a LinkedIn job, event or group, which is not a supported source

**Limit per source (`limitPerSource`)**

- ✅ Good: `10` for a quick test of each link
- ❌ Bad: leaving it empty and expecting every post, because an empty field collects 10 posts per source

> **Warning:** The limit applies to each link and each keyword, not to the whole run. Five links with a limit of 10 can return up to 50 posts.

**Scrape until date (`scrapeUntil`)**

- ✅ Good: `2026-01-01` or `3 months`
- ❌ Bad: `last quarter`, which is not understood and the date filter is ignored

**Include login-only posts (`includeGated`)**

- ✅ Good: keep it on when you want to see which of your links were not readable
- ❌ Bad: keeping it on when every stored record is billed and you only want full posts

### Output

Results appear in the run's dataset as soon as each post is ready. You can browse them in the Output tab as Posts, Authors, Engagement, Media, Comments and Source views, and download them as JSON, CSV, Excel, XML or HTML. A `SUMMARY` record in the key-value store holds the run counts and the stop reason. Downloaded media files are saved to the same store when **Download media** is on.

#### JSON example

This example continues the input above, a post from a company page:

```json
{
  "urn": "urn:li:activity:7000000000000000000",
  "activityId": "7000000000000000000",
  "attributedUrn": null,
  "url": "https://www.example.com/posts/example-company_launch-activity-7000000000000000000-AbCd",
  "shareUrl": "https://www.example.com/posts/example-company_launch-activity-7000000000000000000-AbCd",
  "postedAt": "2026-10-20T09:15:00+00:00",
  "postedAtRelative": "2w",
  "isEdited": false,
  "author": {
    "type": "company",
    "name": "Example Company",
    "url": "https://www.example.com/company/example-company",
    "slug": "example-company",
    "headline": "Example tagline",
    "followers": 120000,
    "imageUrl": "https://www.example.com/logo.png",
    "isInfluencer": false
  },
  "text": "We just launched something new. Read more on our blog. #launch",
  "hashtags": ["launch"],
  "mentions": [],
  "links": ["https://www.example.com/blog/launch"],
  "postType": "image",
  "isRepost": false,
  "repostedBy": null,
  "media": {
    "videos": [],
    "images": [
      { "url": "https://www.example.com/image-1.jpg", "alt": "Launch banner", "position": 0, "contentCredentials": null }
    ],
    "article": null,
    "document": null
  },
  "reshared": null,
  "engagement": {
    "reactions": 350,
    "comments": 12,
    "reposts": null,
    "topReactionTypes": ["LIKE", "PRAISE"]
  },
  "comments": [
    {
      "id": "7000000000000000001",
      "urn": "urn:li:comment:(urn:li:activity:7000000000000000000,7000000000000000001)",
      "parentUrn": null,
      "text": "Congratulations on the launch!",
      "postedAt": "2026-10-20T10:00:00+00:00",
      "postedAtRelative": "2w",
      "reactions": 3,
      "author": {
        "type": "person",
        "name": "Example Person",
        "url": "https://www.example.com/in/example-person",
        "slug": "example-person",
        "headline": null,
        "followers": null,
        "imageUrl": null,
        "isInfluencer": false
      }
    }
  ],
  "likers": [],
  "language": "en",
  "_parseWarnings": [],
  "commentsAvailable": 1,
  "commentsTruncated": true,
  "_source": {
    "url": "https://www.example.com/company/example-company",
    "type": "company",
    "discoveredVia": "company-feed"
  },
  "_scrapedAt": "2026-11-07T12:00:00+00:00",
  "_status": "ok",
  "_schemaVersion": "1.0",
  "_note": "Only 1 of 12 comments are visible to logged-out visitors"
}
```

Values for `_source.type` are `post`, `company`, `profile` or `keyword`. Values for `_status` are `ok`, `gated`, `deleted` or `error`. A `_note` field is added only when there is something to explain.

#### Notes and limitations

- Only public posts are collected. Posts that need a login are skipped, or returned as a short `gated` record when you entered the link directly and **Include login-only posts** is on.
- Logged-out visitors see about 10 comments per post. Use `commentsAvailable` and `commentsTruncated` to see whether more exist.
- Company and profile pages show only the newest posts to visitors. **Discover more posts** adds older posts by the same author, up to your limit.
- The number of posts found can be lower than your limit when filters remove posts or when there are fewer public posts.

### Tips and advanced usage

- Start with a limit of 10 per source, check the output, then raise it.
- Combine **Scrape until date** with a larger limit to collect only fresh posts on a schedule.
- Turn on **Flatten output** before exporting to CSV or Excel.
- Use **Text must contain** and **Hashtags filter** to keep a LinkedIn social listening feed focused.
- Turn off **Scrape additional information** for a faster run with fewer details per post. Comments and exact details are then limited.
- Turn on **Download media** for a LinkedIn media download of images, videos and document pages; each media item then has a `saved.location` link.
- Use scheduled scraping on Apify to monitor a company page every day and send results to a webhook.
- Each row is structured JSON data that loads into a spreadsheet or database, and pay per result pricing keeps costs predictable.

### Integrations and API

#### Can I use LinkedIn Post Scraper as an API?

Yes. Run it with the [Apify API](https://docs.apify.com/api/v2) or the official apify-client libraries for Node.js and Python, then read the dataset items. Request examples are on the [API tab](https://apify.com/data_minds/linkedin-post-scraper/api) of the Actor.

#### How to scrape LinkedIn posts with Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("data_minds/linkedin-post-scraper").call(run_input={
    "urls": ["https://www.linkedin.com/company/amazon"],
    "limitPerSource": 10,
    "proxyConfiguration": {"useApifyProxy": False},
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["author"]["name"], item["text"])
```

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

Yes. Connect it to Make, Zapier, Google Sheets or Slack, or trigger your own endpoint with [webhooks](https://docs.apify.com/integrations/webhooks). You can also schedule runs so new posts arrive on a fixed interval.

#### Can I use LinkedIn Post Scraper with AI agents (MCP)?

Yes. The Actor can be used through Apify's MCP server, so AI assistants can call it and read the results. Setup details are on the [MCP tab](https://apify.com/data_minds/linkedin-post-scraper/api/mcp).

### Other LinkedIn scrapers

| Actor | What it does |
|---|---|
| 📢 [LinkedIn Ads Library Scraper](https://apify.com/data_minds/linkedin-ads-library-scraper) | Turns the public LinkedIn Ad Library into a dataset for competitor ad research. |
| 📣 [LinkedIn Ads Scraper](https://apify.com/data_minds/linkedin-ads-scraper) | Scrapes the LinkedIn Ad Library by keyword, company, advertiser, payer or search link. |
| 👥 [LinkedIn People Search Scraper](https://apify.com/data_minds/linkedin-people-search-scraper) | Finds public LinkedIn profiles by keyword, job title, location and company. |
| 🔁 [Post Reshares & Reposts Scraper for LinkedIn (No Cookies)](https://apify.com/data_minds/post-reshares-reposts-scraper-for-linkedin-no-cookies) | Scrapes public LinkedIn posts from links or IDs, including reposted originals. |

### FAQ

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

Scraping publicly available data is generally allowed in many places, but the rules depend on your country, the data and how you use it. Personal data may fall under privacy laws such as GDPR. Read the Apify guide on [web scraping legality](https://blog.apify.com/is-web-scraping-legal/). This is not legal advice.

#### How does LinkedIn Post Scraper work?

You give it LinkedIn links or keywords and a limit per source. It reads the public posts it can see without logging in and saves one structured row per post to your dataset, with text, author, media, engagement and comments. You then export or fetch the results from the Apify platform.

#### Why scrape LinkedIn posts for lead generation and research?

Posts show who is talking about a topic, what companies announce and which content earns attention. Teams use the data for lead generation, competitor monitoring, brand monitoring, content research and engagement analysis. Author headline, follower count and reaction totals help you rank people and posts by relevance.

#### Why am I getting fewer LinkedIn posts than expected?

Several things can lower the count: your limit per source, filters such as post type, date or phrases, posts that need a login, deleted posts, and profiles that hide their activity from visitors. Check the run log and the SUMMARY record, then loosen filters or raise the limit.

#### Do I need a LinkedIn account or cookies to scrape posts?

No. The Actor works without a LinkedIn account, cookies or login, so there is no account of yours to put at risk. The trade-off is that it can only collect what a logged-out visitor can see, so members-only posts and full commenter lists are not available.

#### Can I scrape LinkedIn posts by keyword or hashtag?

Yes. Add topics or hashtags to the Keywords field, or paste a LinkedIn content-search link into Source URLs. Each keyword counts as one source with its own limit. Add Hashtags filter, Text must contain or a date cut-off to keep the matching public posts relevant.

#### Can I scrape comments from a LinkedIn post?

Yes. Each post row includes a comments list with author, text, time and reactions, up to the number you set in Number of comments to fetch. Logged-out visitors can see about 10 comments per post, so commentsTruncated tells you when the post has more.

#### Is LinkedIn Post Scraper not working?

First check that your links are public posts, profiles or company pages, and review the run log for the cause. If a run still fails or returns nothing unexpected, open the [Issues tab](https://apify.com/data_minds/linkedin-post-scraper/issues/open) with your run link and the input you used, and the team will look at it.

### Support and feedback

- Found a bug or want a feature? Open the [Issues tab](https://apify.com/data_minds/linkedin-post-scraper/issues/open).
- For custom solutions or questions, contact hello.dataminds@gmail.com.
- Built and maintained by the [data_minds team on Apify](https://apify.com/data_minds).

This Actor is an independent tool, is not affiliated with or endorsed by [LinkedIn](https://www.linkedin.com), and collects only publicly available data. You are responsible for using the data in line with the site's terms and the laws that apply to you.

# Changelog

This Actor's version history is a separate document: https://apify.com/data_minds/linkedin-post-scraper/changelog.md

# Actor input Schema

## `urls` (type: `array`):

One LinkedIn URL per line. Supported: post URLs, profile URLs (linkedin.com/in/...), company / school / showcase pages, and content-search URLs (the keywords in the URL are searched). Bulk input is fine.

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

Optional. Topics or hashtags to find public LinkedIn posts about, one per line (for example: generative ai, #worktrendindex). Each keyword counts as one source.

## `limitPerSource` (type: `integer`):

Maximum number of posts per URL or keyword. When left empty, 10 posts per URL or keyword are collected.

## `scrapeUntil` (type: `string`):

Only keep posts published on or after this date. Pick a date (YYYY-MM-DD) or a relative value such as 7 days, 2 weeks, 3 months.

## `deepScrape` (type: `boolean`):

Open every post page to collect comments, exact publish time, document info and related posts by the same author. Turn off for a faster run with fewer details per post.

## `fetchDocumentDetails` (type: `boolean`):

For document / carousel posts: collect every page as a full-resolution image plus the text transcript. When off, only the cover page images are returned.

## `numComments` (type: `integer`):

Upper bound of comments per post. Logged-out visitors can see about 10 comments per post; every record reports commentsAvailable and commentsTruncated.

## `numLikes` (type: `integer`):

Kept for compatibility with other LinkedIn scrapers. The list of people who liked a post is not visible to logged-out visitors, so likers is always an empty list; total reaction counts are still returned.

## `rawData` (type: `boolean`):

Attach the unprocessed post markup and structured metadata under the raw field of every record. Useful when you look for a value that is not in the normal output.

## `discoverMorePosts` (type: `boolean`):

A company or profile page shows only its newest posts. Keep this on to also collect older posts by the same author until the limit per source is reached.

## `includeReposts` (type: `boolean`):

Keep posts that the author reposted from someone else. Turn off to return only original posts.

## `includeProfileActivity` (type: `boolean`):

Profile pages also list posts by other people that the person reposted or reacted to. Turn on to include those as well.

## `includeGated` (type: `boolean`):

Some posts are shown only to logged-in members. When on, such post URLs you entered directly are still returned as a short record with status gated instead of being skipped.

## `postTypes` (type: `array`):

Keep only these post types. Empty means all types.

## `authorTypes` (type: `array`):

Keep only posts written by people or only posts written by companies. Empty means both.

## `minReactions` (type: `integer`):

Skip posts with fewer reactions than this.

## `minComments` (type: `integer`):

Skip posts with fewer comments than this.

## `mustContain` (type: `array`):

Keep a post only if its text contains at least one of these phrases (case-insensitive).

## `mustNotContain` (type: `array`):

Skip a post if its text contains any of these phrases (case-insensitive).

## `hashtags` (type: `array`):

Keep a post only if it uses at least one of these hashtags, with or without the # sign.

## `saveMedia` (type: `boolean`):

Save images, the best video rendition and document pages to the run's key-value store. Each media item in the output then gets a saved.location link.

## `maxMediaBytes` (type: `integer`):

Media files larger than this are skipped when Download media is on. Default is 50 MB.

## `flattenOutput` (type: `boolean`):

Write nested objects as dotted keys (author.name, engagement.reactions). Handy for CSV and spreadsheets.

## `maxConcurrency` (type: `integer`):

How many posts are processed at the same time. Higher is faster; lower is gentler on the site.

## `requestDelaySeconds` (type: `number`):

Seconds to wait between two requests to the same site. A small random jitter is added automatically.

## `maxRetries` (type: `integer`):

How many times a blocked or failed request is retried (with increasing wait time) before it is given up.

## `requestTimeoutSeconds` (type: `integer`):

Seconds to wait for one page before the request counts as failed.

## `proxyConfiguration` (type: `object`):

Optional. The default works for most runs. Pick a proxy setting here only if you want to choose one yourself.

## Actor input object example

```json
{
  "urls": [
    "https://www.linkedin.com/company/amazon"
  ],
  "limitPerSource": 10,
  "deepScrape": true,
  "fetchDocumentDetails": false,
  "numComments": 5,
  "numLikes": 0,
  "rawData": false,
  "discoverMorePosts": true,
  "includeReposts": true,
  "includeProfileActivity": false,
  "includeGated": true,
  "saveMedia": false,
  "maxMediaBytes": 52428800,
  "flattenOutput": false,
  "maxConcurrency": 4,
  "requestDelaySeconds": 2,
  "maxRetries": 3,
  "requestTimeoutSeconds": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped posts, overview columns.

## `authors` (type: `string`):

Author details per post.

## `engagement` (type: `string`):

Reactions, comments and reposts per post.

## `media` (type: `string`):

Images, videos, articles and documents attached to each post.

## `comments` (type: `string`):

One row per comment.

## `mediaFiles` (type: `string`):

Images, videos and document pages saved when Download media is on.

## `summary` (type: `string`):

Counts of stored, filtered and login-only posts plus request statistics.

# 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 = {
    "urls": [
        "https://www.linkedin.com/company/amazon"
    ],
    "limitPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("data_minds/linkedin-post-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 = {
    "urls": ["https://www.linkedin.com/company/amazon"],
    "limitPerSource": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("data_minds/linkedin-post-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 '{
  "urls": [
    "https://www.linkedin.com/company/amazon"
  ],
  "limitPerSource": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call data_minds/linkedin-post-scraper --silent --output-dataset

```

## MCP server setup

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