LinkedIn Post
Company posts
LinkedIn Post
Company posts
Search LinkedIn posts by keywords, author, date range, and more.
GET
/
linkedin
/
post-search
curl --request GET \
--url https://api.harvest-api.com/linkedin/post-search \
--header 'X-API-Key: <api-key>'
{
"elements": [
{
"id": "<string>",
"content": "<string>",
"title": "<string>",
"subtitle": "<string>",
"link": "<string>",
"linkLabel": "<string>",
"description": "<string>",
"authorUniversalName": "<string>",
"authorPublicIdentifier": "<string>",
"authorType": "<string>",
"authorName": "<string>",
"authorLinkedinUrl": "<string>",
"authorPosition": "<string>",
"authorWebsite": "<string>",
"authorWebsiteLabel": "<string>",
"authorAvatar": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
},
"postedAgo": "<string>",
"postImage": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
},
"repostId": "<string>",
"repost": {},
"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
},
"status": "<string>",
"error": "<string>",
"query": {
"search": "<string>",
"profileId": "<string>",
"companyId": "<string>",
"postedLimit": "<string>",
"sortBy": "<string>",
"page": 123
}
}
const params = new URLSearchParams({
companyId: '1441', // Google company ID
postedLimit: 'month',
sortBy: 'date',
page: '1',
});
fetch(`https://api.harvest-api.com/linkedin/post-search?${params.toString()}`, {
headers: { 'X-API-Key': '<api-key>' },
})
.then((response) => response.json())
.then((data) => console.log(data));
How to get Company ID
const params = new URLSearchParams({
search: 'Google',
apiKey: '<api-key>',
});
fetch(`https://api.harvest-api.com/linkedin/company-search?${params.toString()}`)
.then((res) => res.json())
.then((data) => {
const companies = data.elements;
const firstMatchId = companies[0].id;
console.log(`LinkedIn ID for Google: ${firstMatchId}`);
});
Authorizations
Query Parameters
Keywords to search for in posts
Filter posts by author's profile ID or IDs (comma-separated)
Filter posts by company ID or IDs (comma-separated)
Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'
Sort by field. Supported values: 'relevance', 'date'
Page number for pagination
Response
200
application/json
Post search response
curl --request GET \
--url https://api.harvest-api.com/linkedin/post-search \
--header 'X-API-Key: <api-key>'
{
"elements": [
{
"id": "<string>",
"content": "<string>",
"title": "<string>",
"subtitle": "<string>",
"link": "<string>",
"linkLabel": "<string>",
"description": "<string>",
"authorUniversalName": "<string>",
"authorPublicIdentifier": "<string>",
"authorType": "<string>",
"authorName": "<string>",
"authorLinkedinUrl": "<string>",
"authorPosition": "<string>",
"authorWebsite": "<string>",
"authorWebsiteLabel": "<string>",
"authorAvatar": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
},
"postedAgo": "<string>",
"postImage": {
"url": "<string>",
"width": 123,
"height": 123,
"expiresAt": 123
},
"repostId": "<string>",
"repost": {},
"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
},
"status": "<string>",
"error": "<string>",
"query": {
"search": "<string>",
"profileId": "<string>",
"companyId": "<string>",
"postedLimit": "<string>",
"sortBy": "<string>",
"page": 123
}
}