mcpField
L
linkedin-commenter-extractor

linkedin-commenter-extractor

github.com/gooseworks-aiMarketing & growth1.3k49 installsUpdated 3d ago
Repository

About linkedin-commenter-extractor

A command-line skill for extracting commenter profiles and comment text from LinkedIn posts. It uses Apify and does not require LinkedIn cookies.

Key features

  1. 01Extract commenter names and profile details
  2. 02Capture comment text and post URLs
  3. 03Parse headlines into titles and companies
  4. 04Export JSON, CSV, or summary
  5. 05Deduplicate across posts

Use cases

  1. 01Build prospect lists from post discussions
  2. 02Review commenters across several posts

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/gooseworks-ai/goose-skills --skill linkedin-commenter-extractor

After installing, type/linkedin-commenter-extractorin Claude Code to confirm it loaded.

Bundled filesscripts/extract_commenters.pyskill.meta.json

Details

From the project README

LinkedIn Commenter Extractor

Extract names, titles, companies, LinkedIn URLs, and comment text from people who commented on specific LinkedIn posts. Uses Apify — no LinkedIn cookies required.

Quick Start

Requires requests and APIFY_API_TOKEN environment variable.

# Extract commenters from a single post
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
  --post-url "https://www.linkedin.com/posts/someone_topic-activity-123456789"

# Multiple posts
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
  --post-url URL1 --post-url URL2

# Limit comments per post
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
  --post-url URL --max-comments 50

# Output formats
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py --post-url URL --output json
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py --post-url URL --output csv
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py --post-url URL --output summary

# Deduplicate across multiple posts
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
  --post-url URL1 --post-url URL2 --dedup

How It Works

  1. Takes one or more LinkedIn post URLs
  2. Calls the harvestapi~linkedin-post-comments Apify actor (no cookies needed)
  3. Extracts commenter name, headline (title + company), LinkedIn profile URL, and comment text
  4. Parses headline into separate title and company fields where possible
  5. Optionally deduplicates across multiple posts by LinkedIn profile URL

CLI Reference

FlagDefaultDescription
--post-urlrequiredLinkedIn post URL (can be repeated for multiple posts)
--max-comments100Max comments to extract per post
--outputjsonOutput format: json, csv, summary
--dedupfalseDeduplicate commenters across multiple posts
--tokenenv varApify API token (overrides APIFY_API_TOKEN env var)
--timeout120Max seconds to wait for Apify run

Output Schema

{
  "name": "Jane Smith",
  "headline": "VP of Finance at Acme Corp",
  "title": "VP of Finance",
  "company": "Acme Corp",
  "linkedin_url": "https://www.linkedin.com/in/janesmith",
  "comment_text": "Great insights on AI in accounting...",
  "post_url": "https://www.linkedin.com/posts/...",
  "profile_image_url": "https://..."
}

Cost

Uses harvestapi~linkedin-post-comments Apify actor — ~$2 per 1,000 comments. No LinkedIn cookies or login required.

Comments

Markdown supported