Search LinkedIn Post Engagers
curl --request POST \
--url https://api.lemlist.com/api/database/people/linkedin-post-engagement \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd"
}
'import requests
url = "https://api.lemlist.com/api/database/people/linkedin-post-engagement"
payload = { "url": "https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd'
})
};
fetch('https://api.lemlist.com/api/database/people/linkedin-post-engagement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/database/people/linkedin-post-engagement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/database/people/linkedin-post-engagement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"slugs": [
"john-doe",
"jane-smith"
],
"totals": {
"comments": 1,
"reactions": 1
},
"isCapped": false,
"filters": [
{
"filterId": "leadLinkedInSlug",
"in": [
"john-doe",
"jane-smith"
],
"out": []
},
{
"filterId": "country",
"in": [
"France"
],
"out": []
}
],
"search": "lsh_ExAmPlEnGgR8d2Kq5",
"people": {
"results": [
{
"lead_id": 100000001,
"full_name": "John Doe",
"country": "France",
"lead_linkedin_url": "https://www.linkedin.com/in/john-doe",
"linkedin_short": "john-doe",
"headline": "Head of Sales at Acme Inc",
"current_exp_company_name": "Acme Inc"
}
],
"total": 1,
"page": 1,
"size": 100
}
}
}
People database
Search LinkedIn post engagers
Finds the people who commented on or reacted to a LinkedIn post and returns them as People Database rows.
POST
/
database
/
people
/
linkedin-post-engagement
Search LinkedIn Post Engagers
curl --request POST \
--url https://api.lemlist.com/api/database/people/linkedin-post-engagement \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd"
}
'import requests
url = "https://api.lemlist.com/api/database/people/linkedin-post-engagement"
payload = { "url": "https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd'
})
};
fetch('https://api.lemlist.com/api/database/people/linkedin-post-engagement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/database/people/linkedin-post-engagement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/database/people/linkedin-post-engagement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"slugs": [
"john-doe",
"jane-smith"
],
"totals": {
"comments": 1,
"reactions": 1
},
"isCapped": false,
"filters": [
{
"filterId": "leadLinkedInSlug",
"in": [
"john-doe",
"jane-smith"
],
"out": []
},
{
"filterId": "country",
"in": [
"France"
],
"out": []
}
],
"search": "lsh_ExAmPlEnGgR8d2Kq5",
"people": {
"results": [
{
"lead_id": 100000001,
"full_name": "John Doe",
"country": "France",
"lead_linkedin_url": "https://www.linkedin.com/in/john-doe",
"linkedin_short": "john-doe",
"headline": "Head of Sales at Acme Inc",
"current_exp_company_name": "Acme Inc"
}
],
"total": 1,
"page": 1,
"size": 100
}
}
}
This endpoint is paid. Each call debits 50 credits once the post has been read, even when nobody engaged with it and the search returns no one. A
200 means credits were debited, unless it carries peopleSearchFailed (see below). No error code debits credits.Never call it again on the same post to get the next pages or to refine the filters. Pass the search id of the response as fromSearchId to Search People database, which does not bill the post again. It debits no credits, but it counts in your 24-hour People Database search quota, like any search.The search covers at most 1000 people, commenters first.
isCapped is true when the post had more engagers than that. Use type to restrict the search to comments or reactions.filters take the same format as Search People database (see Get Database Filters for the valid filterId values). They are validated before any credit is debited. linkedinPostEngagement and leadLinkedInSlug are rejected with a 400, because the search sets them itself.If
peopleSearchFailed is true, the People Database search failed after the post was read: the 50 credits were refunded, slugs and filters are valid, search and people are absent. Run Search People database yourself with the returned filters, which debits no credits but counts in your 24-hour quota, or call this endpoint again, which is a new paid call.curl -X POST "https://api.lemlist.com/api/database/people/linkedin-post-engagement" \
-u ":YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd",
"type": "all",
"filters": [{ "filterId": "country", "in": ["France"], "out": [] }]
}'
Authorizations
Body
application/json
The LinkedIn post to read, and optionally the filters to apply to its engagers. Unknown keys are rejected with 400.
Link of the LinkedIn post. Prefer the post page (linkedin.com/posts/...). A short lnkd.in link or a linkedin.com/feed/update/urn:li:activity:... link also works, but a feed/update link can fail on a post published in the last few hours.
Required string length:
1 - 1000Example:
"https://www.linkedin.com/posts/example-post-activity-1234567890123456789-AbCd"
Was this page helpful?