LinkedIn Post Scraper (Keyword + Cookie) avatar

LinkedIn Post Scraper (Keyword + Cookie)

Under maintenance

Pricing

Pay per usage

Go to Apify Store
LinkedIn Post Scraper (Keyword + Cookie)

LinkedIn Post Scraper (Keyword + Cookie)

Under maintenance

Scrape LinkedIn posts based on keywords using Playwright and authenticated session cookie (li_at). Extracts post content, author details, engagement metrics, and media links, and stores structured results in Apify Dataset

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Nguyen Duy Viet

Nguyen Duy Viet

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

21 days ago

Last modified

Share

LinkedIn Public Data Scraper

Extract public LinkedIn post data by direct post URL or by LinkedIn post search using queries, filters, and hashtags.


Overview

LinkedIn Public Data Scraper is an Apify Actor for collecting structured public data from LinkedIn posts with an authenticated LinkedIn session (li_at cookie).

It is useful for:

  • Data analysis
  • Market research
  • Lead research
  • Recruiting research
  • Social listening
  • AI / LLM datasets

Key Features

  • Crawl one specific LinkedIn post by URL
  • Search public LinkedIn posts by keyword query
  • Add hashtag-based search terms
  • Filter by date posted
  • Sort search results by relevance or latest
  • Optional member, company, and author industry filters
  • Extract post content and detected hashtags
  • Extract author name and profile URL
  • Extract engagement metrics when visible
  • Extract post media image URLs
  • Export structured JSON / CSV from Apify Dataset
  • Built with Playwright + Crawlee

Input Schema

You can use either linkPost for one post, or searchQuery / hashtags for search mode.

Search mode example

{
"searchQuery": "AI hiring",
"hashtags": ["AI", "MachineLearning", "Recruitment"],
"maxPosts": 20,
"sortBy": "date_posted",
"datePosted": "past-week",
"linkedinCookie": "YOUR_li_at_COOKIE"
}

Direct post mode example

{
"linkPost": "https://www.linkedin.com/feed/update/urn:li:activity:123456789/",
"linkedinCookie": "li_at=YOUR_li_at_COOKIE; JSESSIONID=ajax:123456789; bcookie=..."
}

Input Fields

FieldTypeRequiredDescription
linkedinCookiestringYesRaw li_at value or full LinkedIn cookie string used for authenticated browsing.
linkPoststringNoDirect LinkedIn post URL. When provided, the Actor crawls this post only.
searchQuerystringNoKeyword query for LinkedIn post search.
hashtagsstring[]NoHashtags to include in search. Values can be written with or without #.
maxPostsnumberNoMaximum number of posts to extract. Default: 20.
sortBystringNorelevance or date_posted.
datePostedstringNoanytime, past-24h, past-week, or past-month.
fromMemberstring[]NoOptional LinkedIn member IDs for author filtering.
fromCompanystring[]NoOptional LinkedIn company IDs for company filtering.
authorIndustrystring[]NoOptional LinkedIn industry IDs for author industry filtering.

At least one of linkPost, searchQuery, or hashtags should be provided.


Output Example

{
"query": {
"searchQuery": "AI hiring",
"hashtags": ["AI", "Recruitment"],
"filters": {
"sortBy": "date_posted",
"datePosted": "past-week",
"fromMember": [],
"fromCompany": [],
"authorIndustry": []
}
},
"post": {
"content": "Example LinkedIn post content...",
"hashtags": ["AI", "Recruitment"],
"linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:activity:123456789/",
"urn": "urn:li:activity:123456789"
},
"author": {
"name": "Example Author",
"profileUrl": "https://www.linkedin.com/in/example-author"
},
"engagement": {
"likes": "120",
"comments": "14",
"reposts": "3"
},
"media": {
"images": ["https://media.licdn.com/..."]
}
}

Notes

  • LinkedIn pages change often, so selectors may need maintenance over time.
  • Some filters require LinkedIn internal IDs, not display names.
  • The Actor only extracts data visible to the authenticated LinkedIn account.
  • The li_at cookie can expire, so refresh it when login fails or LinkedIn redirects too many times.
  • If a direct post URL keeps redirecting, paste the full Cookie request header from LinkedIn instead of only the li_at value.