# Find Similar Companies — Pubrio

> Find companies similar to a given company. See the documentation

- Key: `pubrio-find-similar-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/find-similar-companies
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/pubrio/actions/find-similar-companies/find-similar-companies.mjs

## Description

Find companies similar to a given company. [See the documentation](https://docs.pubrio.com/en/api-reference/endpoint/companies/similar)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `lookupType` | `string` | Yes | How to identify the company |
| `value` | `string` | Yes | The domain, LinkedIn URL, or ID value |
| `locations` | `string[]` | No | Location codes to filter by Options are loaded from the connected account. |
| `excludeLocations` | `string[]` | No | ISO country codes to exclude |
| `employeesMin` | `integer` | No | Minimum number of employees |
| `employeesMax` | `integer` | No | Maximum number of employees |
| `revenueMin` | `integer` | No | Minimum revenue |
| `revenueMax` | `integer` | No | Maximum revenue |
| `foundedYearStart` | `integer` | No | Minimum founding year |
| `foundedYearEnd` | `integer` | No | Maximum founding year |
| `technologies` | `string[]` | No | Technology names |
| `categories` | `string[]` | No | Technology category IDs |
| `verticals` | `string[]` | No | Industry vertical names |
| `verticalCategories` | `string[]` | No | Vertical category IDs |
| `verticalSubCategories` | `string[]` | No | Vertical sub-category IDs |
| `jobTitles` | `string[]` | No | Job titles |
| `jobLocations` | `string[]` | No | Country codes for 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 |
| `isEnableSimilaritySearch` | `boolean` | No | Whether to enable similarity search |
| `similarityScore` | `string` | No | Similarity score threshold (0-1) |
| `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-find-similar-companies",
  arguments: {
    lookupType: "Lookup Type",
    value: "Value",
  },
})
```

**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-find-similar-companies",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pubrio: { authProvisionId: "apn_xxxxxxx" },
    lookupType: "Lookup Type",
    value: "Value",
  },
})

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-find-similar-companies",
    "configured_props": {
      "pubrio": { "authProvisionId": "apn_xxxxxxx" },
      "lookupType": "Lookup Type",
      "value": "Value"
    }
  }'
```

---

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