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({
  profileId: 'ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc', // Bill Gates profile 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 Profile ID

const params = new URLSearchParams({
  url: 'https://www.linkedin.com/in/williamhgates',
  apiKey: '<api-key>',
});

fetch(`https://api.harvest-api.com/linkedin/profile?${params.toString()}`)
  .then((res) => res.json())
  .then((data) => {
    console.log(`Bill Gates profile ID: ${data.id}`);
  });

Authorizations

X-API-Key
string
header
required

Query Parameters

Keywords to search for in posts

profileId
string

Filter posts by author's profile ID or IDs (comma-separated)

companyId
string

Filter posts by company ID or IDs (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

Response

200
application/json
Post search response
elements
object[]
pagination
object
status
string
error
string
query
object