curl --request GET \
--url https://api.harvestapi.io/linkedin/account-search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/account-search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.harvestapi.io/linkedin/account-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvestapi.io/linkedin/account-search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvestapi.io/linkedin/account-search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvestapi.io/linkedin/account-search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/account-search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"elements": [
{
"id": "1035",
"name": "Microsoft",
"linkedinUrl": "https://www.linkedin.com/company/1035",
"description": "Every company has a mission. What's ours? To empower every person and every organization to achieve more.",
"industry": "Software Development",
"employeeCountRange": "10001+",
"employeeDisplayCount": "220K+",
"logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQH32RJQCl3dDQ/company-logo_400_400/B56ZYQ0mrGGoAc-/0/1744038948046/microsoft_logo?e=1793836800&v=beta&t=JH7PTbL3UCVJmkaiI6Z2aUeXHDoVPM_TzQRclPPsptI",
"highlights": [
{
"id": "AIQ_STRATEGIC_PRIORITIES",
"label": "Expansion of Cloud Services",
"header": "Expansion of Cloud Services",
"message": null
},
{
"id": "HIRING_ON_LINKEDIN",
"label": "Hiring on Linkedin",
"header": "Hiring on Linkedin",
"message": "Microsoft is actively hiring on LinkedIn. This is a sign they may be increasing their headcount."
},
{
"id": "SENIOR_LEADERSHIP_CHANGE",
"label": "21 senior leadership hires",
"header": "Senior leadership hires in the last 90 days",
"message": "Microsoft’s senior leadership has recently changed. This can signal an openness to explore new products or services."
}
]
},
{
"id": "95716738",
"name": "Microsoft Intune",
"linkedinUrl": "https://www.linkedin.com/company/95716738",
"description": "Microsoft Intune empowers your organization to simplify endpoint management, help protect a hybrid workforce, and power better user experiences.",
"industry": "IT Services and IT Consulting",
"employeeCountRange": "10001+",
"employeeDisplayCount": "989",
"logoUrl": "https://media.licdn.com/dms/image/v2/D4D0BAQGLOoNygVSSeg/company-logo_400_400/B4DZaCFLXBG8Ac-/0/1745939117800/microsoft_intune_product_logo?e=1793836800&v=beta&t=dMlG_JGIxIfrMOm4iFoJulTHXJYuFh-ouJm2ayOBCec",
"highlights": []
}
],
"pagination": {
"totalElements": 98574,
"totalPages": 100,
"pageNumber": 1,
"previousElements": 0,
"pageSize": 25
},
"status": 200
}{
"error": 123,
"message": "<string>"
}Search Accounts
Search LinkedIn companies by advanced filters (headcount and its growth, revenue, department headcount, hiring, recent activities, Fortune lists) with inclusion and exclusion criteria
curl --request GET \
--url https://api.harvestapi.io/linkedin/account-search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.harvestapi.io/linkedin/account-search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.harvestapi.io/linkedin/account-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.harvestapi.io/linkedin/account-search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.harvestapi.io/linkedin/account-search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.harvestapi.io/linkedin/account-search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvestapi.io/linkedin/account-search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"elements": [
{
"id": "1035",
"name": "Microsoft",
"linkedinUrl": "https://www.linkedin.com/company/1035",
"description": "Every company has a mission. What's ours? To empower every person and every organization to achieve more.",
"industry": "Software Development",
"employeeCountRange": "10001+",
"employeeDisplayCount": "220K+",
"logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQH32RJQCl3dDQ/company-logo_400_400/B56ZYQ0mrGGoAc-/0/1744038948046/microsoft_logo?e=1793836800&v=beta&t=JH7PTbL3UCVJmkaiI6Z2aUeXHDoVPM_TzQRclPPsptI",
"highlights": [
{
"id": "AIQ_STRATEGIC_PRIORITIES",
"label": "Expansion of Cloud Services",
"header": "Expansion of Cloud Services",
"message": null
},
{
"id": "HIRING_ON_LINKEDIN",
"label": "Hiring on Linkedin",
"header": "Hiring on Linkedin",
"message": "Microsoft is actively hiring on LinkedIn. This is a sign they may be increasing their headcount."
},
{
"id": "SENIOR_LEADERSHIP_CHANGE",
"label": "21 senior leadership hires",
"header": "Senior leadership hires in the last 90 days",
"message": "Microsoft’s senior leadership has recently changed. This can signal an openness to explore new products or services."
}
]
},
{
"id": "95716738",
"name": "Microsoft Intune",
"linkedinUrl": "https://www.linkedin.com/company/95716738",
"description": "Microsoft Intune empowers your organization to simplify endpoint management, help protect a hybrid workforce, and power better user experiences.",
"industry": "IT Services and IT Consulting",
"employeeCountRange": "10001+",
"employeeDisplayCount": "989",
"logoUrl": "https://media.licdn.com/dms/image/v2/D4D0BAQGLOoNygVSSeg/company-logo_400_400/B4DZaCFLXBG8Ac-/0/1745939117800/microsoft_intune_product_logo?e=1793836800&v=beta&t=dMlG_JGIxIfrMOm4iFoJulTHXJYuFh-ouJm2ayOBCec",
"highlights": []
}
],
"pagination": {
"totalElements": 98574,
"totalPages": 100,
"pageNumber": 1,
"previousElements": 0,
"pageSize": 25
},
"status": 200
}{
"error": 123,
"message": "<string>"
}- Search LinkedIn companies by filters the company search doesn’t have: headcount growth, annual revenue, number of followers, department headcount and its growth, hiring on LinkedIn, senior leadership changes, funding events and Fortune 500 rank.
- Every result has the company ID: get its full profile with Get Company or in-depth insights with Account Insights.
- 25 results per page, up to 100 pages.
Examples
const params = new URLSearchParams({
page: '1',
search: 'software',
headquarterLocations: 'United States',
companyHeadcount: '51-200,201-500',
annualRevenue: '10-100;USD',
departmentHeadcount: '10-100;Engineering',
jobOpportunities: 'HIRING_ON_LINKEDIN',
excludeIndustryIds: '6',
});
fetch(`https://api.harvestapi.io/linkedin/account-search?${params.toString()}`, {
headers: { 'X-API-Key': '<api-key>' },
})
.then((response) => response.json())
.then((data) => console.log(data));
Session ID
LinkedIn personalizes search results, so different pages of the same search can come from different resources and be inconsistent. Pass the samesessionId with every page to keep them on one resource: see Session ID in the lead search for how it works.Query Parameters
Filter by industry IDs. Comma-separated (max 70). Full list: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng_with_header.csv
Filter by the headcount of a department, as min-max;department. Example: 10-100;Engineering. Departments: Accounting, Administrative, Arts and Design, Business Development, Community and Social Services, Consulting, Education, Engineering, Entrepreneurship, Finance, Healthcare Services, Human Resources, Information Technology, Legal, Marketing, Media and Communication, Military and Protective Services, Operations, Product Management, Program and Project Management, Purchasing, Quality Assurance, Real Estate, Research, Sales, Support
Session ID to use for the search. See https://docs.harvestapi.io/linkedin-api-reference/leads/search-leads#session-id for details.

