# B2B Company Search API - Firmographics, Revenue, Employees (`nabeelbaghoor/b2b-company-search-api`) Actor

Search a B2B company database by name, website, industry code, revenue, employee count, location, funding and employee growth, and export company records to a dataset. Pay per result. Bring your own API key.

- **URL**: https://apify.com/nabeelbaghoor/b2b-company-search-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Business, Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.00 / 1,000 company results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## B2B Company Search API - Firmographics, Revenue, Employees

Search a B2B company database and export structured account records. Filter by company name, website, industry and SIC or NAICS code, revenue band, employee count, location, technologies used, funding and employee growth rate, then stream the matching companies straight to a dataset. You pay only for the records you actually receive.

This actor is built for account-based marketing list building, territory and market sizing, CRM account enrichment, and any sales or research workflow that starts with "find every company that looks like this".

### What you can do with it

- Build target account lists that match an exact firmographic profile.
- Size a territory or a metro area by revenue band and employee count.
- Find companies inside a set of SIC or NAICS codes, in a country, state or metro.
- Screen for fast-growing companies using one-year and two-year employee growth rates.
- Filter by technologies a company uses, or exclude companies using a technology.
- Pull a corporate family by parent or ultimate parent company ID.
- Export everything as JSON, CSV or Excel, or push it into your CRM or warehouse.

### Features

- Identity filters: company name, website, description keywords, company ID.
- Industry filters: industry tags, industry keywords with AND and OR, SIC codes, NAICS codes, primary-industry-only mode.
- Size filters: revenue bands or an exact revenue range, employee bands or an exact employee range.
- Location filters: country, state, ZIP code with a radius in miles, metro area, continent, excluded regions, and a location match type that targets the headquarters or any employee location.
- Growth and funding filters: funding amount range, funding date range, one-year and two-year employee growth rates.
- Technographic filters: technologies used and technologies to exclude.
- Corporate structure filters: parent and ultimate parent company ID.
- Sorting by revenue, employee count or company name, ascending or descending.
- Automatic page-based pagination at 100 records per page, with duplicate suppression.
- Advanced raw criteria passthrough for criteria not exposed as form fields.
- Pay-per-result pricing with a hard result cap so a run can never surprise you.

### Input

Configure a run with these fields. All are optional individually, but at least one search criterion must be set.

| Field | Type | Description |
| --- | --- | --- |
| `companyName` | string | Company name to match. |
| `companyWebsite` | string | Company website, comma-separated list allowed. |
| `companyDescription` | string | Space-separated words matched against the description. |
| `industryCodes` / `industryKeywords` | string | Industry tags, or keywords with AND and OR. |
| `sicCodes` / `naicsCodes` | string | Comma-separated four-digit industry codes. |
| `primaryIndustriesOnly` | boolean | Match the primary industry only. |
| `revenue` | string | Revenue bands, comma-separated. |
| `revenueMin` / `revenueMax` | integer | Revenue range in thousands of USD. |
| `employeeCount` | string | Employee bands, comma-separated. |
| `employeeRangeMin` / `employeeRangeMax` | string | Exact employee-count range. |
| `country` / `state` / `zipCode` / `metroRegion` / `continent` | string | Location filters. |
| `zipCodeRadiusMiles` | integer | Radius around the ZIP code, in miles. |
| `excludedRegions` | string | States and metro areas to exclude. |
| `locationSearchType` | string | Headquarters, employee location, or a combination. |
| `companyType` | string | Company types, e.g. private or public. |
| `businessModel` | array | Any of B2B, B2C, B2G. |
| `companyRanking` | string | Ranking list IDs. |
| `fundingAmountMin` / `fundingAmountMax` | integer | Funding range in thousands of USD. |
| `fundingStartDate` / `fundingEndDate` | string | Funding date range, `YYYY-MM-DD`. |
| `oneYearEmployeeGrowthRateMin` / `Max` | string | One-year employee growth range, percent. |
| `twoYearEmployeeGrowthRateMin` / `Max` | string | Two-year employee growth range, percent. |
| `techAttributeTagList` | string | Technology tag IDs the company must use. |
| `excludeTechAttributeTagList` | string | Technology tag IDs to exclude. |
| `excludeDefunctCompanies` | boolean | Drop companies flagged as defunct. |
| `companyId` / `parentId` / `ultimateParentId` | string | Direct and corporate-family lookups. |
| `sort` | string | Sort by revenue, employee count or name. |
| `maxResults` | integer | Stop after this many records (1 to 5,000). |
| `rawAttributes` | object | Advanced JSON criteria merged over the fields above. |
| `clientId` | string | Your OAuth2 client ID. Required. |
| `apiKey` | string | Your OAuth2 client secret. Required, stored securely. |
| `scope` | string | Optional space-delimited OAuth scopes. |

#### Advanced raw criteria

