Automating LinkedIn Audience Analysis with Claude Code

Duncan Rogoff | AI Automationgo watch the original →

Use Claude Code to scrape LinkedIn data via Apify, classify commenters against an ICP, and generate a content dashboard that identifies high-converting post patterns.

Audience Analysis and Scraping

To identify which content attracts buyers versus peers, the author uses Claude Code to scrape the last 30 days of LinkedIn activity. The process begins by defining an Ideal Client Profile (ICP) using a prompt that extracts job titles, trigger events, and specific customer language. The author then utilizes the Apify connector within Claude Code to scrape posts and comments, resulting in a CSV dataset of 1,586 comments. This scraping process costs approximately $5.67.

Classification and Dashboard Generation

Once the data is collected, Claude Code classifies each commenter as a buyer, peer, creator, competitor, or unknown based on their job title and bio. The author then instructs Claude Code to build an HTML dashboard that visualizes the audience split, post performance, and trend lines. By providing a design system file to the workspace, the author ensures the generated dashboard adheres to specific branding guidelines. The analysis revealed that while 44% of commenters fit the ICP, 40% were peers or competitors, indicating a need to shift content focus away from business-flexing posts toward beginner-oriented, actionable tutorials.

Content Optimization

The final step involves generating a content brief by comparing the top five and bottom five performing posts. Claude Code identifies that posts emphasizing "no coding required" and "free tools" attract significantly more buyers than posts focused on business operations. The tool outputs three proven content angles, a list of topics to avoid, and a reusable post template modeled after the author's highest-performing content.

  • #ai
  • #dev-tooling
  • #automation

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.