Email finder API: find a work email from a name and domain
How to find work emails programmatically from a first name, last name and company domain, and how to run it across a whole list.
Dag Holmen · Updated · 4 min read
An email finder API takes a person's first name, last name and company domain and returns their work email. With B2Benrich it's one POST request: send first_name, last_name and domain, and you get back a status and, when there's a match, an email.
That's the easy part. Most of the work in finding emails programmatically is getting clean inputs, handling the rows that come back empty, and checking addresses before you send. This guide covers all three, with a script you can run on a whole list.
How an email finder API works
You give it three things:
- First name and last name of the person
- Company domain, like
acme.com, not the company name
It returns:
- status, which tells you whether an email was found
- email, the work address when there is one
The domain matters more than people expect. "Acme" could be a dozen companies. acme.com is one. If your list only has company names, resolve them to domains first (more on that below).
Find an email from a name and domain
curl --request POST \
--url https://api.b2benrich.com/v1/enrich/person/name-domain-to-email \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_API_KEY' \
--data '{
"first_name": "Maya",
"last_name": "Chen",
"domain": "acme.com"
}'
A match looks like this (fictional values):
{
"status": "found",
"email": "maya.chen@acme.com"
}
When there's no match, don't build logic on one exact status string. Treat "no email in the response" as not found, and store the status you got for debugging.
Get the inputs right
Most failed lookups are input problems, not data problems. Clean these before you call.
Domains. Lowercase them. Strip https://, http://, www. and anything after the first slash. https://www.Acme.com/about becomes acme.com. If the domain came from an email address, drop free providers like gmail.com, outlook.com and yahoo.com: you're looking for the employer's domain, not the mailbox host.
Company names instead of domains. Resolve them first. POST /v1/search/company-name looks companies up by name, exact or fuzzy, and the records carry a domain. Review fuzzy matches by hand for anything important, because similar names are common.
Names. Split full names into first and last. Remove titles and suffixes (Dr., Jr., PhD), emoji, and notes people add on LinkedIn, like "Maya Chen (she/her)". Keep accents and hyphens as written.
Duplicates. Dedupe on first name, last name and domain together before you call. The same person often appears on three lists.
Where the names come from
If you're building the list yourself, you can skip most of the cleanup. Person records from people search, company employee search and the prospecting API already include first_name, last_name and company_domain, ready to pass straight to the email finder. If you have LinkedIn URLs instead, the people enrichment API turns each one into a profile with the same three fields.
Find emails for a whole list
This Python script reads a CSV with first_name, last_name and domain columns, cleans and dedupes the rows, and writes a new CSV with status and email added.
import csv
import requests
URL = "https://api.b2benrich.com/v1/enrich/person/name-domain-to-email"
HEADERS = {"Content-Type": "application/json", "X-Api-Key": "YOUR_API_KEY"}
FREE = {"gmail.com", "googlemail.com", "outlook.com", "hotmail.com", "yahoo.com", "icloud.com"}
def clean_domain(value):
d = value.strip().lower()
for prefix in ("https://", "http://", "www."):
if d.startswith(prefix):
d = d[len(prefix):]
return d.split("/")[0]
seen, out = set(), []
with open("contacts.csv", newline="") as f:
for row in csv.DictReader(f):
first, last = row["first_name"].strip(), row["last_name"].strip()
domain = clean_domain(row["domain"])
key = (first.lower(), last.lower(), domain)
if not (first and last and domain) or domain in FREE or key in seen:
continue
seen.add(key)
res = requests.post(URL, headers=HEADERS, timeout=30,
json={"first_name": first, "last_name": last, "domain": domain})
body = res.json() if res.ok else {}
out.append({**row, "domain": domain,
"status": body.get("status", f"http_{res.status_code}"),
"email": body.get("email", "")})
with open("contacts_with_emails.csv", "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=list(out[0].keys()))
writer.writeheader()
writer.writerows(out)
It runs one request at a time to keep it readable. For big lists, add a small thread pool and a retry on server errors. There are no credits to watch: the plan is unlimited API usage for $500 a month, so a bulk email finder run on a long list costs the same as a short one.
Don't guess when nothing is found
When a lookup comes back empty, it's tempting to fill the gap with first.last@domain. Don't. Guessed addresses are where bounces come from, and bounces hurt the domain you send from. Leave the field blank, mark the row as not found, and try another route if the person matters: a different domain the company uses, or a different channel.
Verify before you send
A found email is a strong lead, not a delivery guarantee. People leave jobs, and some domains accept every address, so you can't tell from outside whether a given mailbox exists. Run found emails through an email verification API shortly before a send, and keep unverifiable addresses in their own segment.
Using it from other tools
The endpoint is plain REST, so you can call it from any language, script, workflow tool or AI agent that can make an HTTP request. If your lists live in Clay, the Clay HTTP API guide shows how to map first_name, last_name and domain columns to the request and pull email back into the table.
Frequently asked questions
- How do I find someone’s work email from their name and company?
- Send their first name, last name and company domain to an email finder API. With B2Benrich that’s POST /v1/enrich/person/name-domain-to-email, which returns a status and the email when it finds one. Use the domain, like acme.com, rather than the company name.
- Can I find emails in bulk?
- Yes. Loop over your list in a script or workflow tool and call the endpoint once per person. Clean and dedupe the names and domains first, record every result including misses, and verify the found emails before you send to them.
- What if I only have the company name, not the domain?
- Resolve the name to a domain first. B2Benrich’s company name search looks companies up by exact or fuzzy name and returns records that include the domain. Check fuzzy matches by hand, since many companies share similar names.
- Should I guess an email pattern when no email is found?
- No. Guessed addresses like first.last@domain often bounce, and bounces hurt your sending domain’s reputation. Leave the field blank, mark the contact as not found, and try another route if the person is important.
- Is an email from an email finder already verified?
- Treat it as a strong candidate, not a guarantee. People change jobs and some domains accept every address, so run found emails through an email verification check shortly before you send.
Related guides
- People enrichment API: from a LinkedIn URL to a full profileHow 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.
- Email and phone validation API: check contacts before you sendWhy you validate emails and phone numbers before outreach, what a validation check returns, and where to put it in your pipeline.
- Prospecting API: build lead lists from contact and company filtersCombine job, company and tech-stack filters in one query, count the matches before you pull, and page through the results into your own tools.