Company search API: find accounts by industry, size and location
Search companies by name, industry, headcount, revenue, location and founding year, and turn the results into an account list.
Dag Holmen · Updated · 4 min read
A company search API finds businesses that match the criteria you send: industry, headcount, revenue, headquarters location, founding year. It returns one structured record per company, so you can turn a description of the market you sell into an account list your code can store, score and work from.
B2Benrich's company search is /v1/search/companies. This guide covers the filters, how to get their exact values, how to page through results, and how to go from a list of companies to the people inside them.
What you can filter on
| Group | Filters |
|---|---|
| Identity | company_id, company_name, domain |
| Industry | industry_linkedin, industry_sic_code, specialties |
| Size | employee_count_range, revenue_range |
| Location | headquarters_city, headquarters_state_name, headquarters_country_name, headquarters_country_code, headquarters_country_region, headquarters_continent |
| Age | founded |
Paging uses page and page_size. Each record comes back with id, name, description, domain, industry, hq_city, hq_state, hq_country, employees_range, revenue_range and linkedin_url, and the response includes total_count.
Two filters cover different needs for industry. industry_linkedin uses LinkedIn-style industry labels, which match how most people describe a market. industry_sic_code uses Standard Industrial Classification codes, which are useful when you're joining to government or financial data that already uses SIC. specialties matches the topics a company says it focuses on, which helps when an industry label is too broad.
Get the exact values first
Industry, size and revenue filters match exact strings. Before you build a query, pull the allowed values from the meta endpoint:
curl --request POST \
--url https://api.b2benrich.com/v1/search/meta/employee_count_range \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_API_KEY' \
--data '{ "page": 1 }'
The response is values (each with a value) plus has_more. Do the same for industry_linkedin and revenue_range. Keep the lists in your repo so filters are checked before a request goes out.
Search companies by industry and size
curl --request POST \
--url https://api.b2benrich.com/v1/search/companies \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_API_KEY' \
--data '{
"industry_linkedin": "Software Development",
"employee_count_range": "201-500",
"headquarters_country_name": "United States",
"page": 1,
"page_size": 50
}'
{
"total_count": 1260,
"records": [
{
"name": "Acme",
"domain": "acme.com",
"industry": "Software Development",
"hq_city": "Austin",
"hq_country": "United States",
"employees_range": "201-500",
"revenue_range": "$25M-$50M",
"linkedin_url": "linkedin.com/company/acme"
}
]
}
total_count tells you how big the list is on the first call, so check it before paging. If it's far more than you can work, add a revenue band or narrow the region.
Page through and build the account list
This script walks every page, keys each company by domain and writes a CSV:
import fs from 'node:fs';
const BASE = 'https://api.b2benrich.com';
const filters = {
industry_linkedin: 'Software Development',
employee_count_range: '201-500',
headquarters_country_name: 'United States'
};
const pageSize = 100;
const accounts = new Map();
for (let page = 1; ; page++) {
const res = await fetch(`${BASE}/v1/search/companies`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-Api-Key': process.env.B2BENRICH_KEY },
body: JSON.stringify({ ...filters, page, page_size: pageSize })
});
if (!res.ok) throw new Error(`Page ${page}: ${res.status}`);
const { records, total_count } = await res.json();
for (const c of records) if (c.domain) accounts.set(c.domain, c);
if (records.length < pageSize || page * pageSize >= total_count) break;
}
const rows = [...accounts.values()].map((c) =>
[c.id, c.name, c.domain, c.industry, c.employees_range, c.revenue_range, c.hq_country].join(',')
);
fs.writeFileSync('accounts.csv', ['id,name,domain,industry,employees,revenue,country', ...rows].join('\n'));
In production, quote the CSV fields properly or write to a database instead. Company names contain commas more often than you'd think.
Remove accounts you already have
Most account lists need a suppression step: current customers, open opportunities, competitors, partners. Export those domains from your CRM, load them into a set and skip any search result whose domain is in it. Domains make better keys than names because "Acme", "Acme Inc." and "ACME Corporation" are the same company.
Find a company by name
Sometimes your input is a list of names with no domains, from an event, a spreadsheet or a CRM full of free-text entries. /v1/search/company-name looks companies up by name, with exact or fuzzy matching, and returns the record with its domain. Run it first, then use the domain everywhere else. Check fuzzy matches before you trust them: two companies can share a name, so compare the returned location or industry with what you expected, and keep the ones that don't line up for a manual look.
From accounts to people
A company list is half the job. To find the people at each account, pass the domain or id to /v1/search/company-employees with filters such as job_function or job_level. If you don't need the account list as a separate step, skip straight to a Prospector search, which combines company filters and contact filters in one query. The prospecting API guide shows both.
Searching by tech stack
The company search filters don't include technologies. To find companies by the tools they use, use the technologies company filter on Prospector and collect the unique companies from the results. Technographic data walks through it.
Company search vs company enrichment
Search is for when you don't know the companies yet: you describe them and get a list. Enrichment is for when you have an identifier, such as a domain or LinkedIn company URL, and want the record behind it. Most pipelines use both: search to build the list, enrichment to fill in companies that arrive from other places, like sign-ups and form fills. The company enrichment API guide covers the second half.
Because B2Benrich is unlimited API usage for $500 a month with no credits, you can rerun a search every week to catch companies that have grown into your size band, without watching a balance.
Frequently asked questions
- What is a company search API?
- A company search API returns businesses that match filters such as industry, employee count, revenue range, headquarters location and founding year. Results come back as structured records you can store and work with in code.
- How do I find companies by industry?
- Send an industry_linkedin value, or an industry_sic_code, to /v1/search/companies. Get the exact allowed values from /v1/search/meta/industry_linkedin first, since filters match exact strings.
- How do I search companies by size?
- Filter on employee_count_range for headcount or revenue_range for revenue. Both take banded values, which you can list with the meta endpoint for each field.
- How do I build an account list with an API?
- Search companies with your industry, size and location filters, page through the results, key each company by domain, and remove domains already in your CRM. Then find the right people at each account with the company-employees endpoint.
- Can I search companies by the technology they use?
- Not with the company search filters. Use the technologies company filter on the Prospector endpoint and collect the unique companies from the results.
- What’s the difference between company search and company enrichment?
- Company search finds companies you don’t know yet from criteria. Company enrichment takes a domain or LinkedIn URL you already have and returns that company’s record.
Related guides
- Company enrichment API: firmographics from a domainTurn a domain, LinkedIn URL or LinkedIn ID into a company record: industry, size, revenue range, location and tech stack, over one API call.
- 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.
- Technographic data: find companies by the tools they useWhat technographic data is, the tech-stack categories you can filter on, and how to build a list of companies that use, or don’t use, a given tool.