Get comments of LinkedIn post
curl --request GET \
--url https://api.harvestapi.io/linkedin/post-comments \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-comments")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/post-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{
"elements": [
{
"id": "7330012053861998592",
"linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329991434395160578?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7329991434395160578%2C7330012053861998592%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287330012053861998592%2Curn%3Ali%3AugcPost%3A7329991434395160578%29",
"commentary": "Exciting 🔥",
"createdAt": "2025-05-18T23:30:58.680Z",
"numComments": 0,
"postId": "7329991434395160578",
"actor": {
"id": "ACoAABLGFg4BRMcDx84MmyU8X-Jqcw9wKCA1QxU",
"name": "Harshavardhan G H",
"linkedinUrl": "https://www.linkedin.com/in/harshavardhangh",
"author": false,
"position": "Business Analyst | Data-Driven Decision Maker | 5+ Years of Experience in Municipal Data Systems & Public Sector Projects | Passionate About Driving Innovation in Local Governance | Always Exploring New Technologies",
"pictureUrl": "https://media.licdn.com/dms/image/v2/D5603AQF38AglH7bh-A/profile-displayphoto-shrink_800_800/profile-displayphoto-shrink_800_800/0/1730799919024?e=1753920000&v=beta&t=Jo-oVn--3ftKSEMtrITF0b3_UG97a0n401-ztV_9Gac",
"picture": {
"url": "https://media.licdn.com/dms/image/v2/D5603AQF38AglH7bh-A/profile-displayphoto-shrink_800_800/profile-displayphoto-shrink_800_800/0/1730799919024?e=1753920000&v=beta&t=Jo-oVn--3ftKSEMtrITF0b3_UG97a0n401-ztV_9Gac",
"width": 800,
"height": 800,
"expiresAt": 1753920000000
}
},
"createdAtTimestamp": 1747611058680,
"pinned": false,
"contributed": false,
"edited": false,
"numShares": null,
"numImpressions": null,
"reactionTypeCounts": [
{
"type": "LIKE",
"count": 1
}
]
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": "<string>",
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}LinkedIn Post
Post comments
Get comments of LinkedIn post by post URL.
GET
/
linkedin
/
post-comments
Get comments of LinkedIn post
curl --request GET \
--url https://api.harvestapi.io/linkedin/post-comments \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-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.harvestapi.io/linkedin/post-comments")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/post-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{
"elements": [
{
"id": "7330012053861998592",
"linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329991434395160578?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7329991434395160578%2C7330012053861998592%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287330012053861998592%2Curn%3Ali%3AugcPost%3A7329991434395160578%29",
"commentary": "Exciting 🔥",
"createdAt": "2025-05-18T23:30:58.680Z",
"numComments": 0,
"postId": "7329991434395160578",
"actor": {
"id": "ACoAABLGFg4BRMcDx84MmyU8X-Jqcw9wKCA1QxU",
"name": "Harshavardhan G H",
"linkedinUrl": "https://www.linkedin.com/in/harshavardhangh",
"author": false,
"position": "Business Analyst | Data-Driven Decision Maker | 5+ Years of Experience in Municipal Data Systems & Public Sector Projects | Passionate About Driving Innovation in Local Governance | Always Exploring New Technologies",
"pictureUrl": "https://media.licdn.com/dms/image/v2/D5603AQF38AglH7bh-A/profile-displayphoto-shrink_800_800/profile-displayphoto-shrink_800_800/0/1730799919024?e=1753920000&v=beta&t=Jo-oVn--3ftKSEMtrITF0b3_UG97a0n401-ztV_9Gac",
"picture": {
"url": "https://media.licdn.com/dms/image/v2/D5603AQF38AglH7bh-A/profile-displayphoto-shrink_800_800/profile-displayphoto-shrink_800_800/0/1730799919024?e=1753920000&v=beta&t=Jo-oVn--3ftKSEMtrITF0b3_UG97a0n401-ztV_9Gac",
"width": 800,
"height": 800,
"expiresAt": 1753920000000
}
},
"createdAtTimestamp": 1747611058680,
"pinned": false,
"contributed": false,
"edited": false,
"numShares": null,
"numImpressions": null,
"reactionTypeCounts": [
{
"type": "LIKE",
"count": 1
}
]
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": "<string>",
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}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-comments?${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-comments?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-comments?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)
Authorizations
Query Parameters
URL of the LinkedIn post (required)
Sort comments by field. Supported values: 'relevance', 'date'
Page number for pagination. Default is 1
Required only if sortBy is 'relevance' and page > 1. Use this token from the previous page response.
⌘I

