# Search Candidates — Recruiterflow

> Searches for candidates matching specified criteria in Recruiterflow. Supports both simple searches and advanced filter arrays. See the documentation

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

## Description

Searches for candidates matching specified criteria in Recruiterflow. Supports both simple searches and advanced filter arrays. [See the documentation](https://recruiterflow.com/swagger.yml)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `conjunction` | `string` | Yes | How to combine multiple filters |
| `filters` | `string[]` | No | Array of filter objects as JSON strings. Each filter should have type, key, and other properties based on filter type. Example: {"type": "text", "conjunction": "in", "values": ["John"], "key": "name"}. Leave empty to use simple search fields below. |
| `itemsPerPage` | `integer` | Yes | Number of results to return per page |
| `currentPage` | `integer` | Yes | Page number to retrieve |
| `includeCount` | `boolean` | No | Whether to include total count in response |
| `name` | `string` | No | Search by candidate name (simple search) |
| `email` | `string` | No | Search by candidate email (simple search) |
| `textSearch` | `string` | No | Search in resume, notes, emails, and files (simple search) |
| `includeNotes` | `boolean` | No | Include notes when using text search |
| `includeFiles` | `boolean` | No | Include files when using text search |
| `includeEmails` | `boolean` | No | Include emails when using text search |
| `skills` | `string[]` | No | Filter by skills (simple search) |
| `jobTitle` | `string` | No | Filter by job title (simple search) |
| `currentCompany` | `string` | No | Filter by current company (simple search) |
| `phoneNumber` | `string` | No | Filter by phone number (simple search) |
| `linkedinProfile` | `string` | No | Filter by LinkedIn profile URL (simple search) |
| `school` | `string` | No | Filter by school (simple search) |

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

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: "recruiterflow-search-candidates",
  arguments: {
    conjunction: "Conjunction",
    filters: ["Filters"],
  },
})
```

**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: "recruiterflow-search-candidates",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    recruiterflow: { authProvisionId: "apn_xxxxxxx" },
    conjunction: "Conjunction",
    filters: ["Filters"],
  },
})

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": "recruiterflow-search-candidates",
    "configured_props": {
      "recruiterflow": { "authProvisionId": "apn_xxxxxxx" },
      "conjunction": "Conjunction",
      "filters": ["Filters"]
    }
  }'
```

---

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