LinkedIn posts can contain detailed product questions, launch notes, hiring plans, and complaints about tools. Finding those posts by hand takes time, and copying a few links into ChatGPT does not make the process repeatable.
We're going to useSocialListeningAPI, which provides a LinkedIn post API that searches public posts by keyword and returns normalized mentions with source URLs. ChatGPT can review those
mentions, group the useful ones, and write a comment that links back to the posts.
Let's get started.
What the LinkedIn post API returns
The keyword search endpoint is:
GET https://api.sociallisteningapi.com/api/v1/linkedin/search
It searches public LinkedIn posts by keyword, newest first. Each successful request costs 2 credits. Failed requests do not use credits.
Results use the shared social response structure. Available fields include:
idplatformurlcontent.titlecontent.textcontent.media_urlsauthorengagementpublished_atext
SocialListeningAPI also has a separate endpoint for public posts from one LinkedIn profile:
GET https://api.sociallisteningapi.com/api/v1/linkedin/profile/posts
That endpoint accepts a LinkedIn profile URL and returns public profile posts newest first, with pagination when available. Use keyword search for topic research. Use profile posts when you already know which public profile you want to follow.
Step 1: Search for a specific situation
Broad terms such as marketing or cybersecurity produce too much mixed content. A good keyword describes a problem, decision, or change.
For product research, I would begin with phrases like:
recommend a customer support tool
alternative to competitor name
competitor name pricing
how do you track brand mentions
looking for a LinkedIn post search API
we are hiring our first sales person
Each keyword/phase represents a different research question. Keep them separate so you can remove the queries that return weak results.
Avoid calling every mention a lead. A person may be researching for an article, discussing an old project, or sharing a link without looking for a product.
Step 2: Make the LinkedIn search request
Create a SocialListeningAPI account, activate it, and copy your API key. Send the key in the x-api-key header.
curl --get 'https://api.sociallisteningapi.com/api/v1/linkedin/search' \
--data-urlencode 'query=recommend a customer support tool' \
--header 'x-api-key: YOUR_API_KEY'
Set raw=true only when you need the unchanged provider response as well as the normalized fields:
curl --get 'https://api.sociallisteningapi.com/api/v1/linkedin/search' \
--data-urlencode 'query=recommend a customer support tool' \
--data-urlencode 'raw=true' \
--header 'x-api-key: YOUR_API_KEY'
Here is the same request in JavaScript:
const url = new URL(
"https://api.sociallisteningapi.com/api/v1/linkedin/search",
);
url.searchParams.set("query", "recommend a customer support tool");
const response = await fetch(url, {
headers: {
"x-api-key": process.env.SOCIALLISTENING_API_KEY,
},
});
if (!response.ok) {
throw new Error(`LinkedIn post search failed with status ${response.status}`);
}
const result = await response.json();
const posts = result.data.items;
console.log(posts);
Keep the API key secure on your server. Browser code, public repositories, screenshots, and logs are poor places for a private key.
Step 3: Tell ChatGPT what to research
ChatGPT needs to know what a useful mention looks like.
For a product-research workfow, use a prompt like this:
Review these public LinkedIn posts for product research.
Keep a post only when the author directly describes one of these:
- a problem they are trying to solve
- a tool recommendation request
- a named product comparison
- a pricing or access concern
- a workaround for a missing feature
For every kept post, return:
- author and published date
- exact problem or request
- product or workaround named
- direct statement from the post
- your inference, clearly labelled
- source URL
Reject job ads, event promotions, copied news, vague category mentions, and posts without enough context. Do not estimate purchase intent or lead quality. Do not draft a comment or direct message.
If a post says, “We need a way to search public comments,” that is a direct need. Saying the company has a budget or plans to buy this month would be an unsupported guess at most.
Step 4: Run the search from ChatGPT through MCP
If you prefer to stay in ChatGPT, connect the
SocialListeningAPI MCP via its MCP server. ChatGPT can call the LinkedIn search tool and receive current public mentions with source URLs.
Use a prompt that includes the query, the source, and the output limit:
Use SocialListeningAPI to search public LinkedIn posts for these phrases:
- recommend a customer support tool
- alternative to CompetitorName
- CompetitorName pricing
Return at most 10 useful posts. Include the matched query, author, published date, short context, fit reason, and source URL. Put uncertain matches in a separate list.
This search will consume SocialListeningAPI credits. ChatGPT performs the grouping and summary.
Know that ChatGPT does not create a recurring schedule, store old results, or send an alert by itself.
You can use something external like Zapier, N8N, etc for recurring social listening. Or use ChatGPT scheduled tasks for a super quick setup.
Conclusion
I hope this workflow has been useful for you. With this workflow, you can detect mentions for B2B brands/products easily and find potential leads.
If you want a proper social listening tool instead of this, I'd recommend Mentionkit. The main advantage of using a pure API solution is the cost. SociallisteningAPI has usage-based pricing and it comes a lot cheaper than existing brand monitoring products.
Top comments (0)