# Search Companies — Pubrio

> Search B2B companies by name, domain, location, industry, technology, or headcount. See the documentation

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

## Description

Search B2B companies by name, domain, location, industry, technology, or headcount. [See the documentation](https://docs.pubrio.com/en/api-reference/endpoint/companies/search)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `companyName` | `string` | No | Company name to search for |
| `domains` | `string[]` | No | Company domains (e.g. google.com) |
| `locations` | `string[]` | No | Location codes to filter by Options are loaded from the connected account. |
| `keywords` | `string[]` | No | Keywords |
| `verticals` | `string[]` | No | Industry vertical names |
| `technologies` | `string[]` | No | Technology names |
| `employeesMin` | `integer` | No | Minimum number of employees |
| `employeesMax` | `integer` | No | Maximum number of employees |
| `linkedinUrls` | `string[]` | No | LinkedIn company URLs |
| `excludeLocations` | `string[]` | No | ISO country codes to exclude |
| `places` | `string[]` | No | Place names |
| `excludePlaces` | `string[]` | No | Place names to exclude |
| `verticalCategories` | `string[]` | No | Vertical category IDs |
| `verticalSubCategories` | `string[]` | No | Vertical sub-category IDs |
| `categories` | `string[]` | No | Technology category IDs |
| `companies` | `string[]` | No | Company domain_search_id UUIDs |
| `revenueMin` | `integer` | No | Minimum revenue |
| `revenueMax` | `integer` | No | Maximum revenue |
| `foundedYearStart` | `integer` | No | Minimum founding year |
| `foundedYearEnd` | `integer` | No | Maximum founding year |
| `isEnableSimilaritySearch` | `boolean` | No | Whether to enable similarity search |
| `similarityScore` | `string` | No | Similarity score threshold (0-1) |
| `excludeFields` | `string[]` | No | Field names to exclude from the response |
| `jobTitles` | `string[]` | No | Job titles |
| `jobLocations` | `string[]` | No | Country codes for job locations |
| `jobExcludeLocations` | `string[]` | No | Country codes to exclude from job locations |
| `jobPostedDateFrom` | `string` | No | Start date in YYYY-MM-DD format |
| `jobPostedDateTo` | `string` | No | End date in YYYY-MM-DD format |
| `newsCategories` | `string[]` | No | News category slugs |
| `newsPublishedDateFrom` | `string` | No | Start date in YYYY-MM-DD format |
| `newsPublishedDateTo` | `string` | No | End date in YYYY-MM-DD format |
| `newsGalleries` | `string[]` | No | News gallery slugs |
| `newsGalleryIds` | `string[]` | No | News gallery UUIDs |
| `advertisementSearchTerms` | `string[]` | No | Advertisement keywords |
| `advertisementTargetLocations` | `string[]` | No | Country codes for advertisement targeting |
| `advertisementExcludeTargetLocations` | `string[]` | No | Country codes to exclude from advertisement targeting |
| `advertisementStartDateFrom` | `string` | No | Start date in YYYY-MM-DD format |
| `advertisementStartDateTo` | `string` | No | End date in YYYY-MM-DD format |
| `advertisementEndDateFrom` | `string` | No | Start date in YYYY-MM-DD format |
| `advertisementEndDateTo` | `string` | No | End date in YYYY-MM-DD format |
| `page` | `integer` | No | Page number |
| `perPage` | `integer` | No | Results per page (max 25) |

## 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": "pubrio",
      },
    },
  },
)

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: "pubrio-search-companies",
  arguments: {
    companyName: "Company Name",
    domains: ["Domains"],
  },
})
```

**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: "pubrio-search-companies",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pubrio: { authProvisionId: "apn_xxxxxxx" },
    companyName: "Company Name",
    domains: ["Domains"],
  },
})

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": "pubrio-search-companies",
    "configured_props": {
      "pubrio": { "authProvisionId": "apn_xxxxxxx" },
      "companyName": "Company Name",
      "domains": ["Domains"]
    }
  }'
```

---

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