curl --request GET \
--url https://api.fetchin.io/api/v1/profile/comments \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/profile/comments"
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/profile/comments', 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/profile/comments",
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/profile/comments"
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/profile/comments")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/profile/comments")
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{
"comments": [
{
"commentText": "Congratulations to the whole team — this is the kind of progress that compounds.",
"commentUrn": "urn:li:comment:(urn:li:activity:7486820978292072449,7486901233445109760)",
"commentLink": "https://www.linkedin.com/feed/update/urn:li:activity:7486820978292072449?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7486820978292072449%2C7486901233445109760%29",
"isPinned": false,
"createdAt": "2026-07-25T18:04:12.000Z",
"stats": {
"totalReactions": 184,
"comments": 7,
"reactions": {
"like": 151,
"appreciation": 12,
"empathy": 11,
"interest": 6,
"praise": 4
}
},
"commenter": {
"name": "Bill Gates",
"subtitle": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"url": "https://www.linkedin.com/in/williamhgates",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"post": {
"postText": "We just published our annual report on primary health care financing. Three findings surprised us.",
"postUrl": "https://www.linkedin.com/posts/gatesfoundation_annual-report-primary-health-care-activity-7486820978292072449-ab1c",
"postUrn": "7486820978292072449",
"date": "2026-07-25T16:33:39.632Z",
"author": {
"name": "Gates Foundation",
"headline": "Every person deserves the chance to live a healthy, productive life.",
"url": "https://www.linkedin.com/company/gatesfoundation",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"stats": {
"totalReactions": 4490,
"comments": 425,
"reposts": 230,
"reactions": {
"like": 4139,
"appreciation": 63,
"empathy": 159,
"interest": 23,
"praise": 104
}
},
"images": [
{
"url": "https://media.licdn.com/dms/image/...",
"width": 2048,
"height": 1365
}
],
"video": null
}
},
{
"commentText": "Agreed. The hard part is not the model, it is the data pipeline behind it.",
"commentUrn": "urn:li:comment:(urn:li:activity:7409540219328344064,7409601884712173568)",
"commentLink": "https://www.linkedin.com/feed/update/urn:li:activity:7409540219328344064?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7409540219328344064%2C7409601884712173568%29",
"isPinned": true,
"createdAt": "2026-01-20T15:48:03.000Z",
"stats": {
"totalReactions": 23,
"comments": 1,
"reactions": {
"like": 20,
"appreciation": 0,
"empathy": 1,
"interest": 2,
"praise": 0
}
},
"commenter": {
"name": "Bill Gates",
"subtitle": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"url": "https://www.linkedin.com/in/williamhgates",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"post": {
"postText": "Six months of inference cost data, in one chart.",
"postUrl": "https://www.linkedin.com/posts/milanmilanovic_inference-cost-activity-7409540219328344064-9xkd",
"postUrn": "7409540219328344064",
"date": "2026-01-20T14:20:00.000Z",
"author": {
"name": "Dr Milan Milanovic",
"headline": "Helping 400K+ engineers and leaders grow",
"url": "https://www.linkedin.com/in/milanmilanovic",
"profilePictureUrl": null
},
"stats": {
"totalReactions": 635,
"comments": 59,
"reposts": 18,
"reactions": {
"like": 571,
"appreciation": 9,
"empathy": 14,
"interest": 33,
"praise": 8
}
},
"video": {
"url": "https://dms.licdn.com/playlist/vid/...",
"duration": 48120,
"thumbnail": "https://media.licdn.com/dms/image/..."
}
}
}
],
"paginationToken": "dXJuOmxpOmNvbW1lbnQ6NzQwOTYwMTg4NDcxMjE3MzU2OC0xNzY1MDA1NTU3NTM4",
"hasMore": true
}
{
"error": "Missing profileUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Profile not found",
"code": "PROFILE_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"
}
Get Profile Comments
Fetch the comments a professional profile has written, each with the post it was written on
curl --request GET \
--url https://api.fetchin.io/api/v1/profile/comments \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fetchin.io/api/v1/profile/comments"
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/profile/comments', 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/profile/comments",
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/profile/comments"
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/profile/comments")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fetchin.io/api/v1/profile/comments")
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{
"comments": [
{
"commentText": "Congratulations to the whole team — this is the kind of progress that compounds.",
"commentUrn": "urn:li:comment:(urn:li:activity:7486820978292072449,7486901233445109760)",
"commentLink": "https://www.linkedin.com/feed/update/urn:li:activity:7486820978292072449?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7486820978292072449%2C7486901233445109760%29",
"isPinned": false,
"createdAt": "2026-07-25T18:04:12.000Z",
"stats": {
"totalReactions": 184,
"comments": 7,
"reactions": {
"like": 151,
"appreciation": 12,
"empathy": 11,
"interest": 6,
"praise": 4
}
},
"commenter": {
"name": "Bill Gates",
"subtitle": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"url": "https://www.linkedin.com/in/williamhgates",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"post": {
"postText": "We just published our annual report on primary health care financing. Three findings surprised us.",
"postUrl": "https://www.linkedin.com/posts/gatesfoundation_annual-report-primary-health-care-activity-7486820978292072449-ab1c",
"postUrn": "7486820978292072449",
"date": "2026-07-25T16:33:39.632Z",
"author": {
"name": "Gates Foundation",
"headline": "Every person deserves the chance to live a healthy, productive life.",
"url": "https://www.linkedin.com/company/gatesfoundation",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"stats": {
"totalReactions": 4490,
"comments": 425,
"reposts": 230,
"reactions": {
"like": 4139,
"appreciation": 63,
"empathy": 159,
"interest": 23,
"praise": 104
}
},
"images": [
{
"url": "https://media.licdn.com/dms/image/...",
"width": 2048,
"height": 1365
}
],
"video": null
}
},
{
"commentText": "Agreed. The hard part is not the model, it is the data pipeline behind it.",
"commentUrn": "urn:li:comment:(urn:li:activity:7409540219328344064,7409601884712173568)",
"commentLink": "https://www.linkedin.com/feed/update/urn:li:activity:7409540219328344064?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7409540219328344064%2C7409601884712173568%29",
"isPinned": true,
"createdAt": "2026-01-20T15:48:03.000Z",
"stats": {
"totalReactions": 23,
"comments": 1,
"reactions": {
"like": 20,
"appreciation": 0,
"empathy": 1,
"interest": 2,
"praise": 0
}
},
"commenter": {
"name": "Bill Gates",
"subtitle": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"url": "https://www.linkedin.com/in/williamhgates",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"post": {
"postText": "Six months of inference cost data, in one chart.",
"postUrl": "https://www.linkedin.com/posts/milanmilanovic_inference-cost-activity-7409540219328344064-9xkd",
"postUrn": "7409540219328344064",
"date": "2026-01-20T14:20:00.000Z",
"author": {
"name": "Dr Milan Milanovic",
"headline": "Helping 400K+ engineers and leaders grow",
"url": "https://www.linkedin.com/in/milanmilanovic",
"profilePictureUrl": null
},
"stats": {
"totalReactions": 635,
"comments": 59,
"reposts": 18,
"reactions": {
"like": 571,
"appreciation": 9,
"empathy": 14,
"interest": 33,
"praise": 8
}
},
"video": {
"url": "https://dms.licdn.com/playlist/vid/...",
"duration": 48120,
"thumbnail": "https://media.licdn.com/dms/image/..."
}
}
}
],
"paginationToken": "dXJuOmxpOmNvbW1lbnQ6NzQwOTYwMTg4NDcxMjE3MzU2OC0xNzY1MDA1NTU3NTM4",
"hasMore": true
}
{
"error": "Missing profileUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Profile not found",
"code": "PROFILE_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/profile/comments
Authentication
Include your API key in the request header:X-API-Key: your-api-key-here
Parameters
- Profile URN, recommended for consistency: a profile’s public identifier (slug) can change over time, the URN does not. Example:
urn:li:fsd_profile:ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc - Public identifier (slug), also fine. Example:
williamhgates - Profile URL. Example:
https://www.linkedin.com/in/williamhgates(a trailing slash makes no difference)
/in/ prefix.Member profiles only: a company page URL or URN is rejected with a 400 error, free of charge.- Minimum: 1 —
0or a negative value is rejected with400 - Maximum: 100 — a higher value is clamped, not rejected
- Default: 10
start is rejected with 400 rather than silently
returning the first page again. Use paginationToken.paginationToken from the previous
response, unchanged; omit it to start from the beginning. Keep paging while
hasMore is true.Pass it back verbatim. A token this API did not issue is not rejected — it is
forwarded, and the page comes back empty and still costs a credit, so do not
construct or edit one.Response
Show Comment object
Show Comment object
Show Comment stats object
Show Comment stats object
Show Post object
Show Post object
url, width and height.
Always present; an empty array when the post carries no image — and also
when it carries a video, because the two are mutually exclusive here.null when the post has
none. Carries url, duration and thumbnail, plus the raw upstream
stream metadata (progressiveStreams, aspectRatio, entityUrn,
provider, media) — treat those as additive and do not depend on them.hasMore.Example Request
curl -X GET "https://api.fetchin.io/api/v1/profile/comments?profileUrlOrUrn=https://www.linkedin.com/in/williamhgates&count=5" \
-H "X-API-Key: your-api-key-here"
const response = await fetch(
'https://api.fetchin.io/api/v1/profile/comments?profileUrlOrUrn=https://www.linkedin.com/in/williamhgates&count=5',
{
headers: {
'X-API-Key': 'your-api-key-here'
}
}
);
const data = await response.json();
console.log(data.comments);
import requests
headers = {
'X-API-Key': 'your-api-key-here'
}
params = {
'profileUrlOrUrn': 'https://www.linkedin.com/in/williamhgates',
'count': 5
}
response = requests.get(
'https://api.fetchin.io/api/v1/profile/comments',
headers=headers,
params=params
)
data = response.json()
print(data['comments'])
<?php
$apiKey = 'your-api-key-here';
$profileUrl = 'https://www.linkedin.com/in/williamhgates';
$count = 5;
$url = "https://api.fetchin.io/api/v1/profile/comments?profileUrlOrUrn=" . urlencode($profileUrl) . "&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['comments']);
?>
Example Response
{
"comments": [
{
"commentText": "Congratulations to the whole team — this is the kind of progress that compounds.",
"commentUrn": "urn:li:comment:(urn:li:activity:7486820978292072449,7486901233445109760)",
"commentLink": "https://www.linkedin.com/feed/update/urn:li:activity:7486820978292072449?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7486820978292072449%2C7486901233445109760%29",
"isPinned": false,
"createdAt": "2026-07-25T18:04:12.000Z",
"stats": {
"totalReactions": 184,
"comments": 7,
"reactions": {
"like": 151,
"appreciation": 12,
"empathy": 11,
"interest": 6,
"praise": 4
}
},
"commenter": {
"name": "Bill Gates",
"subtitle": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"url": "https://www.linkedin.com/in/williamhgates",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"post": {
"postText": "We just published our annual report on primary health care financing. Three findings surprised us.",
"postUrl": "https://www.linkedin.com/posts/gatesfoundation_annual-report-primary-health-care-activity-7486820978292072449-ab1c",
"postUrn": "7486820978292072449",
"date": "2026-07-25T16:33:39.632Z",
"author": {
"name": "Gates Foundation",
"headline": "Every person deserves the chance to live a healthy, productive life.",
"url": "https://www.linkedin.com/company/gatesfoundation",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"stats": {
"totalReactions": 4490,
"comments": 425,
"reposts": 230,
"reactions": {
"like": 4139,
"appreciation": 63,
"empathy": 159,
"interest": 23,
"praise": 104
}
},
"images": [
{
"url": "https://media.licdn.com/dms/image/...",
"width": 2048,
"height": 1365
}
],
"video": null
}
},
{
"commentText": "Agreed. The hard part is not the model, it is the data pipeline behind it.",
"commentUrn": "urn:li:comment:(urn:li:activity:7409540219328344064,7409601884712173568)",
"commentLink": "https://www.linkedin.com/feed/update/urn:li:activity:7409540219328344064?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7409540219328344064%2C7409601884712173568%29",
"isPinned": true,
"createdAt": "2026-01-20T15:48:03.000Z",
"stats": {
"totalReactions": 23,
"comments": 1,
"reactions": {
"like": 20,
"appreciation": 0,
"empathy": 1,
"interest": 2,
"praise": 0
}
},
"commenter": {
"name": "Bill Gates",
"subtitle": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"url": "https://www.linkedin.com/in/williamhgates",
"profilePictureUrl": "https://media.licdn.com/dms/image/..."
},
"post": {
"postText": "Six months of inference cost data, in one chart.",
"postUrl": "https://www.linkedin.com/posts/milanmilanovic_inference-cost-activity-7409540219328344064-9xkd",
"postUrn": "7409540219328344064",
"date": "2026-01-20T14:20:00.000Z",
"author": {
"name": "Dr Milan Milanovic",
"headline": "Helping 400K+ engineers and leaders grow",
"url": "https://www.linkedin.com/in/milanmilanovic",
"profilePictureUrl": null
},
"stats": {
"totalReactions": 635,
"comments": 59,
"reposts": 18,
"reactions": {
"like": 571,
"appreciation": 9,
"empathy": 14,
"interest": 33,
"praise": 8
}
},
"video": {
"url": "https://dms.licdn.com/playlist/vid/...",
"duration": 48120,
"thumbnail": "https://media.licdn.com/dms/image/..."
}
}
}
],
"paginationToken": "dXJuOmxpOmNvbW1lbnQ6NzQwOTYwMTg4NDcxMjE3MzU2OC0xNzY1MDA1NTU3NTM4",
"hasMore": true
}
{
"error": "Missing profileUrlOrUrn parameter",
"code": "MISSING_PARAMETER"
}
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
{
"error": "Profile not found",
"code": "PROFILE_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.400MISSING_PARAMETER/INVALID_PARAMETER/INVALID_URN401INVALID_API_KEY404PROFILE_NOT_FOUND402QUOTA_EXHAUSTED429RATE_LIMITED500INTERNAL_ERROR503SERVICE_UNAVAILABLE
Pagination
To collect a profile’s whole comment history:- Make an initial request without
paginationToken - If
hasMoreistrue, use the returnedpaginationTokenin your next request - Continue until
hasMoreisfalse— not until a page comes back short
async function fetchAllProfileComments(profileUrl) {
const allComments = [];
let paginationToken = null;
let hasMore = true;
while (hasMore) {
const params = new URLSearchParams({
profileUrlOrUrn: profileUrl,
count: '100'
});
if (paginationToken) {
params.set('paginationToken', paginationToken);
}
const response = await fetch(
`https://api.fetchin.io/api/v1/profile/comments?${params}`,
{ headers: { 'X-API-Key': 'your-api-key-here' } }
);
const data = await response.json();
allComments.push(...data.comments);
paginationToken = data.paginationToken;
hasMore = data.hasMore;
}
return allComments;
}
Notes
count parameter value. Errors are free — with one exception: a 404 not found costs 1 credit. See Quotas.count is a ceiling rather than a promise: a page requested with count=100
routinely comes back with slightly fewer items. A short page is not the end
of the feed — keep paging while hasMore is true, and never stop because
you received fewer comments than you asked for.Use Cases
Buying-intent signals
Voice of the customer
Network mapping
Lead scoring
Authorizations
Query Parameters
The professional profile whose comments to fetch. Accepts a profile URN (recommended for consistency, since a profile's public identifier can change over time while the URN does not; example urn:li:fsd_profile:ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc), a public identifier/slug (also fine; example williamhgates), or a full profile URL (example https://www.linkedin.com/in/williamhgates; a trailing slash is ignored). The slug is the last path segment of a profile URL, so pass just the slug, not the /in/ prefix. Member profiles only: a company page URL or URN is rejected with a 400 error, free of charge.
"urn:li:fsd_profile:ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc"
Number of comments to fetch per page (default: 10). Values above 100 are clamped to 100. This is a ceiling: a page can return slightly fewer items without meaning the feed is exhausted.
1 <= x <= 100Not supported on this endpoint. This feed is cursor-paginated and ignores offsets, so a non-zero value is rejected with 400 rather than silently returning the first page again. Page with paginationToken instead.
x >= 0Cursor for the next page: pass back the paginationToken from the previous response, unchanged. Omit it to start from the beginning. Pass it back verbatim: a token this API did not issue is NOT rejected here, it is forwarded, and the page comes back empty and still costs a credit. Keep paging while hasMore is true.