# Search Companies — Enrich Layer

> Search for companies that meet a set of criteria. Returns up to 10,000,000 results. Cost: 3 credits per company URL returned. See the documentation.

- Key: `enrich_layer-search-companies`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Enrich Layer (`enrich_layer`) — https://pipedream.com/apps/enrich-layer.md
- This page (HTML): https://pipedream.com/apps/enrich-layer/actions/search-companies
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/enrich_layer/actions/search-companies/search-companies.mjs

## Description

Search for companies that meet a set of criteria. Returns up to 10,000,000 results. Cost: 3 credits per company URL returned. [See the documentation](https://enrichlayer.com/docs/api/v2/search-api/company-search).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `country` | `string` | No | Filter companies with an office in this country (Alpha-2 ISO 3166 code). |
| `region` | `string` | No | Filter by region/state/province. Wrap names with spaces in double quotes (e.g., Maryland OR "New York"). |
| `city` | `string` | No | Filter by city. Wrap names with spaces in double quotes. |
| `name` | `string` | No | Filter companies by name using boolean search expression. |
| `industry` | `string` | No | Filter by industry (includes inferred industries). Uses boolean search. |
| `primaryIndustry` | `string` | No | Filter by primary industry only. Uses boolean search. |
| `specialities` | `string` | No | Filter by company specialities using boolean search. |
| `description` | `string` | No | Filter by company description using boolean search. |
| `type` | `string` | No | Filter by company type. |
| `employeeCountCategory` | `string` | No | Filter by employee count category. Takes precedence over min/max params. |
| `employeeCountMin` | `integer` | No | Filter companies with at least this many employees. |
| `employeeCountMax` | `integer` | No | Filter companies with at most this many employees. |
| `followerCountMin` | `integer` | No | Filter companies with more than this many followers. |
| `followerCountMax` | `integer` | No | Filter companies with fewer than this many followers. |
| `foundedAfterYear` | `integer` | No | Filter companies founded after this year. |
| `foundedBeforeYear` | `integer` | No | Filter companies founded before this year. |
| `fundingAmountMin` | `integer` | No | Filter companies that have raised at least this much funding. |
| `fundingAmountMax` | `integer` | No | Filter companies that have raised at most this much funding. |
| `fundingRaisedAfter` | `string` | No | Filter companies that raised funding after this date (ISO 8601). |
| `fundingRaisedBefore` | `string` | No | Filter companies that raised funding before this date (ISO 8601). |
| `publicIdentifierInList` | `string` | No | Comma-separated list of company public identifiers to include. |
| `publicIdentifierNotInList` | `string` | No | Comma-separated list of company public identifiers to exclude. |
| `domainName` | `string` | No | Filter by company domain name. |
| `enrichProfiles` | `string` | No | Get the full profile data instead of only profile URLs. enrich adds 1 credit per result. |
| `pageSize` | `integer` | No | Max results per API call. Default is 10 (max 100). When enriching, max is 10. |
| `useCache` | `string` | No | if-present returns cached data regardless of age. if-recent returns fresh data (max 29 days old) for 1 extra credit. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "enrich_layer",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "enrich_layer-search-companies",
  arguments: {
    country: "Country",
    region: "Region",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "enrich_layer-search-companies",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    enrich_layer: { authProvisionId: "apn_xxxxxxx" },
    country: "Country",
    region: "Region",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "enrich_layer-search-companies",
    "configured_props": {
      "enrich_layer": { "authProvisionId": "apn_xxxxxxx" },
      "country": "Country",
      "region": "Region"
    }
  }'
```

---

- App: https://pipedream.com/apps/enrich-layer.md · All apps: https://pipedream.com/apps
