Skip to main content
When you already know a prospect’s LinkedIn profile, you can use The Hog to inspect recent public posts they reacted to or commented on. This is useful when you want outreach to reference something timely instead of starting from a generic persona template. This guide uses one profile as an example:

What you will build

The script below:
  1. Fetches recent posts the profile reacted to.
  2. Fetches recent posts the profile commented on.
  3. Merges both signals by LinkedIn post.
  4. Prints concise outreach hook ideas you can review before using.
Use this to personalize legitimate business outreach from public activity. Always review the generated hooks, avoid sensitive inferences, and respect unsubscribe and outreach rules in your market.

Endpoints used

Both endpoints accept:
  • profiles: LinkedIn /in/ profile URLs or public usernames
  • maxItems: maximum rows to return per profile
  • postedLimit: one of any, 24h, week, month, 3months, 6months, year

JavaScript example

Create linkedin-hooks.mjs:
Run it:

Python example

Create linkedin_hooks.py:
Run it:

Example output

Production tips

  • Keep maxItems small for interactive workflows; increase it only for batch jobs.
  • Prefer postedLimit: "month" or shorter for timely hooks.
  • Store the returned postUrl with your CRM activity so reps can review the source context.
  • Use comments first when available: they usually reveal stronger intent than a reaction alone.
  • De-duplicate hooks across prospects before generating outreach sequences.