curl --request GET \
--url https://api.fetchin.io/api/v1/post/engagement \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/post/engagement"
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/engagement', 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/engagement",
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/engagement"
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/engagement")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/post/engagement")
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{
"post": "urn:li:activity:7287782484287606784",
"comments": [
{
"urn": "urn:li:comment:(ugcPost:7287782484287606784,7287957733851484162)",
"text": "Great post!",
"createdAt": "2024-01-22T14:22:07.458Z",
"reactionCount": 5,
"author": {
"type": "profile",
"id": "urn:li:fsd_profile:ACoAABCDEFG",
"name": "Jane Doe",
"headline": "Software Engineer",
"profileUrl": "https://www.linkedin.com/in/janedoe"
},
"replies": []
}
],
"commentsPaginationToken": "MTAtMTcwNjAwMDAwMDAwMA==",
"commentsHasMore": true,
"commentsTotal": 42,
"reactions": [
{
"reactionType": "LIKE",
"actor": {
"urn": "urn:li:fsd_profile:ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"type": "profile",
"name": "Kevin Piacentini",
"headline": "Lead Engineer",
"profileUrl": "https://www.linkedin.com/in/kevin-piacentini/",
"profilePictureUrl": "https://media.licdn.com/dms/image/...",
"publicId": "kevin-piacentini",
"profileId": "ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g"
}
}
],
"reactionsHasMore": false,
"reactionsTotal": 1
}
{
"error": "Missing postUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"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": "Unable to find post from url",
"code": "POST_NOT_FOUND"
}
{
"error": "This endpoint costs 2 RPS units but your plan allows 1 request(s) per second. Upgrade your plan to use it.",
"code": "RATE_LIMITED"
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Get Post Engagement
Fetch a post’s comments and reactions in a single call
curl --request GET \
--url https://api.fetchin.io/api/v1/post/engagement \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/post/engagement"
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/engagement', 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/engagement",
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/engagement"
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/engagement")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/post/engagement")
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{
"post": "urn:li:activity:7287782484287606784",
"comments": [
{
"urn": "urn:li:comment:(ugcPost:7287782484287606784,7287957733851484162)",
"text": "Great post!",
"createdAt": "2024-01-22T14:22:07.458Z",
"reactionCount": 5,
"author": {
"type": "profile",
"id": "urn:li:fsd_profile:ACoAABCDEFG",
"name": "Jane Doe",
"headline": "Software Engineer",
"profileUrl": "https://www.linkedin.com/in/janedoe"
},
"replies": []
}
],
"commentsPaginationToken": "MTAtMTcwNjAwMDAwMDAwMA==",
"commentsHasMore": true,
"commentsTotal": 42,
"reactions": [
{
"reactionType": "LIKE",
"actor": {
"urn": "urn:li:fsd_profile:ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"type": "profile",
"name": "Kevin Piacentini",
"headline": "Lead Engineer",
"profileUrl": "https://www.linkedin.com/in/kevin-piacentini/",
"profilePictureUrl": "https://media.licdn.com/dms/image/...",
"publicId": "kevin-piacentini",
"profileId": "ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g"
}
}
],
"reactionsHasMore": false,
"reactionsTotal": 1
}
{
"error": "Missing postUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"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": "Unable to find post from url",
"code": "POST_NOT_FOUND"
}
{
"error": "This endpoint costs 2 RPS units but your plan allows 1 request(s) per second. Upgrade your plan to use it.",
"code": "RATE_LIMITED"
}
{
"error": "Service temporarily unable to serve this request. Please retry.",
"code": "SERVICE_UNAVAILABLE"
}
Endpoint
GET /api/v1/post/engagement
/post/comments and /post/reactions
separately when you need both.
404 not found, which costs 1 credit like every other
endpoint. Because it costs 2 rate-limit units, your plan’s per-second limit must
be at least 2 to call it.Authentication
X-API-Key: your-api-key-here
Parameters
https://www.linkedin.com/posts/username_some-post-slug-1234567890-abcdurn:li:activity:7287782484287606784urn:li:ugcPost:7287782484287606784
Response
total of Get Post Comments.
Omitted when the source does not report one.total of
Get Post Reactions. A complete
walk can end a few short of it. Omitted when the source does not report one.Example Request
curl -X GET "https://api.fetchin.io/api/v1/post/engagement?postUrlOrUrn=urn:li:activity:7287782484287606784" \
-H "X-API-Key: your-api-key-here"
const response = await fetch(
'https://api.fetchin.io/api/v1/post/engagement?postUrlOrUrn=urn:li:activity:7287782484287606784',
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://api.fetchin.io/api/v1/post/engagement',
headers={'X-API-Key': 'your-api-key-here'},
params={'postUrlOrUrn': 'urn:li:activity:7287782484287606784'},
)
print(response.json())
Example Response
{
"post": "urn:li:activity:7287782484287606784",
"comments": [
{
"urn": "urn:li:comment:(ugcPost:7287782484287606784,7287957733851484162)",
"text": "Great post!",
"createdAt": "2024-01-22T14:22:07.458Z",
"reactionCount": 5,
"author": {
"type": "profile",
"id": "urn:li:fsd_profile:ACoAABCDEFG",
"name": "Jane Doe",
"headline": "Software Engineer",
"profileUrl": "https://www.linkedin.com/in/janedoe"
},
"replies": []
}
],
"commentsPaginationToken": "MTAtMTcwNjAwMDAwMDAwMA==",
"commentsHasMore": true,
"commentsTotal": 42,
"reactions": [
{
"reactionType": "LIKE",
"actor": {
"urn": "urn:li:fsd_profile:ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
"type": "profile",
"name": "Kevin Piacentini",
"headline": "Lead Engineer",
"profileUrl": "https://www.linkedin.com/in/kevin-piacentini/",
"profilePictureUrl": "https://media.licdn.com/dms/image/...",
"publicId": "kevin-piacentini",
"profileId": "ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g"
}
}
],
"reactionsHasMore": false,
"reactionsTotal": 1
}
{
"error": "Missing postUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"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": "Unable to find post from url",
"code": "POST_NOT_FOUND"
}
{
"error": "This endpoint costs 2 RPS units but your plan allows 1 request(s) per second. Upgrade your plan to use it.",
"code": "RATE_LIMITED"
}
{
"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_LIMITED(also returned when the endpoint’s 2-unit cost exceeds your per-second limit)500—INTERNAL_ERROR503—SERVICE_UNAVAILABLE
Pagination
The two lists paginate independently:- Comments paginate by token: pass
commentPaginationTokenfrom the previous response, and stop whencommentsHasMoreisfalse. - Reactions paginate by offset: increment
reactionStartbyreactionCount, and stop whenreactionsHasMoreisfalse.
/post/engagement bills 2 credits and 2 rate-limit units, so if you
only need to deep-paginate one of the two lists, use the dedicated
/post/comments or /post/reactions endpoint (1 credit each) instead.
Notes
404 not found, billed 1 credit — see
Quotas.Authorizations
Query Parameters
Professional post URL or URN
Number of comments to fetch (1-100)
Offset 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.
Token for the next page of comments
Number of reactions to fetch (1-100)
Offset 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.
Response
Combined comments and reactions
The resolved post identifier
Comments (same shape as GET /post/comments)
Token for the next page of comments (absent when none)
Number of top-level comments the source reports for the post (replies not included), as total on GET /post/comments. Omitted when not reported.
Show child attributes
Show child attributes
Number of reactions the source reports for the post, as total on GET /post/reactions. A complete walk can end a few short of it. Omitted when not reported.