Skip to main content
GET
/
linkedin
/
lead-search
Search LinkedIn leads
curl --request GET \
  --url https://api.harvest-api.com/linkedin/lead-search \
  --header 'X-API-Key: <api-key>'
{
  "elements": [
    {
      "linkedinUrl": "<string>",
      "id": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "openProfile": true,
      "premium": true,
      "location": {
        "linkedinText": "<string>"
      },
      "pictureUrl": "<string>",
      "currentPositions": [
        {
          "companyName": "<string>",
          "title": "<string>",
          "description": "<string>",
          "startedOn": {
            "month": "<string>",
            "year": 123
          },
          "companyId": "<string>",
          "companyLinkedinUrl": "<string>",
          "tenureAtPosition": {
            "numYears": "<string>",
            "numMonths": "<string>"
          },
          "tenureAtCompany": {
            "numYears": "<string>",
            "numMonths": "<string>"
          }
        }
      ]
    }
  ],
  "pagination": {
    "totalPages": 123,
    "totalElements": 123,
    "pageNumber": 123,
    "previousElements": 123,
    "pageSize": 123,
    "paginationToken": "<string>"
  },
  "status": "<string>",
  "error": "<string>"
}

Examples

const params = new URLSearchParams({
  page: '1',
  search: 'Machine Learning Engineer',
  currentCompany: 'https://www.linkedin.com/company/google',
  location: 'US',
  seniorityLevelIds: '120,210',
  profileLanguages: 'en',
  excludeSeniorityLevelIds: '220,300,310',
});
fetch(`https://api.harvest-api.com/linkedin/lead-search?${params.toString()}`, {
  headers: { 'X-API-Key': '<api-key>' },
})
  .then((response) => response.json())
  .then((data) => console.log(data));

Session ID

  • LinkedIn applies search personalization, so the results may vary based on resources used for scraping.
  • When iterating over multiple pages, different pages might be scraped by different resources, which can lead to inconsistent results.
To mitigate this, you can use the sessionId parameter to ensure that all pages are scraped by the same resource.

Authorizations

X-API-Key
string
header
required

Query Parameters

Search query. Fuzzy search, supports LinkedIn's search operators

currentCompanies
string

Filter by current company IDs or URLs. Comma-separated (max 50)

pastCompanies
string

Filter by past company IDs or URLs. Comma-separated (max 50)

locations
string

Filter by location text. Comma-separated (max 70)

geoIds
string

Filter by LinkedIn Geo ID. Comma-separated. Overrides location param. Use /linkedin/geo-id-search to find IDs

schools
string

Filter by school IDs or URLs. Comma-separated (max 50)

currentJobTitles
string

Filter by current job titles. Comma-separated (max 70)

pastJobTitles
string

Filter by past job titles. Comma-separated (max 70)

firstNames
string

Filter by first names. Comma-separated (max 70)

lastNames
string

Filter by last names. Comma-separated (max 70)

yearsAtCurrentCompanyIds
string
yearsOfExperienceIds
string
seniorityLevelIds
string
recentlyChangedJobs
boolean

Filter leads who recently changed jobs

profileLanguages
string
companyHeadcount
string
excludeLocations
string

Locations to exclude from search. Comma-separated (max 70)

excludeGeoIds
string

Geo IDs to exclude from search. Comma-separated (max 70)

excludeCurrentCompanies
string

Current companies to exclude. Comma-separated (max 50)

excludePastCompanies
string

Past companies to exclude. Comma-separated (max 50)

excludeSchools
string

Schools to exclude. Comma-separated (max 50)

excludeCurrentJobTitles
string

Current job titles to exclude. Comma-separated (max 70)

excludePastJobTitles
string

Past job titles to exclude. Comma-separated (max 70)

excludeIndustryIds
string

Industry IDs to exclude. Comma-separated (max 70)

excludeSeniorityLevelIds
string

Seniority level IDs to exclude. Comma-separated (max 20)

excludeFunctionIds
string

Function IDs to exclude. Comma-separated (max 30)

page
integer
default:1

Page number for pagination (clamped at 100)

usePrivatePool
string

Set to true to use your private pool of resources (if available)

Response

Lead search response

elements
object[]
pagination
object
status
string
error
string