Criteria that are not exposed as dedicated fields can be passed through `rawAttributes` as a JSON object, merged over the built-in criteria verbatim. For example:

```json
{
  "itDepartmentBudgetMin": 500,
  "companyTicker": ["ACME"],
  "subUnitTypes": "subsidiary",
  "hashTagString": "hiring"
}
```

### Example output

Each dataset item is one company. The search endpoint returns the core identity fields; the complete provider payload is kept under `raw`:

```json
{
  "companyId": "344589814",
  "name": "Acme Robotics",
  "website": "www.acmerobotics.com",
  "city": "Austin",
  "state": "Texas",
  "country": "United States",
  "revenueThousandsUsd": "42000",
  "employeeCount": "180",
  "logo": "https://example.com/logo/acmerobotics.com",
  "managementStatus": "NotUnderManagement",
  "raw": {
    "id": "344589814",
    "type": "Company",
    "attributes": { "name": "Acme Robotics", "website": "www.acmerobotics.com" }
  }
}
```

Revenue is reported in thousands of US dollars, so a 42 million USD company is returned as `42000`.

### Pricing and the credit model

This actor uses pay-per-result pricing. You are charged a fixed price for each company record delivered to the dataset, and nothing for a run that returns no matches. Set `maxResults` to cap how many records a run can collect, and set a run spending limit as a second safety net. When the spending limit is reached the run stops early and keeps whatever it has already saved.

### Bring your own API key

This actor connects to a third-party B2B company data provider (ZoomInfo) on your behalf and requires your own provider OAuth2 credentials. Generate a client ID and client secret in the provider's admin portal, then paste them into the `clientId` and `apiKey` inputs. The actor exchanges them for a short-lived access token at the start of each run and refreshes it automatically. It never ships with or shares credentials, and your secret is stored securely and never logged.

### Frequently asked questions

#### What data does this actor return?

Company search returns the core identity and sizing fields for each match: company ID, name, website, city, state, country, revenue, employee count, logo URL and management status. Every record also carries the complete raw provider payload, so nothing the API sends is lost.

#### How do I get credentials?

The underlying data API is a paid subscription. Once your subscription is active, an administrator generates an OAuth2 client ID and client secret in the provider's admin portal under the integrations settings. Paste both into the actor input.

#### Are revenue and funding values in dollars?

No, they are in thousands of US dollars, which is how the underlying API expresses them. Enter `1000` to mean 1 million USD in `revenueMin`, `revenueMax`, `fundingAmountMin` and `fundingAmountMax`.

#### How does pagination work?

Results are paged automatically at 100 records per page using page-based pagination, until your `maxResults` is reached, the provider returns a short page, or the last page is signalled. Records are de-duplicated by company ID as they stream in.

#### Does the search consume data credits?

Company search is a request-metered endpoint on the provider side rather than a record-metered one, but every request still counts against your request limit. Check your own subscription terms before running large jobs.

#### How am I charged on this actor?

You pay a fixed price per company record returned to the dataset. A run that matches nothing costs nothing. Use `maxResults` and the run spending limit to control cost.

#### Can I filter on criteria that are not shown in the form?

Yes. Use the advanced `rawAttributes` JSON object to pass any additional criteria, including departmental budget ranges, stock tickers, sub-unit types and engagement filters, which are merged over the built-in criteria.

#### What output formats are available?

The dataset can be exported as JSON, CSV, Excel, HTML or RSS, or read through the API for pushing into a CRM or warehouse.

### Keyword map

b2b company data, company search api, account based marketing data, firmographic search, company revenue data, employee count data, sic code search, naics code search, technographic data, company funding data, employee growth rate, target account list, abm account list, crm enrichment, sales prospecting data, company database api, metro area company search, corporate hierarchy data, market sizing data, lead generation api.

# Actor input Schema

## `companyName` (type: `string`):

Company name to match, e.g. `Acme Robotics`.

## `companyWebsite` (type: `string`):

Company website in `http://www.example.com` format. Accepts a comma-separated list of websites.

## `companyDescription` (type: `string`):

Space-separated words matched against the company description, e.g. `warehouse automation robotics`.

## `industryCodes` (type: `string`):

Top-level industry tags to match. Accepts a comma-separated list, e.g. `Software, Manufacturing`.

## `industryKeywords` (type: `string`):

Industry keywords associated with a company. Supports the `AND` and `OR` operators, e.g. `software AND logistics`.

## `sicCodes` (type: `string`):

Four-digit SIC industry codes. Accepts a comma-separated list, e.g. `3661, 7372`.

## `naicsCodes` (type: `string`):

Four-digit NAICS industry codes. Accepts a comma-separated list, e.g. `5182, 3345`.

## `primaryIndustriesOnly` (type: `boolean`):

When enabled, only return companies whose primary industry matches the industry filter, rather than any of their industries.

## `revenue` (type: `string`):

Annual revenue bands to match. Accepts a comma-separated list of band values. Use the minimum and maximum below for an exact range instead.

