Get reactions of LinkedIn post
curl --request GET \
--url https://api.harvestapi.io/linkedin/post-reactions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/post-reactions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.harvestapi.io/linkedin/post-reactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvestapi.io/linkedin/post-reactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvestapi.io/linkedin/post-reactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvestapi.io/linkedin/post-reactions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/post-reactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"elements": [
{
"id": "urn:li:fsd_reaction:(urn:li:fsd_profile:ACoAAFsSba4BjCtAJXsUcfwXs0LPljAa2PsGpc8,urn:li:activity:7330681775884533760,0)",
"reactionType": "LIKE",
"postId": "7330681775884533760",
"actor": {
"id": "ACoAAFsSba4BjCtAJXsUcfwXs0LPljAa2PsGpc8",
"name": "Om More",
"linkedinUrl": "https://www.linkedin.com/in/ACoAAFsSba4BjCtAJXsUcfwXs0LPljAa2PsGpc8",
"position": "Student at Yashwantrao Mohite College of Arts, Science and Commerce, Pune",
"pictureUrl": "https://media.licdn.com/dms/image/v2/D4E03AQEjFjWHGRTC2Q/profile-displayphoto-shrink_800_800/B4EZcG0eZVHAAc-/0/1748166110665?e=1753920000&v=beta&t=HOMnbBij0Z_MV2RvUu5zLKCpOaN8Cbnh72uqaH99ZLA",
"picture": {
"url": "https://media.licdn.com/dms/image/v2/D4E03AQEjFjWHGRTC2Q/profile-displayphoto-shrink_800_800/B4EZcG0eZVHAAc-/0/1748166110665?e=1753920000&v=beta&t=HOMnbBij0Z_MV2RvUu5zLKCpOaN8Cbnh72uqaH99ZLA",
"width": 800,
"height": 800,
"expiresAt": 1753920000000
}
}
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": "<string>",
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}LinkedIn Post
Post reactions
Get reactions of LinkedIn post by post URL.
GET
/
linkedin
/
post-reactions
Get reactions of LinkedIn post
curl --request GET \
--url https://api.harvestapi.io/linkedin/post-reactions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/post-reactions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.harvestapi.io/linkedin/post-reactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvestapi.io/linkedin/post-reactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvestapi.io/linkedin/post-reactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvestapi.io/linkedin/post-reactions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/post-reactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"elements": [
{
"id": "urn:li:fsd_reaction:(urn:li:fsd_profile:ACoAAFsSba4BjCtAJXsUcfwXs0LPljAa2PsGpc8,urn:li:activity:7330681775884533760,0)",
"reactionType": "LIKE",
"postId": "7330681775884533760",
"actor": {
"id": "ACoAAFsSba4BjCtAJXsUcfwXs0LPljAa2PsGpc8",
"name": "Om More",
"linkedinUrl": "https://www.linkedin.com/in/ACoAAFsSba4BjCtAJXsUcfwXs0LPljAa2PsGpc8",
"position": "Student at Yashwantrao Mohite College of Arts, Science and Commerce, Pune",
"pictureUrl": "https://media.licdn.com/dms/image/v2/D4E03AQEjFjWHGRTC2Q/profile-displayphoto-shrink_800_800/B4EZcG0eZVHAAc-/0/1748166110665?e=1753920000&v=beta&t=HOMnbBij0Z_MV2RvUu5zLKCpOaN8Cbnh72uqaH99ZLA",
"picture": {
"url": "https://media.licdn.com/dms/image/v2/D4E03AQEjFjWHGRTC2Q/profile-displayphoto-shrink_800_800/B4EZcG0eZVHAAc-/0/1748166110665?e=1753920000&v=beta&t=HOMnbBij0Z_MV2RvUu5zLKCpOaN8Cbnh72uqaH99ZLA",
"width": 800,
"height": 800,
"expiresAt": 1753920000000
}
}
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": "<string>",
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}Profile URL format note
This endpoint scrapes the Reactions pop-up of a post on the LinkedIn website. For reactions, LinkedIn website usually returns profile URLs in profile ID format, for example:https://linkedin.com/in/ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc without public identifiers / slugs - we
did’t find a way to get slugs directly from the Reactions pop-up or decode these IDs.The get the usual profile URL the workaround is to call the Profile endpoint for each profile reaction (check main profile version to reduce costs).
Examples
const params = new URLSearchParams({
post: 'https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7?utm_source=share&utm_medium=member_desktop&rcm=ACoAACzazy4B3ajZsA0WxWr6m4S77iItYbYCLZM',
// post: 'https://www.linkedin.com/feed/update/urn:li:activity:7320867199693246465/' // Or Activity URL
});
fetch(`https://api.harvestapi.io/linkedin/post-reactions?${params.toString()}`, {
headers: { 'X-API-Key': '<api-key>' },
})
.then((response) => response.json())
.then((data) => console.log(data));
curl --request GET \
--url https://api.harvestapi.io/linkedin/post-reactions?post=https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7?utm_source=share&utm_medium=member_desktop&rcm=ACoAACzazy4B3ajZsA0WxWr6m4S77iItYbYCLZM \
--header 'X-API-Key: <api-key>'
import requests
url = "https://api.harvestapi.io/linkedin/post-reactions?post=https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7?utm_source=share&utm_medium=member_desktop&rcm=ACoAACzazy4B3ajZsA0WxWr6m4S77iItYbYCLZM"
headers = {"X-API-Key": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.text)
⌘I

