Skip to content
B2BenrichA ContactLevel company

People enrichment API: from a LinkedIn URL to a full profile

How a people enrichment API works, which fields come back, and how to enrich contacts from a LinkedIn URL, a name and domain or an ID.

Dag Holmen · Updated · 4 min read

View as Markdown

A people enrichment API takes something you know about a person and returns the rest of their professional profile. With B2Benrich, the best input is a LinkedIn profile URL. Send it to one endpoint and you get back the person's name, current job title, company, company domain and location, plus the company's industry, size and revenue.

This guide covers the ways to look a person up, the fields that come back, how to add a work email, and how to run it on a whole list.

Ways to look up a person

You haveEndpointYou get
A LinkedIn profile URLPOST /v1/enrich/person/linkedin-to-personThe person's profile
First name, last name, company domainPOST /v1/search/first-last-domainThe matching contact record
First name, last name, company domainPOST /v1/enrich/person/name-domain-to-emailA work email and a status
A B2Benrich person IDPOST /v1/enrich/person/get-by-idThe person's profile

Use the LinkedIn URL when you have it. It points at one person, so there's no question about which Maya Chen you meant. Name plus domain is the fallback, and the right choice when your list came from an event, a webinar or a spreadsheet with no URLs. The ID lookup is for people you've already enriched once: store the ID the first time and use it for later refreshes.

Enrich a person from a LinkedIn URL

curl --request POST \
  --url https://api.b2benrich.com/v1/enrich/person/linkedin-to-person \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --data '{ "input": "https://www.linkedin.com/in/mayachen" }'

The response is the person's profile. Trimmed, with fictional values:

{
  "id": "p_123456",
  "full_name": "Maya Chen",
  "first_name": "Maya",
  "last_name": "Chen",
  "linkedin_url": "https://www.linkedin.com/in/mayachen",
  "job_title": "VP Marketing",
  "company_name": "Acme",
  "company_domain": "acme.com",
  "company_id": "123456",
  "industry": "Software Development",
  "company_size": "201-500",
  "city": "Austin",
  "state_name": "Texas",
  "country_name": "United States"
}

The fields you get back

Person records in B2Benrich carry these fields:

  • Who: id, full_name, first_name, last_name, linkedin_url, profile_pic
  • Role: job_title
  • Company: company_name, company_domain, company_linkedin_url, company_id, industry, company_size, company_revenue
  • Location: city, state_code, state_name, country_code, country_name, country_region

Two of these are worth wiring up straight away. company_id lets you pull the full company record from the company enrichment API without matching on a name. company_domain is the input you need to find a work email.

Add a work email

To get an email, pass the profile's first name, last name and company domain to the email finder endpoint. It returns a status and, when it finds one, an email.

const BASE = 'https://api.b2benrich.com';
const headers = { 'Content-Type': 'application/json', 'X-Api-Key': process.env.B2BENRICH_KEY };

async function post(path, body) {
  const res = await fetch(BASE + path, { method: 'POST', headers, body: JSON.stringify(body) });
  if (!res.ok) throw new Error(`${path} returned ${res.status}`);
  return res.json();
}

const person = await post('/v1/enrich/person/linkedin-to-person', { input: 'https://www.linkedin.com/in/mayachen' });

const found = await post('/v1/enrich/person/name-domain-to-email', {
  first_name: person.first_name,
  last_name: person.last_name,
  domain: person.company_domain
});

console.log(found.status, found.email ?? '(no email)');

The email finder API guide covers input cleanup and what to do when no email comes back.

Run a whole list

For a list, keep concurrency modest, retry on server errors, and record every result, including misses. This loop runs five lookups at a time:

function normalizeLinkedIn(url) {
  const u = new URL(url.trim().startsWith('http') ? url.trim() : 'https://' + url.trim());
  const slug = u.pathname.split('/').filter(Boolean)[1]; // /in/<slug>/
  return slug ? `https://www.linkedin.com/in/${slug.toLowerCase()}` : null;
}

async function enrichAll(urls, concurrency = 5) {
  const queue = [...new Set(urls.map(normalizeLinkedIn).filter(Boolean))];
  const results = [];
  async function worker() {
    while (queue.length) {
      const input = queue.shift();
      try {
        const profile = await post('/v1/enrich/person/linkedin-to-person', { input });
        results.push({ input, ok: true, profile, enriched_at: new Date().toISOString() });
      } catch (err) {
        results.push({ input, ok: false, error: String(err), enriched_at: new Date().toISOString() });
      }
    }
  }
  await Promise.all(Array.from({ length: concurrency }, worker));
  return results;
}

Usage is unlimited on the one $500-a-month plan, with no credits, so re-running a list after you fix the inputs doesn't cost anything extra.

Pitfalls

  • Messy LinkedIn URLs. The same person shows up as linkedin.com/in/mayachen/, https://www.linkedin.com/in/MayaChen?trk=... and regional subdomains. Normalize to one form before you call and before you dedupe. Sales Navigator lead links aren't public profile URLs, so convert or drop them.
  • Not-found results. Some lookups won't match. Store the miss with a date, then try the name-and-domain route, rather than calling the same URL again tomorrow.
  • Job changes. If the company_domain that comes back differs from the one in your CRM, the person has probably moved. Don't silently overwrite the account link. Flag it, update the contact, and decide whether to follow them to the new company. CRM data enrichment covers rules for writing back safely.
  • Duplicates after enrichment. Two URL variants can resolve to the same person. Dedupe on the returned id, not only on the input.

When search is the better tool

Enrichment needs a person to start from. If you don't have one yet, if you need "every marketing leader at Acme" or "VPs of Sales in Texas," start with people search. Search returns the same person record fields, so you can enrich or find emails for the results with the same code.

Frequently asked questions

What is a people enrichment API?
An API that takes an identifier for a person, such as a LinkedIn profile URL or a name and company domain, and returns their professional profile as JSON: name, job title, company, company domain, location and company details like industry and size.
Can I get a work email from a LinkedIn URL?
Yes, in two calls. Enrich the LinkedIn URL to get the person’s first name, last name and company domain, then send those three fields to the name-domain-to-email endpoint, which returns a status and the email when it finds one.
What’s the difference between people enrichment and people search?
Enrichment starts from a person you already know and fills in their profile. Search starts from filters like job title, company and location and returns people you didn’t have yet. Most lists use search first, then enrichment and email lookup on the results.
What happens when a person isn’t found?
You get no profile back for that input. Record the miss with a date, check the input for typos or a malformed URL, and try another identifier, such as first name, last name and company domain, before giving up on the record.
Is contact enrichment the same as lead enrichment?
Yes, it’s the same process. Lead enrichment usually refers to new inbound leads, and contact enrichment to keeping existing CRM contacts current. Both call the same people enrichment endpoints.

Get your API key.

Sign up, make your first call and start building your lists.

We’ll email you a link to log in. · Read the docs