# LinkedIn Profile Posts Scraper (No Cookies) (`harvestapi/linkedin-profile-posts`) Actor

Extract posts from LinkedIn profiles, including content, media, engagement, reactions, comments, and more. No cookies or account required.

- **URL**: https://apify.com/harvestapi/linkedin-profile-posts.md
- **Developed by:** [HarvestAPI](https://apify.com/harvestapi) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 18,220 total users, 5,980 monthly users, 100.0% runs succeeded, 390 bookmarks
- **User rating**: 4.80 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### LinkedIn Profile Posts scraper

Our powerful tool helps you gather posts from 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.
- Concurrency: the actor scrapes 6 profiles/companies at a time.

### How It Works

Simply provide one of the following:

- `targetUrls` List of LinkedIn profile/company URLs who posted or re-posted the content.

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. If you set this to 0, it will scrape all reactions.
- `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. If you set this to 0, it will scrape all comments.

Other params (optionally):

- `maxPosts` - Maximum number of posts to scrape per each search query. This overrides `scrapePages` pagination. If you set this to 0, it will scrape all posts.
- `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".
- `includeQuotePosts` - Toggle to filter out quote posts (shared posts with comments). By default, all posts are scraped.
- `includeReposts` - Toggle to filter out reposts (shared posts without comments). By default, all posts are scraped.

**If you want to search post by text queries or more advanced filters, you can use our Post Search scraper [Linkedin Post Search Scraper](https://apify.com/harvestapi/linkedin-post-search).**

#### Data You'll Receive

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

#### Sample output data

Here is the example post output of this actor:

```json
{
  "type": "post",
  "id": "7329207003942125568",
  "linkedinUrl": "https://www.linkedin.com/posts/williamhgates_how-better-data-helped-us-cut-child-mortality-activity-7329207003942125568-_gfJ",
  "content": "The leading causes of childhood death reveal a stark truth: Many could be prevented, and children in poor countries die from them far more often than those in wealthy ones. We have the tools to save lives—and by helping them reach the right children at the right time, the world has cut global child deaths by more than half—from 12 million in 1990 to 4.6 million in 2021. It’s extraordinary progress, but the work isn’t over: https://lnkd.in/gC4pEPsW",
  "author": {
    "universalName": null,
    "publicIdentifier": "williamhgates",
    "type": "profile",
    "name": "Bill Gates",
    "linkedinUrl": "https://www.linkedin.com/in/williamhgates?miniProfileUrn=urn%3Ali%3Afsd_profile%3AACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc",
    "info": "Chair, Gates Foundation and Founder, Breakthrough Energy",
    "website": "https://www.linkedin.com/newsletters/gates-notes-6651495472181637121/",
    "websiteLabel": "View my newsletter",
    "avatar": {
      "url": "https://media.licdn.com/dms/image/v2/D5603AQF-RYZP55jmXA/profile-displayphoto-shrink_800_800/B56ZRi8g.aGsAc-/0/1736826818808?e=1753315200&v=beta&t=ot0V86_HfZ7Jk2m6u9RV-vORolb2cJ6Skj5T1FoGlso",
      "width": 800,
      "height": 800,
      "expiresAt": 1753315200000
    }
  },
  "postedAt": {
    "timestamp": 1747419119821,
    "date": "2025-05-16T18:11:59.821Z",
    "postedAgoShort": "6d",
    "postedAgoText": "6 days ago • Visible to anyone on or off LinkedIn"
  },
  "postImages": [],
  "document": {
    "title": " How better data helped us cut child mortality in half",
    "transcribedDocumentUrl": "https://media.licdn.com/dms/document/media/v2/D561FAQGPMwZUeWRF4w/feedshare-document-pdf-analyzed/B56ZbaStGgHgAY-/0/1747419060033?e=1748556000&v=beta&t=LpSrvoiBPULbHs8RDjwayRtdpkRT747P6kZjdHXqWLE",
    "coverPages": [
      {
        "width": 1921,
        "imageUrls": [
          "https://media.licdn.com/dms/image/v2/D561FAQGPMwZUeWRF4w/feedshare-document-cover-images_1920/B56ZbaStGgHgAw-/0/1747419061061?e=1748556000&v=beta&t=xwvy_C8x1NZoKqbC8oIZjo7k2xiZweHkQl0E96zZ_5c",
          "https://media.licdn.com/dms/image/v2/D561FAQGPMwZUeWRF4w/feedshare-document-cover-images_1920/B56ZbaStGgHgAw-/1/1747419061061?e=1748556000&v=beta&t=vT0l9ej-cxGHJ03Fu49ONBjYlswLmpr0R7BUzbFRUu4"
        ],
        "height": 1243
      }
    ],
    "totalPageCount": 2
  },
  "socialContent": {
    "hideCommentsCount": false,
    "hideReactionsCount": false,
    "hideSocialActivityCounts": false,
    "hideShareAction": true,
    "hideSendAction": true,
    "hideRepostsCount": false,
    "hideViewsCount": false,
    "trustInterventionBanner": null,
    "hideReactAction": false,
    "hideCommentAction": false,
    "shareUrl": "https://www.linkedin.com/posts/williamhgates_how-better-data-helped-us-cut-child-mortality-activity-7329207003942125568-_gfJ?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAExUClQBdCKsvo8NLfk3HZMfrSLtXnxHlNs",
    "showContributionExperience": false,
    "showSocialDetail": true
  },
  "engagement": {
    "likes": 2916,
    "comments": 328,
    "shares": 153,
    "reactions": [
      {
        "type": "LIKE",
        "count": 2477
      },
      {
        "type": "APPRECIATION",
        "count": 178
      },
      {
        "type": "EMPATHY",
        "count": 158
      },
      {
        "type": "PRAISE",
        "count": 55
      },
      {
        "type": "INTEREST",
        "count": 45
      },
      {
        "type": "ENTERTAINMENT",
        "count": 3
      }
    ]
  },
  "reactions": [
    {
      "id": "urn:li:fsd_reaction:(urn:li:fsd_profile:ACoAADOSyYUBKdykLMCIE5i4B9UDcVsoeXPbwlM,urn:li:ugcPost:7329207002977443840,0)",
      "reactionType": "LIKE",
      "actor": {
        "id": "ACoAADOSyYUBKdykLMCIE5i4B9UDcVsoeXPbwlM",
        "name": "Rami Sfaxi",
        "linkedinUrl": "https://www.linkedin.com/in/ACoAADOSyYUBKdykLMCIE5i4B9UDcVsoeXPbwlM",
        "position": "Surveillant du patrimoine chez Institut national du patrimoine",
        "pictureUrl": "https://media.licdn.com/dms/image/v2/D4D03AQGHFY4B_--Xyg/profile-displayphoto-shrink_800_800/B4DZbz5NmeG8Ag-/0/1747848587093?e=1753315200&v=beta&t=C0L4lAIK9nTsUB7XjQCP_qA3MzJk_Mx-IjOxbJ5u3D4",
        "picture": {
          "url": "https://media.licdn.com/dms/image/v2/D4D03AQGHFY4B_--Xyg/profile-displayphoto-shrink_800_800/B4DZbz5NmeG8Ag-/0/1747848587093?e=1753315200&v=beta&t=C0L4lAIK9nTsUB7XjQCP_qA3MzJk_Mx-IjOxbJ5u3D4",
          "width": 600,
          "height": 600,
          "expiresAt": 1753315200000
        }
      },
      "postId": "7329207003942125568"
    },
    {
      "id": "urn:li:fsd_reaction:(urn:li:fsd_profile:ACoAAAYGWGEB0nr6DlOlf-CBPj1JPE7uNQ3y0mM,urn:li:ugcPost:7329207002977443840,0)",
      "reactionType": "LIKE",
      "actor": {
        "id": "ACoAAAYGWGEB0nr6DlOlf-CBPj1JPE7uNQ3y0mM",
        "name": "Maria Alice",
        "linkedinUrl": "https://www.linkedin.com/in/ACoAAAYGWGEB0nr6DlOlf-CBPj1JPE7uNQ3y0mM",
        "position": "Artesã na Artes lee"
      },
      "postId": "7329207003942125568"
    },
    {
      "id": "urn:li:fsd_reaction:(urn:li:fsd_profile:ACoAABW6bB8BkvSx3PhEujHS_FM0oej6OL94CoA,urn:li:ugcPost:7329207002977443840,0)",
      "reactionType": "LIKE",
      "actor": {
        "id": "ACoAABW6bB8BkvSx3PhEujHS_FM0oej6OL94CoA",
        "name": "Aytekin A.",
        "linkedinUrl": "https://www.linkedin.com/in/ACoAABW6bB8BkvSx3PhEujHS_FM0oej6OL94CoA",
        "position": "--"
      },
      "postId": "7329207003942125568"
    },
    {
      "id": "urn:li:fsd_reaction:(urn:li:fsd_profile:ACoAAAMHAagBPz-UgeRDsX3klfoVZEkDw1ulS7E,urn:li:ugcPost:7329207002977443840,0)",
      "reactionType": "LIKE",
      "actor": {
        "id": "ACoAAAMHAagBPz-UgeRDsX3klfoVZEkDw1ulS7E",
        "name": "Gangotri Dey (Ph.D)",
        "linkedinUrl": "https://www.linkedin.com/in/ACoAAAMHAagBPz-UgeRDsX3klfoVZEkDw1ulS7E",
        "position": "Licensing Officer | Intellectual Property | Patents | Technology Transfer | Egalitarian | Numismatist",
        "pictureUrl": "https://media.licdn.com/dms/image/v2/D4E03AQGDj6wx_xJbRQ/profile-displayphoto-shrink_800_800/profile-displayphoto-shrink_800_800/0/1668631616852?e=1753315200&v=beta&t=12ishzrb2wqXHERve9a-wNaL4_V6H6a2rA76UYX5MWI",
        "picture": {
          "url": "https://media.licdn.com/dms/image/v2/D4E03AQGDj6wx_xJbRQ/profile-displayphoto-shrink_800_800/profile-displayphoto-shrink_800_800/0/1668631616852?e=1753315200&v=beta&t=12ishzrb2wqXHERve9a-wNaL4_V6H6a2rA76UYX5MWI",
          "width": 594,
          "height": 594,
          "expiresAt": 1753315200000
        }
      },
      "postId": "7329207003942125568"
    },
    {
      "id": "urn:li:fsd_reaction:(urn:li:fsd_profile:ACoAAEfKTEoB1SpCcTCSs2df5663HhAYI92kxGk,urn:li:ugcPost:7329207002977443840,0)",
      "reactionType": "LIKE",
      "actor": {
        "id": "ACoAAEfKTEoB1SpCcTCSs2df5663HhAYI92kxGk",
        "name": "Ola Majowicz",
        "linkedinUrl": "https://www.linkedin.com/in/ACoAAEfKTEoB1SpCcTCSs2df5663HhAYI92kxGk",
        "position": "--",
        "pictureUrl": "https://media.licdn.com/dms/image/v2/D4D03AQEFOMjXAUyFXg/profile-displayphoto-shrink_800_800/B4DZbx0SuSGYAg-/0/1747813740226?e=1753315200&v=beta&t=MMPxVrIT6Wl3w_2S8brX_UhiE6Ot6cd-pYsViN5lrBA",
        "picture": {
          "url": "https://media.licdn.com/dms/image/v2/D4D03AQEFOMjXAUyFXg/profile-displayphoto-shrink_800_800/B4DZbx0SuSGYAg-/0/1747813740226?e=1753315200&v=beta&t=MMPxVrIT6Wl3w_2S8brX_UhiE6Ot6cd-pYsViN5lrBA",
          "width": 800,
          "height": 800,
          "expiresAt": 1753315200000
        }
      },
      "postId": "7329207003942125568"
    }
  ],
  "comments": [
    {
      "id": "7331415234328371202",
      "linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329207002977443840?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7329207002977443840%2C7331415234328371202%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287331415234328371202%2Curn%3Ali%3AugcPost%3A7329207002977443840%29",
      "commentary": "I respect what you do and I am wondering what to do with someone that is like me and suffers daily from flash backs, nightmares etc.. from tragedy experienced at a young age and no one my whole life really understands or ever has...the tragedy I  experienced at a young age. As time goes on no healing has taken place instead I seem to get more haunted by what took place and how I've been told my whole life hush hush because of ones reputation",
      "createdAt": "2025-05-22T20:26:42.973Z",
      "numComments": 0,
      "numShares": null,
      "reactionTypeCounts": [],
      "actor": {
        "id": "ACoAAFqw9EoBBFnIY4WwvqjI-qhUrd706E8qRc0",
        "name": "Justin Martin",
        "linkedinUrl": "https://www.linkedin.com/in/justin-martin-5a2690365",
        "position": "Handy man at QUALITY HOUSE SERVICES",
        "author": false
      },
      "createdAtTimestamp": 1747945602973,
      "pinned": false,
      "contributed": false,
      "edited": false,
      "postId": "7329207003942125568"
    },
    {
      "id": "7331359556641423361",
      "linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329207002977443840?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7329207002977443840%2C7331359556641423361%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287331359556641423361%2Curn%3Ali%3AugcPost%3A7329207002977443840%29",
      "commentary": "Great",
      "createdAt": "2025-05-22T16:45:28.377Z",
      "numComments": 0,
      "numShares": null,
      "reactionTypeCounts": [],
      "actor": {
        "id": "ACoAADz09WkBpEUBFAtJBq2jScZ2o2jnW5qlTPI",
        "name": "Emma Chen",
        "linkedinUrl": "https://www.linkedin.com/in/emma-chen-6095b4246",
        "position": "Medical Educators & Clinicians | Cardiology & Interdisciplinary Research",
        "pictureUrl": "https://media.licdn.com/dms/image/v2/D4E03AQF_jEhahaIAhg/profile-displayphoto-shrink_800_800/B4EZb114gmHcAc-/0/1747881266030?e=1753315200&v=beta&t=dV0BPggfyhUD3JmnKsp1a8gy1sZfOapE-AJVRJSqOgA",
        "picture": {
          "url": "https://media.licdn.com/dms/image/v2/D4E03AQF_jEhahaIAhg/profile-displayphoto-shrink_800_800/B4EZb114gmHcAc-/0/1747881266030?e=1753315200&v=beta&t=dV0BPggfyhUD3JmnKsp1a8gy1sZfOapE-AJVRJSqOgA",
          "width": 800,
          "height": 800,
          "expiresAt": 1753315200000
        },
        "author": false
      },
      "createdAtTimestamp": 1747932328377,
      "pinned": false,
      "contributed": false,
      "edited": false,
      "postId": "7329207003942125568"
    },
    {
      "id": "7331340543228080128",
      "linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329207002977443840?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7329207002977443840%2C7331340543228080128%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287331340543228080128%2Curn%3Ali%3AugcPost%3A7329207002977443840%29",
      "commentary": "Behind this number is the victory of vaccines, mosquito nets and oral rehydration salts! But the slowdown of the curve in 2022 shows that the last mile is the most difficult to break through: children with malaria in rural Congo still die 30 kilometers away from the clinic. Should we switch to a hybrid model of community health workers + drone delivery?",
      "createdAt": "2025-05-22T15:29:55.227Z",
      "numComments": 0,
      "numShares": null,
      "reactionTypeCounts": [],
      "actor": {
        "id": "ACoAAEXX2lABxdO9E5hnkDcuJBG7a_htTSOWWuU",
        "name": "Kayla A.",
        "linkedinUrl": "https://www.linkedin.com/in/kayla-a-b80511288",
        "position": "Board Member | Technical Partner | Biopharmaceutical Process Development Specialist|",
        "author": false
      },
      "createdAtTimestamp": 1747927795227,
      "pinned": false,
      "contributed": false,
      "edited": false,
      "postId": "7329207003942125568"
    },
    {
      "id": "7331286926336880640",
      "linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329207002977443840?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7329207002977443840%2C7331286926336880640%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287331286926336880640%2Curn%3Ali%3AugcPost%3A7329207002977443840%29",
      "commentary": "That's a shame",
      "createdAt": "2025-05-22T11:56:51.964Z",
      "numComments": 0,
      "numShares": null,
      "reactionTypeCounts": [],
      "actor": {
        "id": "ACoAAE6YC-cBBohkYnLf-Svpr4nYwh3nRmzb24E",
        "name": "Sean Obrien",
        "linkedinUrl": "https://www.linkedin.com/in/sean-obrien-487713309",
        "position": "--",
        "pictureUrl": "https://media.licdn.com/dms/image/v2/D4E03AQG84nzQLEoquQ/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1715775686297?e=1753315200&v=beta&t=1k27We_BcV2rmkYyCF6OdRxa8LFTidsFkrVdIY87i4U",
        "picture": {
          "url": "https://media.licdn.com/dms/image/v2/D4E03AQG84nzQLEoquQ/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1715775686297?e=1753315200&v=beta&t=1k27We_BcV2rmkYyCF6OdRxa8LFTidsFkrVdIY87i4U",
          "width": 96,
          "height": 96,
          "expiresAt": 1753315200000
        },
        "author": false
      },
      "createdAtTimestamp": 1747915011964,
      "pinned": false,
      "contributed": false,
      "edited": false,
      "postId": "7329207003942125568"
    },
    {
      "id": "7331248243730788352",
      "linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329207002977443840?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7329207002977443840%2C7331248243730788352%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287331248243730788352%2Curn%3Ali%3AugcPost%3A7329207002977443840%29",
      "commentary": "How many children have died for the COVID-19 vaccine bill? Any idea?",
      "createdAt": "2025-05-22T09:23:09.312Z",
      "numComments": 0,
      "numShares": null,
      "reactionTypeCounts": [],
      "actor": {
        "id": "ACoAAE256KAB2cvk6PEP_3CkxPGIidaWX3ezpDo",
        "name": "Gregg Kozuchowski",
        "linkedinUrl": "https://www.linkedin.com/in/gregg-kozuchowski-740872304",
        "position": "--",
        "pictureUrl": "https://media.licdn.com/dms/image/v2/D4D03AQGpj-eks2D_3w/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1713394281782?e=1753315200&v=beta&t=0_w-AuM5KnyoOv2xs0oZdut48W6B9jqtc2DoBKwnFik",
        "picture": {
          "url": "https://media.licdn.com/dms/image/v2/D4D03AQGpj-eks2D_3w/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1713394281782?e=1753315200&v=beta&t=0_w-AuM5KnyoOv2xs0oZdut48W6B9jqtc2DoBKwnFik",
          "width": 96,
          "height": 96,
          "expiresAt": 1753315200000
        },
        "author": false
      },
      "createdAtTimestamp": 1747905789312,
      "pinned": false,
      "contributed": false,
      "edited": false,
      "postId": "7329207003942125568"
    }
  ]
}
````

### Linkedin Profile Post 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 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
- Chat with us on our [Discord server](https://discord.gg/TGA9k9u2gE)
- Or contact us at contact@harvest-api.com

**\* \* \***

**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

## `targetUrls` (type: `array`):

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

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

Maximum number of posts to scrape per each profile or company. Default is 10. This overrides pagination. If you set this to 0, it will scrape all posts.

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

Fetch posts no older than X time. Options: '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"

## `includeQuotePosts` (type: `boolean`):

Include quote posts (shared posts with comments). By default, all posts are scraped.

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

Include reposts (shared posts without comments). By default, all posts are scraped.

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

Scrape reactions of posts.

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

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

## `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.

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

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

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

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

## `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
{
  "targetUrls": [
    "https://www.linkedin.com/in/satyanadella/",
    "https://www.linkedin.com/company/google",
    "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7/",
    "https://www.linkedin.com/feed/update/urn:li:activity:7391573088309534720/"
  ],
  "maxPosts": 5,
  "includeQuotePosts": true,
  "includeReposts": true,
  "scrapeReactions": false,
  "maxReactions": 5,
  "scrapeComments": false,
  "maxComments": 5
}
```

# 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 = {
    "targetUrls": [
        "https://www.linkedin.com/in/satyanadella/",
        "https://www.linkedin.com/company/google",
        "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7/",
        "https://www.linkedin.com/feed/update/urn:li:activity:7391573088309534720/"
    ],
    "maxPosts": 5,
    "maxReactions": 5,
    "postNestedReactions": false,
    "maxComments": 5,
    "postNestedComments": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("harvestapi/linkedin-profile-posts").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "targetUrls": [
        "https://www.linkedin.com/in/satyanadella/",
        "https://www.linkedin.com/company/google",
        "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7/",
        "https://www.linkedin.com/feed/update/urn:li:activity:7391573088309534720/",
    ],
    "maxPosts": 5,
    "maxReactions": 5,
    "postNestedReactions": False,
    "maxComments": 5,
    "postNestedComments": False,
}

# Run the Actor and wait for it to finish
run = client.actor("harvestapi/linkedin-profile-posts").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "targetUrls": [
    "https://www.linkedin.com/in/satyanadella/",
    "https://www.linkedin.com/company/google",
    "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7/",
    "https://www.linkedin.com/feed/update/urn:li:activity:7391573088309534720/"
  ],
  "maxPosts": 5,
  "maxReactions": 5,
  "postNestedReactions": false,
  "maxComments": 5,
  "postNestedComments": false
}' |
apify call harvestapi/linkedin-profile-posts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=harvestapi/linkedin-profile-posts",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Profile Posts Scraper (No Cookies)",
        "description": "Extract posts from LinkedIn profiles, including content, media, engagement, reactions, comments, and more. No cookies or account required.",
        "version": "0.0",
        "x-build-id": "UlC4U2VsXfKzLQ91J"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/harvestapi~linkedin-profile-posts/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-harvestapi-linkedin-profile-posts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/harvestapi~linkedin-profile-posts/runs": {
            "post": {
                "operationId": "runs-sync-harvestapi-linkedin-profile-posts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/harvestapi~linkedin-profile-posts/run-sync": {
            "post": {
                "operationId": "run-sync-harvestapi-linkedin-profile-posts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "targetUrls": {
                        "title": "Target URLs",
                        "maxItems": 10000,
                        "type": "array",
                        "description": "List of LinkedIn profile or company URLs to scrape. Example: `https://www.linkedin.com/in/satyanadella/` will fetch posted or re-posted content by Bill Gates.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPosts": {
                        "title": "Maximum number of posts to scrape per each input (overrides pagination)",
                        "type": "integer",
                        "description": "Maximum number of posts to scrape per each profile or company. Default is 10. This overrides pagination. If you set this to 0, it will scrape all posts."
                    },
                    "postedLimit": {
                        "title": "Posted Limit",
                        "enum": [
                            "any",
                            "1h",
                            "24h",
                            "week",
                            "month",
                            "3months",
                            "6months",
                            "year"
                        ],
                        "type": "string",
                        "description": "Fetch posts no older than X time. Options: '24h', 'week', 'month'."
                    },
                    "postedLimitDate": {
                        "title": "Posted Limit Date",
                        "type": "string",
                        "description": "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\""
                    },
                    "includeQuotePosts": {
                        "title": "Include Quote Posts (shared posts with comments)",
                        "type": "boolean",
                        "description": "Include quote posts (shared posts with comments). By default, all posts are scraped.",
                        "default": true
                    },
                    "includeReposts": {
                        "title": "Include Reposts (shared posts without comments)",
                        "type": "boolean",
                        "description": "Include reposts (shared posts without comments). By default, all posts are scraped.",
                        "default": true
                    },
                    "scrapeReactions": {
                        "title": "Scrape Reactions",
                        "type": "boolean",
                        "description": "Scrape reactions of posts.",
                        "default": false
                    },
                    "maxReactions": {
                        "title": "Maximum number of reactions to scrape per post",
                        "type": "integer",
                        "description": "Maximum number of reactions to scrape per post. Default is 5."
                    },
                    "postNestedReactions": {
                        "title": "Post nested reactions (legacy, not recommended)",
                        "type": "boolean",
                        "description": "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": {
                        "title": "Scrape Comments",
                        "type": "boolean",
                        "description": "Scrape comments of posts.",
                        "default": false
                    },
                    "maxComments": {
                        "title": "Maximum number of comments to scrape per post",
                        "type": "integer",
                        "description": "Maximum number of comments to scrape per post. Default is 5."
                    },
                    "commentsPostedLimit": {
                        "title": "Comments Posted Limit (filter)",
                        "enum": [
                            "any",
                            "1h",
                            "24h",
                            "week",
                            "month"
                        ],
                        "type": "string",
                        "description": "Fetch comments no older than X time. Options: '24h', 'week', 'month'."
                    },
                    "postNestedComments": {
                        "title": "Post nested comments (legacy, not recommended)",
                        "type": "boolean",
                        "description": "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."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
