GET
/
linkedin
/
profile-posts
Get LinkedIn profile posts
curl --request GET \
  --url https://api.harvest-api.com/linkedin/profile-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 profile

const params = new URLSearchParams({
  profile: 'https://www.linkedin.com/in/williamhgates',
  page: '1',
});
fetch(`https://api.harvest-api.com/linkedin/profile-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

profile
string

Filter posts by author's profile URL

profileId
string

Filter posts by author's profile ID. It's faster to search by ID

profilePublicIdentifier
string

Filter posts by author's profile public identifier (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.