GET
/
linkedin
/
company-search
Search LinkedIn companies
curl --request GET \
  --url https://api.harvest-api.com/linkedin/company-search \
  --header 'X-API-Key: <api-key>'
{
  "elements": [
    {
      "id": "<string>",
      "name": "<string>",
      "industries": "<string>",
      "location": {
        "linkedinText": "<string>"
      },
      "followers": "<string>",
      "summary": "<string>",
      "logo": "<string>",
      "linkedinUrl": "<string>",
      "universalName": "<string>"
    }
  ],
  "pagination": {
    "totalPages": 123,
    "totalElements": 123,
    "pageNumber": 123,
    "previousElements": 123,
    "pageSize": 123,
    "paginationToken": "<string>"
  },
  "status": "<string>",
  "error": "<string>",
  "query": {
    "search": "<string>",
    "location": "<string>",
    "geoId": "<string>",
    "companySize": "<string>"
  }
}
const params = new URLSearchParams({
  search: 'Google',
  location: 'Australia',
  companySize: '11-50,51-200,201-500',
  page: '1',
});
fetch(`https://api.harvest-api.com/linkedin/company-search?${params.toString()}`, {
  headers: { 'X-API-Key': '<api-key>' },
})
  .then((response) => response.json())
  .then((data) => console.log(data));

Search by LinkedIn GeoID

For most of the cases, when specifying full location name, the search by the location parameter works fine.
However sometimes search by location may not give you what you expect, as LinkedIn have some other suggested location for your text query. For example, NY returns New Zealand instead of New York; UK returns Ukraine instead of United Kingdom. The location search is based on LinkedIn autocomplete feature, you can try it on the website first. The scraper will use the first suggestion from the autocomplete popup when you type your location.
The same autocomplete is available via our API. You can look up a location and get LinkedIn GeoID to use for the API endpoint. The GeoID search is free, it will not count against your quota.
const apiKey = '<api-key>';

fetch(`https://api.harvest-api.com/linkedin/geo-id-search?search=New York`, {
  headers: { 'X-API-Key': apiKey },
})
  .then((response) => response.json())
  .then((data) => {
    console.log('All matches:', data.elements);
    console.log('Closest match GeoID:', data.entityId);

    // Search for profiles in New York
    const params = new URLSearchParams({
      geoId: data.entityId,
      apiKey,
    });
    fetch(`https://api.harvest-api.com/linkedin/profile-search?${params.toString()}`)
      .then((response) => response.json())
      .then((data) => console.log(data));
  });

Authorizations

X-API-Key
string
header
required

Query Parameters

Keywords to search for in company names.

location
string

Filter companies by location.

geoId
string

Filter by location as LinkedIn Geo ID. Overrides the location query param. Use the /linkedin/geo-id-search endpoint to find the Geo ID

companySize
string

Filter by company size. One value or multiple comma-separated. Supported values: '1-10', '11-50', '51-200', '201-500', '501-1000', '1001-5000', '5001-10000', '10001+'

page
integer
default:1

Page number for pagination.

Response

A list of companies matching the search criteria.

elements
object[]
pagination
object
status
string

Status of the response.

error
string

Error message, if any.

query
object