Linkedin is where B2B buyers hang out. Listening to Linkedin posts everyday is a great way to find these buyers. Once you find them, you can mention your product, DM the poster and also DM everyone individually who responded to the post.
This can be great for early stage GTM motion where you want to find potential customers for your product quickly.
SocialListeningAPI searches public posts on LinkedIn for the phrases you choose and returns normalized records with source URLs.
Here’s how you can do this in 4 easy steps:
Step 1: Sign up and claim your free credits
Create a SocialListeningAPI account, activate it from your email, and copy your API key. New accounts get 100 free credits, so you can test this workflow right away before buying a credit pack.
We’ll use this API to search through Linkedin posts programmatically.
Keep the key on your server. Do not add it to browser code or a public repository.
Alternatively, you can use our MCP feature to connect it with Claude/ChatGPT.
Step 2: Run the LinkedIn search API
LinkedIn lead generation works best when you search for a clear problem instead of a broad industry. Pick one phrase a possible customer may use, then send it to the API:
curl --get 'https://api.sociallisteningapi.com/api/v1/linkedin/search' \
--data-urlencode 'query=recommend a social listening tool' \
--header 'x-api-key: YOUR_API_KEY'
The LinkedIn post search endpoint searches public posts newest first. Each successful request costs 2 credits. Failed requests do not use credits.
You want to search for keywords relevant to your product. Here’s what I’d use for my product:
recommend a social listening toolhow to track brand mentionsmissing LinkedIn mentionsLinkedIn post search APIalternative to my social listening tool
Step 3: Analyze the post
Results are in data.items. Each item uses the same simple structure:
{
"data": {
"items": [
{
"id": "linkedin_post_123",
"url": "https://www.linkedin.com/posts/example",
"content": {
"text": "A practical guide to social listening for small teams."
},
"author": {
"display_name": "Alex Morgan"
},
"published_at": "2026-08-05T01:30:00.000Z",
"ext": {
"author_url": "https://www.linkedin.com/in/alex"
}
}
]
},
"credits_used": 2
}
Use content.text to understand the problem, url to read the post, and author to review who
wrote it.
If you’re using the MCP, you don’t need to bother with this. Your chat app will analyze the results and give you the best posts to comment/DM on.
Step 4: Respond to the post
Read the full post before contacting anyone. Refer to the problem they shared and explain how you can help. Do not send the same pitch to every result or automate replies.
I also recommend DMing to every commenter on the post. Inside Linkedin you can find the people who engaged with the post and reach out to them.
Conclusion
If you want fresh results each day, you can also use an external scheduler such as cron, n8n, Make, or Zapier. For example, 8 searches each weekday use 80 credits per week.
Keep the workflow only when the source posts are relevant and your replies help the person who wrote them. Search results can produce useful conversations, but they cannot guarantee a fixed number of qualified leads each week.
Continue with How to Find Sales Opportunities on X With an API.




