# Search For Organizations — Apollo (API Key)

> Search the Apollo database for companies (organizations) using filters such as name, domain, employee count, location, technologies, revenue, funding, and job postings. See the documentation

- Key: `apollo_io-organization-search`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Apollo (API Key) (`apollo_io`) — https://pipedream.com/apps/apollo-io.md
- This page (HTML): https://pipedream.com/apps/apollo-io/actions/organization-search
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/apollo_io/actions/organization-search/organization-search.mjs

## Description

Search the Apollo database for companies (organizations) using filters such as name, domain, employee count, location, technologies, revenue, funding, and job postings. [See the documentation](https://docs.apollo.io/reference/organization-search)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `qOrganizationName` | `string` | No | Company name to search for (partial matches supported) |
| `qOrganizationDomainsList` | `string[]` | No | Company domains to match (no www, no @). Example: ["apollo.io", "google.com"] |
| `organizationIds` | `string[]` | No | Specific Apollo organization IDs to filter results to Options are loaded from the connected account. |
| `organizationNumEmployeesRanges` | `string[]` | No | Employee count ranges, formatted as min,max. Example: ["1,10", "250,500"] |
| `organizationLocations` | `string[]` | No | HQ locations to include. Example: ["texas", "tokyo", "spain"] |
| `organizationNotLocations` | `string[]` | No | HQ locations to exclude from results |
| `currentlyUsingAnyOfTechnologyUids` | `string[]` | No | Apollo technology UIDs the company uses. Example: ["salesforce", "google_analytics"] |
| `qOrganizationKeywordTags` | `string[]` | No | Keyword tags describing the company industry/focus. Example: ["sales strategy", "lead generation"] |
| `revenueRangeMin` | `integer` | No | Minimum annual revenue (USD) |
| `revenueRangeMax` | `integer` | No | Maximum annual revenue (USD) |
| `latestFundingAmountMin` | `integer` | No | Minimum latest funding round amount (USD) |
| `latestFundingAmountMax` | `integer` | No | Maximum latest funding round amount (USD) |
| `totalFundingMin` | `integer` | No | Minimum total funding raised (USD) |
| `totalFundingMax` | `integer` | No | Maximum total funding raised (USD) |
| `latestFundingDateMin` | `string` | No | Earliest date of the latest funding round (YYYY-MM-DD) |
| `latestFundingDateMax` | `string` | No | Latest date of the latest funding round (YYYY-MM-DD) |
| `qOrganizationJobTitles` | `string[]` | No | Job posting titles the company is hiring for |
| `organizationJobLocations` | `string[]` | No | Locations of job postings at the company |
| `organizationNumJobsMin` | `integer` | No | Minimum number of open job postings |
| `organizationNumJobsMax` | `integer` | No | Maximum number of open job postings |
| `organizationJobPostedAtMin` | `string` | No | Earliest date a job was posted (YYYY-MM-DD) |
| `organizationJobPostedAtMax` | `string` | No | Latest date a job was posted (YYYY-MM-DD) |

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

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: "apollo_io-organization-search",
  arguments: {
    qOrganizationName: "Organization Name",
    qOrganizationDomainsList: ["Organization 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: "apollo_io-organization-search",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    apollo_io: { authProvisionId: "apn_xxxxxxx" },
    qOrganizationName: "Organization Name",
    qOrganizationDomainsList: ["Organization 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": "apollo_io-organization-search",
    "configured_props": {
      "apollo_io": { "authProvisionId": "apn_xxxxxxx" },
      "qOrganizationName": "Organization Name",
      "qOrganizationDomainsList": ["Organization Domains"]
    }
  }'
```

---

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