Perform users search

Learn how to search for users on LinkedIn using Unipile API.

Whether you are using LinkedIn Classic, Recruiter, or Sales Navigator, Unipile offers two methods tu run a search :

  • With filters : you provide any combination of parameters directly in the method body. E.g. : location, company, industry, etc.
  • From URL : you provide the URL of a LinkedIn native search so the filters can be automatically infered.

📘

Note about Search Parameters

Many of the search filters on LinkedIn work with IDs that reference parameters, rather than the parameters themselves.

For example, in the location filter, you cannot directly insert San Francisco, but instead you should use the corresponding city ID.

Each LinkedIn product has an associated endpoint on Unipile to help you find the IDs of the parameters you need:

📘

Note about pagination

Pagination on the endpoints in this guide uses exclusively the offset parameter.


Classic Search

In LinkedIn Classic lingo, users are referred to as people.

Search with filters

To get a list of people search results with filters, use the Perform People Search endpoint with a parameters body.

const { data } = await linkedInApi.performClassicPeopleSearch({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    keywords: 'Product manager',
    location: ["01234", "56789"]
  },
});
people = linked_in_api.perform_classic_people_search(
    "acc_123456789",
    perform_classic_people_search_request={
        "keywords": "Product manager",
        "location": ["01234", "56789"],
    },
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/linkedin/search/people \
     --header 'accept: application/json'  
     --data '
{
   "keywords": "Product manager",
   "location": ["01234", "56789"]
}'

Search from URL

For a URL to be considered valid in the context of a people search, it must match the following pattern : https://www.linkedin.com/search/results/people.

To get a list of people search results out of a URL, use Perform Classic Search from URL.

const { data } = await linkedInApi.performClassicSearchFromUrl({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    url: "https://www.linkedin.com/search/results/people?[...]",
  },
});
people = linked_in_api.perform_classic_search_from_url(
    "acc_123456789",
    {"url": "https://www.linkedin.com/search/results/people?[...]"},
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/linkedin/search \
     --header 'accept: application/json'  
     --data '
{
   "url": "https://www.linkedin.com/search/results/people?[...]"
}'

Recruiter Search

In LinkedIn Recruiter lingo, users are referred to as candidates.

📘

Notes about search contexts

There are multiple contexts on Recruiter where you can run searches, depending on whether the candidates are already part of a Project (saved, contacted, applied...) or not.

This guide will cover 2 of these contexts :

  • Search from General engine (out of a Project)
  • Search from the Recruiter search channel of a Project's Talent pool

Search with filters

To get a list of candidates search results with filters, use the Perform Candidates Search endpoint with a parameters body.

const { data } = await linkedInApi.performRecruiterPeopleSearch({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    keywords: 'Developer',
    skills: [
     { name: 'Typescript' },
     { name: 'Node.js' },
    ]
  },
});
candidates = linked_in_api.perform_recruiter_people_search(
    "acc_123456789",
    perform_recruiter_people_search_request={
        "keywords": "Developer",
        "skills": [{"name": "Typescript"}, {"name": "Node.js"}],
    },
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/linkedin/recruiter/search/candidates \
     --header 'accept: application/json'  
     --data '
{
   "keywords": "Developer",
   "skills": [
      { "name": "Typescript" },
      { "name": "Node.js" }
   ]
}'

Now if you need to run the search from the Recruiter search channel of a Project's Talent pool, you will have to retrieve the ID of the relative project first. Use the List Recruiter Hiring Projects endpoint to list all the projects available on your account.

Then to get a list of candidates search results, use the Perform Recruiter People Search From Talent Pool endpoint, specifying the ID of the project and a parameters body.

const { data } = await linkedInApi.performRecruiterPeopleSearchFromTalentPool({
  path: {
    account_id: "acc_123456789",
    project_id: "project_id",
  },
  body: {
    keywords: 'Developer',
    skills: [
     { name: 'Typescript' },
     { name: 'Node.js' },
    ]
  },
});
candidates = linked_in_api.perform_recruiter_people_search_from_talent_pool(
    "project_id",
    "acc_123456789",
    perform_recruiter_people_search_from_talent_pool_request={
        "keywords": "Developer",
        "skills": [{"name": "Typescript"}, {"name": "Node.js"}],
    },
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/linkedin/recruiter/projects/project_id/talent-pool/search \
     --header 'accept: application/json'  
     --data '
{
   "keywords": "Developer",
   "skills": [
      { "name": "Typescript" },
      { "name": "Node.js" }
   ]
}'

Search from URL

For a URL to be considered valid in the context of a candidates search, it must match one of the following patterns:

  • https://www.linkedin.com/talent/search : from general search engine.
  • https://www.linkedin.com/talent/hire/project_id/discover/recruiterSearch : from Recruiter search channel of a Project's Talent pool.
  • https://www.linkedin.com/talent/hire/project_id/discover/applicants : from Applicants channel of a Project's Talent pool.
  • https://www.linkedin.com/talent/hire/project_id/manage/stage_id : from a given Stage of a Project's Pipeline.

To get a list of candidates search results out of a URL, use Perform Recruiter Search from URL.

const { data } = await linkedInApi.performRecruiterSearchFromUrl({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    url: "https://www.linkedin.com/talent/search?[...]",
  },
});
candidates = linked_in_api.perform_recruiter_search_from_url(
    "acc_123456789",
    {"url": "https://www.linkedin.com/talent/search?[...]"},
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/linkedin/recruiter/search \
     --header 'accept: application/json'  
     --data '
{
   "url": "https://www.linkedin.com/talent/search?[...]"
}'

Sales Navigator Search

In LinkedIn Sales Navigator lingo, users are referred to as leads.

Search with filters

To get a list of leads search results with filters, use the Perform Leads Search endpoint with a parameters body.

const { data } = await linkedInApi.performSalesPeopleSearch({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    keywords: 'CEO',
    seniority: {
     include: ['OWNER/PARTNER', 'DIRECTOR']
    }
  },
});
leads = linked_in_api.perform_sales_people_search(
    "acc_123456789",
    perform_sales_people_search_request={
        "keywords": "CEO",
        "seniority": {"include": ["OWNER/PARTNER", "DIRECTOR"]},
    },
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/linkedin/sales-navigator/search/leads \
     --header 'accept: application/json'  
     --data '
{
   "keywords": "CEO",
   "seniority": {
      "include": ["OWNER/PARTNER", "DIRECTOR"]
   }
}'

Search from URL

For a URL to be considered valid in the context of a leads search, it must match the following pattern : https://www.linkedin.com/sales/search/people.

To get a list of leads search results out of a URL, use Perform Sales Navigator Search from URL.

const { data } = await linkedInApi.performSalesSearchFromUrl({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    url: "https://www.linkedin.com/sales/search/people?[...]",
  },
});
leads = linked_in_api.perform_sales_search_from_url(
    "acc_123456789",
    {"url": "https://www.linkedin.com/sales/search/people?[...]"},
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/linkedin/sales-navigator/search \
     --header 'accept: application/json'  
     --data '
{
   "url": "https://www.linkedin.com/sales/search/people?[...]"
}'