## `revenueMin` (type: `integer`):

Minimum annual revenue, expressed in thousands of US dollars, e.g. `1000` for 1 million USD.

## `revenueMax` (type: `integer`):

Maximum annual revenue, expressed in thousands of US dollars, e.g. `500000` for 500 million USD.

## `employeeCount` (type: `string`):

Employee-count bands to match. Accepts a comma-separated list of band values. Use the minimum and maximum below for a granular range instead.

## `employeeRangeMin` (type: `string`):

Minimum employee count, e.g. `50`. Use together with the maximum to set a range.

## `employeeRangeMax` (type: `string`):

Maximum employee count, e.g. `1000`. Use together with the minimum to set a range.

## `country` (type: `string`):

Country of the company's primary address, e.g. `United States`.

## `state` (type: `string`):

State or province of the company's address, e.g. `California`.

## `zipCode` (type: `string`):

ZIP or postal code of the company's address, e.g. `94105`.

## `zipCodeRadiusMiles` (type: `integer`):

Used together with the ZIP code above: return companies within this many miles of it.

## `metroRegion` (type: `string`):

US and Canada metro areas to match. Accepts a comma-separated list.

## `continent` (type: `string`):

Continent of the company's primary address, e.g. `Europe`.

## `excludedRegions` (type: `string`):

US and Canada states and metro areas to exclude. Accepts a comma-separated list.

## `locationSearchType` (type: `string`):

How the location filters are applied: against the headquarters, against any employee location, or a combination.

## `companyType` (type: `string`):

Company types to match, e.g. `private, public`. Accepts a comma-separated list.

## `businessModel` (type: `array`):

Restrict to companies with these business models. Leave empty for all.

## `companyRanking` (type: `string`):

Ranking list IDs to match, for example a Fortune 500 list ID. Accepts a comma-separated list.

## `fundingAmountMin` (type: `integer`):

Minimum total funding, expressed in thousands of US dollars, e.g. `1000` for 1 million USD.

## `fundingAmountMax` (type: `integer`):

Maximum total funding, expressed in thousands of US dollars.

## `fundingStartDate` (type: `string`):

Only companies funded on or after this date, in `YYYY-MM-DD` format.

## `fundingEndDate` (type: `string`):

Only companies funded on or before this date, in `YYYY-MM-DD` format.

## `oneYearEmployeeGrowthRateMin` (type: `string`):

Minimum one-year employee growth rate, as a percentage, e.g. `20`.

## `oneYearEmployeeGrowthRateMax` (type: `string`):

Maximum one-year employee growth rate, as a percentage.

## `twoYearEmployeeGrowthRateMin` (type: `string`):

Minimum two-year employee growth rate, as a percentage.

## `twoYearEmployeeGrowthRateMax` (type: `string`):

Maximum two-year employee growth rate, as a percentage.

## `techAttributeTagList` (type: `string`):

Technology product tag IDs the company must use. Accepts a comma-separated list.

## `excludeTechAttributeTagList` (type: `string`):

Technology product tag IDs to exclude. Accepts a comma-separated list.

## `excludeDefunctCompanies` (type: `boolean`):

When enabled, companies flagged as defunct are removed from the results.

## `companyId` (type: `string`):

Look up one or more companies directly by their provider company ID.

## `parentId` (type: `string`):

Return companies whose parent is this company ID.

## `ultimateParentId` (type: `string`):

Return companies whose ultimate parent is this company ID.

## `sort` (type: `string`):

Sort order for the result set. The default is revenue, highest first.

## `maxResults` (type: `integer`):

Stop after this many company records (1-5,000). Paged automatically at 100 per page. You are charged per result returned.

## `rawAttributes` (type: `object`):

Power users: a JSON object of raw search criteria merged over the fields above, verbatim. Use this for criteria not exposed as fields, e.g. `{ "itDepartmentBudgetMin": 500, "companyTicker": ["ACME"], "subUnitTypes": "subsidiary" }`.

## `clientId` (type: `string`):

Your OAuth2 client ID, generated in the data provider's admin portal. Required. Used with the Client secret below to obtain a short-lived access token.

## `apiKey` (type: `string`):

Your OAuth2 client secret. Required. Stored securely and never logged.

## `scope` (type: `string`):

Optional. A space-delimited list of scopes to request, which must be a subset of those configured for your application. Leave blank to receive all configured scopes.

## Actor input object example

```json
{
  "primaryIndustriesOnly": false,
  "businessModel": [],
  "excludeDefunctCompanies": false,
  "maxResults": 100
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/b2b-company-search-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxResults": 100 }

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/b2b-company-search-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxResults": 100
}' |
apify call nabeelbaghoor/b2b-company-search-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nabeelbaghoor/b2b-company-search-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/aG7G08pHtSVcL3uSW/builds/GV4lZXdrGbNRiynV2/openapi.json
