# Company enrichment API: firmographics from a domain

> Turn a domain, LinkedIn URL or LinkedIn ID into a company record: industry, size, revenue range, location and tech stack, over one API call.

Source: https://www.b2benrich.com/guides/company-enrichment-api  
Author: Dag Holmen, B2Benrich · Updated 2026-10-28

A company enrichment API turns a company identifier into a company record. Send B2Benrich a domain like `acme.com` and you get back the company's name, description, industry, headquarters location, employee range, revenue range and LinkedIn URL in one call.

Those fields are firmographics, the company-level facts you route, segment and score on. This guide covers which input to use, what comes back, how to clean domains so lookups match, and how to enrich a full account list.

## What company enrichment returns

Company records in B2Benrich carry these fields:

| Field | What it is |
|---|---|
| `id` | The B2Benrich company ID, for later lookups |
| `name` | Company name |
| `description` | Short description of what the company does |
| `domain` | Primary website domain |
| `industry` | Industry classification |
| `hq_city`, `hq_state`, `hq_country` | Headquarters location |
| `employees_range` | Headcount band, like 201-500 |
| `revenue_range` | Revenue band |
| `linkedin_url` | LinkedIn company page |

Ranges are bands, not exact numbers. If your CRM has a numeric "number of employees" field, store the band in its own text field instead of forcing a guess into a number.

## Pick the right input

| You have | Endpoint |
|---|---|
| A website domain | `POST /v1/enrich/companies/domain-to-company` |
| A LinkedIn company URL | `POST /v1/enrich/companies/linkedin-to-company` |
| A LinkedIn numeric company ID | `POST /v1/enrich/companies/linkedin-id-to-company` |
| A B2Benrich company ID | `POST /v1/enrich/companies/get-by-id` |

Domain is the usual starting point, because it's what you have from sign-ups, form fills, email addresses and CRM accounts. LinkedIn URLs and IDs are useful when your data came from LinkedIn exports or ad platforms. The B2Benrich ID is for companies you've already enriched: person records include a `company_id` too, so you can go from a contact straight to the full company record without matching on a name.

## Enrich a company from its domain

```bash
curl --request POST \
  --url https://api.b2benrich.com/v1/enrich/companies/domain-to-company \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --data '{ "input": "acme.com" }'
```

The response wraps the record with a status and the company ID. Trimmed, with fictional values:

```json
{
  "status": "found",
  "company_id": "123456",
  "data": {
    "name": "Acme",
    "domain": "acme.com",
    "industry": "Software Development",
    "hq_city": "Austin",
    "hq_state": "Texas",
    "hq_country": "United States",
    "employees_range": "201-500",
    "revenue_range": "$25M-$50M",
    "linkedin_url": "https://www.linkedin.com/company/acme"
  }
}
```

The LinkedIn endpoints take the same `input` body, with the company URL or ID instead of a domain.

## Clean domains before you call

Most missed lookups come from the input, not the data.

- **Strip the URL down.** Lowercase, then remove `https://`, `http://`, `www.` and any path. `https://www.Acme.com/pricing?ref=g2` becomes `acme.com`.
- **Skip free email domains.** If you derive the domain from an email address, gmail.com, outlook.com and yahoo.com aren't employers. Drop those rows or enrich them another way.
- **Watch regional and product domains.** A company may use `acme.co.uk` for one market or a separate domain for a product. Enrich what you have, then compare the returned `domain` to your input and keep both.
- **Dedupe first.** Ten contacts at Acme are one company lookup, not ten.

## Domain vs name matching

Matching on a domain is precise: one domain, one company. Matching on a name is not. "Acme" might be a software company in Austin, a law firm in Leeds and a dozen others. If you only have names, use `POST /v1/search/company-name` (exact or fuzzy), pick the right result, and then enrich by domain or ID. For fuzzy matches on accounts that matter, check the description and location before you trust the match.

## Tech stack

Tech stack lives on the search side. The prospector search takes a `technologies` company filter, and the filter values cover categories like CRM, marketing automation, analytics, CMS, cloud provider, email hosting, security, e-commerce and ERP. The [technographic data guide](https://www.b2benrich.com/guides/technographic-data) shows how to build a list of companies that use, or don't use, a given tool.

## Enrich an account list

This Node script dedupes domains, enriches each one and keeps the misses so you can review them:

```js
const BASE = 'https://api.b2benrich.com';
const FREE = new Set(['gmail.com', 'outlook.com', 'hotmail.com', 'yahoo.com', 'icloud.com']);

const cleanDomain = (v) =>
  v.trim().toLowerCase().replace(/^https?:\/\//, '').replace(/^www\./, '').split(/[/?#]/)[0];

async function enrichCompanies(rawDomains) {
  const domains = [...new Set(rawDomains.map(cleanDomain))].filter((d) => d && !FREE.has(d));
  const found = [], missed = [];
  for (const domain of domains) {
    const res = await fetch(`${BASE}/v1/enrich/companies/domain-to-company`, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json', 'X-Api-Key': process.env.B2BENRICH_KEY },
      body: JSON.stringify({ input: domain })
    });
    const body = res.ok ? await res.json() : null;
    if (body?.data) found.push({ domain, company_id: body.company_id, ...body.data });
    else missed.push({ domain, status: body?.status ?? `http_${res.status}` });
  }
  return { found, missed };
}
```

Store `company_id` with each account. Next time, `get-by-id` skips the matching step entirely. Run it as often as you like: B2Benrich is unlimited API usage for $500 a month, no credits, so re-enriching every account costs the same as enriching one.

## What to do with the data

- **Route inbound.** Enrich every new sign-up by domain and route on `employees_range`, `industry` and `hq_country` before anyone opens the record.
- **Fill CRM account records.** Write firmographics to your account object on creation, and refresh them on a schedule you choose. [CRM data enrichment](https://www.b2benrich.com/guides/crm-data-enrichment) covers field mapping and how to avoid overwriting good data.
- **Segment.** Split accounts by revenue range or region for different messaging or territories.
- **Find similar companies.** Take the industry and size bands your best accounts share and run them through the [company search API](https://www.b2benrich.com/guides/company-search-api) to find more like them.

## Frequently asked questions

### What is a company enrichment API?

An API that takes a company identifier, usually a website domain or a LinkedIn company URL, and returns a company record as JSON: name, description, industry, headquarters location, employee range, revenue range and LinkedIn URL.

### What is firmographic data?

Company-level facts used to group and qualify accounts: industry, headcount, revenue, location and company type. It’s the company equivalent of a person’s job title and location, and it’s what most routing and segmentation rules are built on.

### How do I enrich a company from just its domain?

Send a POST request to /v1/enrich/companies/domain-to-company with the domain in the input field and your API key in the X-Api-Key header. Strip the protocol, www and any path from the domain first so the lookup matches.

### Can I enrich a list of companies in bulk?

Yes. Dedupe and clean the domains, then loop over them in a script or workflow tool, calling the domain-to-company endpoint for each. Keep the company ID for every match and log the misses so you can review them.

### Is it better to match companies on domain or name?

Domain. One domain points to one company, while many companies share similar names. If you only have names, search by company name first, confirm the right result, then enrich by domain or company ID.
