curl --request GET \
--url https://api.harvestapi.io/linkedin/post-search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/post-search"
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-search', 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-search",
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-search"
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-search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/post-search")
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": "<string>",
"content": "<string>",
"linkedinUrl": "<string>",
"author": {
"id": "<string>",
"urn": "<string>",
"publicIdentifier": "<string>",
"universalName": "<string>",
"name": "<string>",
"linkedinUrl": "<string>",
"type": true,
"info": true,
"website": true,
"websiteLabel": true,
"avatar": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
}
},
"postedAt": {
"timestamp": 123,
"date": "<string>",
"postedAgoShort": "<string>",
"postedAgoText": "<string>"
},
"postImages": [
{
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
}
],
"postVideo": {
"thumbnailUrl": "<string>",
"videoUrl": "<string>"
},
"article": {
"title": "<string>",
"subtitle": "<string>",
"link": "<string>",
"linkLabel": "<string>",
"description": "<string>",
"image": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
}
},
"repostId": "<string>",
"repost": {},
"repostedBy": {
"publicIdentifier": "<string>",
"name": "<string>",
"linkedinUrl": "<string>"
},
"newsletterUrl": "<string>",
"newsletterTitle": "<string>",
"socialContent": {
"hideCommentsCount": true,
"hideReactionsCount": true,
"hideSocialActivityCounts": true,
"hideShareAction": true,
"hideSendAction": true,
"hideRepostsCount": true,
"hideViewsCount": true,
"hideReactAction": true,
"hideCommentAction": true,
"shareUrl": "<string>",
"showContributionExperience": true,
"showSocialDetail": true
},
"engagement": {
"likes": 123,
"comments": 123,
"shares": 123,
"reactions": [
{
"type": "<string>",
"count": 123
}
]
}
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": "<string>",
"error": "<string>",
"query": {
"search": "<string>",
"profileId": "<string>",
"companyId": "<string>",
"postedLimit": "<string>",
"sortBy": "<string>",
"page": 123
}
}{
"error": 123,
"message": "<string>"
}Group posts
Search LinkedIn posts by keywords, author, date range, and more.
curl --request GET \
--url https://api.harvestapi.io/linkedin/post-search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/post-search"
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-search', 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-search",
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-search"
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-search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/post-search")
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": "<string>",
"content": "<string>",
"linkedinUrl": "<string>",
"author": {
"id": "<string>",
"urn": "<string>",
"publicIdentifier": "<string>",
"universalName": "<string>",
"name": "<string>",
"linkedinUrl": "<string>",
"type": true,
"info": true,
"website": true,
"websiteLabel": true,
"avatar": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
}
},
"postedAt": {
"timestamp": 123,
"date": "<string>",
"postedAgoShort": "<string>",
"postedAgoText": "<string>"
},
"postImages": [
{
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
}
],
"postVideo": {
"thumbnailUrl": "<string>",
"videoUrl": "<string>"
},
"article": {
"title": "<string>",
"subtitle": "<string>",
"link": "<string>",
"linkLabel": "<string>",
"description": "<string>",
"image": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
}
},
"repostId": "<string>",
"repost": {},
"repostedBy": {
"publicIdentifier": "<string>",
"name": "<string>",
"linkedinUrl": "<string>"
},
"newsletterUrl": "<string>",
"newsletterTitle": "<string>",
"socialContent": {
"hideCommentsCount": true,
"hideReactionsCount": true,
"hideSocialActivityCounts": true,
"hideShareAction": true,
"hideSendAction": true,
"hideRepostsCount": true,
"hideViewsCount": true,
"hideReactAction": true,
"hideCommentAction": true,
"shareUrl": "<string>",
"showContributionExperience": true,
"showSocialDetail": true
},
"engagement": {
"likes": 123,
"comments": 123,
"shares": 123,
"reactions": [
{
"type": "<string>",
"count": 123
}
]
}
}
],
"pagination": {
"totalPages": 123,
"totalElements": 123,
"pageNumber": 123,
"previousElements": 123,
"pageSize": 123,
"paginationToken": "<string>"
},
"status": "<string>",
"error": "<string>",
"query": {
"search": "<string>",
"profileId": "<string>",
"companyId": "<string>",
"postedLimit": "<string>",
"sortBy": "<string>",
"page": 123
}
}{
"error": 123,
"message": "<string>"
}const params = new URLSearchParams({
group: 'https://www.linkedin.com/groups/1898033/',
// group: '1898033', // Or group ID alternatively
page: '1',
});
fetch(`https://api.harvestapi.io/linkedin/post-search?${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-search?group=1898033&page=1 \
--header 'X-API-Key: <api-key>'
import requests
url = "https://api.harvestapi.io/linkedin/post-search?group=1898033&page=1"
headers = {"X-API-Key": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.text)
Authorizations
Query Parameters
Keywords to search for in posts
Filter posts by author's profile URL (comma-separated). Note: LinkedIn returns fewer results per profile when using post search. To extract all posts by a profile, use the /linkedin/profile-posts endpoint
Filter posts by author's profile ID or IDs (comma-separated). It's faster to search by ID. Note: LinkedIn returns fewer results per profile when using post search. To extract all posts by a profile, use the /linkedin/profile-posts endpoint
Filter posts by this company URL or URLs (comma-separated). Note: LinkedIn returns fewer results per company when using post search. To extract all posts by a company, use the /linkedin/company-posts endpoint
Filter posts by company ID or IDs (comma-separated). It's faster to search by ID. Note: LinkedIn returns fewer results per company when using post search. To extract all posts by a company, use the /linkedin/company-posts endpoint
List of LinkedIn companies where authors of posts work (comma-separated). It supports company URLs and IDs.
List of LinkedIn industry IDs of authors' companies (comma-separated). It supports industry IDs. Full list of industry IDs: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng.csv
Filter posts mentioning this LinkedIn profile URL or ID (comma-separated). It supports profile URLs and IDs.
Filter posts mentioning this LinkedIn company URL or ID (comma-separated). It supports company URLs and IDs.
Filter by content type. Supported values: 'videos', 'images', 'live_videos', 'documents', 'collaborative_articles', 'jobs'
Filter by keywords in authors' profiles
Group LinkedIn URL or Group ID
Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. This parameter will be sent to LinkedIn, the filtering will be done on their side
Post-Filter posts by maximum posted date. Supported values: '1h', '24h', 'week','month', '3months', '6months', 'year'. This parameter will be applied after receiving results from LinkedIn, the filtering will be done on our side
Sort by field. Supported values: 'relevance', 'date'
Page number for pagination
Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn't apply for all queries, usually profile posts return this token

