Get reactions on a post
curl --request GET \
--url https://api.fetchin.io/api/v1/post/reactions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/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.fetchin.io/api/v1/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.fetchin.io/api/v1/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.fetchin.io/api/v1/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.fetchin.io/api/v1/post/reactions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/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{
"reactions": [
{
"reactionType": "LIKE",
"actor": {
"urn": "urn:li:fsd_profile:ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"name": "Kevin Piacentini",
"headline": "Lead Engineer | Scaled my SaaS to $250K ARR",
"profileUrl": "https://www.linkedin.com/in/ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
}
},
{
"reactionType": "EMPATHY",
"actor": {
"urn": "urn:li:fsd_profile:ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
"name": "Yasmine Damnati",
"headline": "Apprentie ingenieur automatisme",
"profileUrl": "https://www.linkedin.com/in/ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
}
}
],
"hasMore": false
}
{
"error": "Missing postUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Unable to find post from url",
"code": "POST_NOT_FOUND"
}
{
"error": "Quota exceeded. Upgrade your plan or wait for renewal.",
"code": "QUOTA_EXHAUSTED",
"details": {
"creditsRemaining": 0,
"subscriptionCreditsRemaining": 0,
"paygCreditsRemaining": 0,
"buyCreditsUrl": "https://fetchin.io/credits"
}
}
{
"error": "Internal server error",
"code": "INTERNAL_ERROR"
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Posts
Get Post Reactions
Fetch reactions on a professional post with reactor profile information
GET
/
api
/
v1
/
post
/
reactions
Get reactions on a post
curl --request GET \
--url https://api.fetchin.io/api/v1/post/reactions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/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.fetchin.io/api/v1/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.fetchin.io/api/v1/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.fetchin.io/api/v1/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.fetchin.io/api/v1/post/reactions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/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{
"reactions": [
{
"reactionType": "LIKE",
"actor": {
"urn": "urn:li:fsd_profile:ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"name": "Kevin Piacentini",
"headline": "Lead Engineer | Scaled my SaaS to $250K ARR",
"profileUrl": "https://www.linkedin.com/in/ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
}
},
{
"reactionType": "EMPATHY",
"actor": {
"urn": "urn:li:fsd_profile:ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
"name": "Yasmine Damnati",
"headline": "Apprentie ingenieur automatisme",
"profileUrl": "https://www.linkedin.com/in/ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
}
}
],
"hasMore": false
}
{
"error": "Missing postUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Unable to find post from url",
"code": "POST_NOT_FOUND"
}
{
"error": "Quota exceeded. Upgrade your plan or wait for renewal.",
"code": "QUOTA_EXHAUSTED",
"details": {
"creditsRemaining": 0,
"subscriptionCreditsRemaining": 0,
"paygCreditsRemaining": 0,
"buyCreditsUrl": "https://fetchin.io/credits"
}
}
{
"error": "Internal server error",
"code": "INTERNAL_ERROR"
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Endpoint
GET /api/v1/post/reactions
Authentication
Include your API key in the request header:X-API-Key: your-api-key-here
Parameters
string
required
Professional post URL or URN.Examples:
https://www.linkedin.com/posts/username_some-post-slug-1234567890-abcdurn:li:activity:7287782484287606784urn:li:ugcPost:7287782484287606784
integer
default:"100"
Number of reactions to fetch per page.
- Minimum: 1
- Maximum: 100
- Default: 100
integer
default:"0"
Offset for pagination.
- Default: 0
Response
array
Array of reactions on the post
Show Reaction object
Show Reaction object
string
The type of reaction. One of:
LIKE, EMPATHY (Love), ENTERTAINMENT (Funny), INTEREST (Insightful), PRAISE (Celebrate), APPRECIATION (Support)object
required
Information about the person who reacted
boolean
Indicates whether there are more reactions to fetch.
Example Request
curl -X GET "https://api.fetchin.io/api/v1/post/reactions?postUrlOrUrn=https://www.linkedin.com/posts/username_post-slug-1234567890-abcd&count=100" \
-H "X-API-Key: your-api-key-here"
const response = await fetch(
'https://api.fetchin.io/api/v1/post/reactions?postUrlOrUrn=urn:li:activity:7287782484287606784&count=100',
{
headers: {
'X-API-Key': 'your-api-key-here'
}
}
);
const data = await response.json();
console.log(data);
import requests
headers = {
'X-API-Key': 'your-api-key-here'
}
params = {
'postUrlOrUrn': 'urn:li:activity:7287782484287606784',
'count': 100
}
response = requests.get(
'https://api.fetchin.io/api/v1/post/reactions',
headers=headers,
params=params
)
data = response.json()
print(data)
<?php
$apiKey = 'your-api-key-here';
$postUrlOrUrn = 'urn:li:activity:7287782484287606784';
$count = 100;
$url = "https://api.fetchin.io/api/v1/post/reactions?postUrlOrUrn=" . urlencode($postUrlOrUrn) . "&count=" . $count;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
print_r($data);
?>
Example Response
{
"reactions": [
{
"reactionType": "LIKE",
"actor": {
"urn": "urn:li:fsd_profile:ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"name": "Kevin Piacentini",
"headline": "Lead Engineer | Scaled my SaaS to $250K ARR",
"profileUrl": "https://www.linkedin.com/in/ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
}
},
{
"reactionType": "EMPATHY",
"actor": {
"urn": "urn:li:fsd_profile:ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
"name": "Yasmine Damnati",
"headline": "Apprentie ingenieur automatisme",
"profileUrl": "https://www.linkedin.com/in/ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
}
}
],
"hasMore": false
}
{
"error": "Missing postUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Unable to find post from url",
"code": "POST_NOT_FOUND"
}
{
"error": "Quota exceeded. Upgrade your plan or wait for renewal.",
"code": "QUOTA_EXHAUSTED",
"details": {
"creditsRemaining": 0,
"subscriptionCreditsRemaining": 0,
"paygCreditsRemaining": 0,
"buyCreditsUrl": "https://fetchin.io/credits"
}
}
{
"error": "Internal server error",
"code": "INTERNAL_ERROR"
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Errors
See Error Handling for the full list of error codes and recommended handling.400—MISSING_PARAMETER,INVALID_URN401—INVALID_API_KEY404—POST_NOT_FOUND402—QUOTA_EXHAUSTED429—RATE_LIMITED500—INTERNAL_ERROR503—SERVICE_UNAVAILABLE
Pagination
To fetch all reactions from a post with many reactions, use offset pagination:- Make an initial request with
start=0 - If
hasMoreistrue, incrementstartbycountin your next request - Continue until
hasMoreisfalse
async function fetchAllReactions(postUrlOrUrn) {
const allReactions = [];
let start = 0;
const count = 100;
let hasMore = true;
while (hasMore) {
const params = new URLSearchParams({ postUrlOrUrn, count: String(count), start: String(start) });
const response = await fetch(
`https://api.fetchin.io/api/v1/post/reactions?${params}`,
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);
const data = await response.json();
allReactions.push(...data.reactions);
hasMore = data.hasMore;
start += count;
}
return allReactions;
}
Notes
This endpoint consumes 1 credit from your credit balance per API call, regardless of the
count parameter value. Errors are free — with one exception: a 404 not found costs 1 credit. See Quotas.You can pass either a professional post URL (e.g.
https://www.linkedin.com/posts/...) or a post URN (e.g. urn:li:activity:...). When a URL is provided, the API automatically resolves it to the correct activity URN.Authorizations
Query Parameters
Professional post URL or URN
Example:
"https://www.linkedin.com/posts/username_post-slug-1234567890-abcd"
Number of reactions to fetch (default: 100)
Required range:
1 <= x <= 100Offset of the first item to return. This endpoint pages by offset: advance start by the number of items you received. Keep requesting while hasMore is true; an empty page ends the list.
Required range:
x >= 0