GET
/
linkedin
/
company-posts
Get LinkedIn company posts
curl --request GET \
  --url https://api.harvest-api.com/linkedin/company-posts \
  --header 'X-API-Key: <api-key>'
{
  "elements": [
    {
      "id": "<string>",
      "content": "<string>",
      "linkedinUrl": "<string>",
      "author": {
        "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
        }
      },
      "postedAgo": "<string>",
      "postImages": [
        {
          "url": "<string>",
          "width": 123,
          "height": 123,
          "expiresAt": 123
        }
      ],
      "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
  }
}

Get posts from a LinkedIn company

const params = new URLSearchParams({
  company: 'https://www.linkedin.com/company/google',
  page: '1',
});
fetch(`https://api.harvest-api.com/linkedin/company-posts?${params.toString()}`, {
  headers: { 'X-API-Key': '<api-key>' },
})
  .then((response) => response.json())
  .then((data) => console.log(data));

Authorizations

X-API-Key
string
header
required

Query Parameters

company
string

Filter posts by this company URL

companyId
string

Filter posts by company ID. It's faster to search by ID

companyUniversalName
string

Filter posts by company universal name (last part in the URL)

postedLimit
string

Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. Since LinkedIn doesn't offer a way to filter by date, the filtering will be done on our side, due to that the pagination might have incorrect values, because pagination is returned by LinkedIn without applying the postedLimit filter

page
integer
default:1

Page number for pagination

paginationToken
string<nullable>

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

Response

200
application/json

Post search response

The response is of type object.