GET
/
linkedin
/
profile-search
Search LinkedIn profiles
curl --request GET \
  --url https://api.harvest-api.com/linkedin/profile-search \
  --header 'X-API-Key: <api-key>'
{
  "elements": [
    {
      "id": "<string>",
      "publicIdentifier": "<string>",
      "name": "<string>",
      "position": "<string>",
      "location": {
        "linkedinText": "<string>"
      },
      "linkedinUrl": "<string>",
      "photo": "<string>",
      "hidden": true
    }
  ],
  "pagination": {
    "totalPages": 123,
    "totalElements": 123,
    "pageNumber": 123,
    "previousElements": 123,
    "pageSize": 123,
    "paginationToken": "<string>"
  },
  "status": "<string>",
  "error": "<string>",
  "query": {
    "search": "<string>",
    "companyId": "<string>",
    "location": "<string>",
    "geoId": "<string>",
    "page": "<string>"
  }
}
This search can usually find profiles when searching by name.
When using other queries (for example job title) this is how search page looks like (search results are anonymized and displayed as “LinkedIn Member” without a profile link).
In comparison your personal LinkedIn account will find much more exposed profiles, due to your number of connections. Our scraper accounts does not have any connections, so the results are limited. As an alternative, you can pass you own account to the scraper or use our premium search.
const params = new URLSearchParams({
  search: 'Mark',
  currentCompany: 'https://www.linkedin.com/company/google',
  location: 'Australia',
  page: '1',
});
fetch(`https://api.harvest-api.com/linkedin/profile-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 as first match instead of New York; UK returns Ukraine instead of United Kingdom. It is based on LinkedIn autocomplete feature, you can try it in UI: https://www.linkedin.com/search/results/people/?geoUrn=%5B%22103644278%22%5D
To make sure the location is correct, you can look up LinkedIn GeoID for a text query. 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.id);

    // Search for profiles in New York
    const params = new URLSearchParams({
      geoId: data.id,
      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

Search profiles by name

currentCompany
string

Filter by company ID or Company URL. One value or multiple comma-separated

pastCompany
string

Filter by past company ID or Company URL. One value or multiple comma-separated

school
string

Filter by school ID or School URL. One value or multiple comma-separated

firstName
string

Filter by first name

lastName
string

Filter by last name

title
string

Filter by title

location
string

Filter by location text

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

industryId
string

Filter by industry ID. One value or multiple comma-separated

page
string

Page number, use for pagination

Response

200
application/json

Profile search response

The response is of type object.