nvFetchPerson

This method allows you to retrieve basic information about a person from Sales Navigator.

typescript
try {
  const workflowId = await linkedapi.nvFetchPerson.execute({
    personHashedUrl: "https://www.linkedin.com/in/SInQBmjJ015eLr8"
  });
  
  const { data, errors } = await linkedapi.nvFetchPerson.result(workflowId);
  
  // The list of possible execution errors is below
  if (errors && errors.length > 0) {
    console.warn('Workflow completed with execution errors:');
    errors.forEach(error => {
      console.warn(` - Type: ${error.type}, Message: ${error.message}`);
    });
  }
  
  // The structure of the 'data' object is below
  if (data) {
    console.log('Person name:', data.name);
    console.log('Headline:', data.headline);
    console.log('Location:', data.location);
    console.log('Position:', data.position);
    console.log('Company:', data.companyName);
    console.log('Workflow completed successfully. Data:', data);
  }
} catch (e) {
  // A list of all critical errors can be found here:
  // https://linkedapi.io/sdks/handling-results-and-errors/#handling-critical-errors
  if (e instanceof LinkedApiError) {
    console.error(`Critical Error - Type: ${e.type}, Message: ${e.message}`);
  } else {
    console.error('An unexpected, non-API error occurred:', e);
  }
}

Params

  • personHashedUrlhashed LinkedIn URL of the person.

Data

  • name – full name of the person.
  • publicUrlpublic LinkedIn URL of the person.
  • hashedUrlhashed LinkedIn URL of the person.
  • headline – headline of the person.
  • location – free-form string indicating the person's location.
  • countryCode – two-character code of the person's country.
  • position – current job position of the person.
  • companyName – name of the person's current company.
  • companyHashedUrlhashed LinkedIn URL of the person's current company.

Errors

  • noSalesNavigator – your account does not have Sales Navigator subscription.
  • personNotFound – provided URL is not an existing LinkedIn person.