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>",
      "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
  }
}

Search “Software” posts

const params = new URLSearchParams({
  search: 'Software',
  postedLimit: '24h',
  sortBy: 'relevance',
  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));

Search posts from all Google employees

const params = new URLSearchParams({
  authorsCompany: 'https://www.linkedin.com/company/google',
});
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));

Authorizations

X-API-Key
string
header
required

Query Parameters

Keywords to search for in posts

profile
string

Filter posts by author's profile URL (comma-separated)

profileId
string

Filter posts by author's profile ID or IDs (comma-separated). It's faster to search by ID

company
string

Filter posts by this company URL or URLs (comma-separated)

companyId
string

Filter posts by company ID or IDs (comma-separated). It's faster to search by ID

authorsCompany
string

List of LinkedIn companies where authors of posts work (comma-separated)

authorsCompanyId
string

List of LinkedIn company IDs where authors of posts work (comma-separated)

postedLimit
string

Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'

sortBy
string

Sort by field. Supported values: 'relevance', 'date'

page
integer
default:1

Page number for pagination

paginationToken
string

Required if it was returned by the first 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.