# List Leads — LeadBoxer

> Retrieve a list of leads. See the documentation

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

## Description

Retrieve a list of leads. [See the documentation](https://developers.leadboxer.com/reference/users)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `search` | `string` | No | Keyword or phrase to search across all searchable fields. Search is case-insensitive for text fields. Defaults to * to match all results. |
| `limit` | `integer` | No | Number of rows to return in the response. |
| `locale` | `string` | No | Locale for formatting the prettyLastEvent field in the response. Determines the language and regional formatting (e.g., dates, text) returned by the API. |
| `nextToken` | `string` | No | Token returned after each request, used to fetch the next page of results. Each token is valid for 10 minutes. |
| `criteriaTextFilter` | `string` | No | Text-based filter expression used to filter result fields. Format: field\|operator\|value. Multiple filters are comma-separated. |
| `criteriaNumberFilter` | `string` | No | Numeric filter expression used to filter results based on numeric fields. Format: field\|operator\|value. Multiple filters are comma-separated. Supported numeric operators include greaterthan, lessthan, is, isnot, between, and notbetween. The between and notbetween operators use the format min-max. |
| `criteriaTimeFilter` | `string` | Yes | Time-based filter expression used to filter results by time field. Format: field\|operator\|value. Allowed fields (same as Time Field): eventEsTimestamp (Last Seen), first_session_unix_timestamp (First Seen). Supported operators: exactly (integer value, 0 = Today, 1 = Yesterday), lessthan (integer value, e.g. 6 = last 7 days), between (date range in format dd/MM/yyyy-dd/MM/yyyy). Locale settings are taken into account while interpreting dates and returning results. |
| `criteriaFieldFilter` | `string` | No | Field-based filter used to include leads based on field presence. Format: operator\|field1;field2. Allowed operator: hasanyvalue. Allowed fields: firstName, lastName, email. Multiple fields can be provided using semicolons. |
| `criteriaExitLinkFilter` | `string` | No | Exit link filter used to include or exclude leads based on exit link values. Format: field\|operator\|value. Supported operators: contains, is, isnot, doesnotcontain. Multiple values can be provided using semicolons. |
| `criteriaLeadscoreFilter` | `integer` | No | Minimum lead score threshold (0-100). Only records with lead scores greater than the provided number are returned. |
| `criteriaDisplayFilter` | `string[]` | No | Display filter used to control which types of leads are returned. Selecting unidentified returns leads that could not be identified as a company or a person. |
| `timeField` | `string` | Yes | Time field used for filtering. |
| `usePresetExclusionList` | `string` | No | Use a preset exclusion list of criteria to exclude from results. |
| `userId` | `integer` | No | The ID of the user to filter leads by. |
| `timeZone` | `string` | No | Time zone used when parsing timestamps and evaluating time-based filters. If not provided, the default time zone is Europe/Amsterdam. |
| `sortBy` | `string` | No | Sort results by a specific field and direction. Format: field\|direction. Allowed fields: lastEvent, _score. Allowed directions: asc, desc. |

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

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: "leadboxer-list-leads",
  arguments: {
    search: "Search",
    limit: 10,
  },
})
```

**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: "leadboxer-list-leads",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    leadboxer: { authProvisionId: "apn_xxxxxxx" },
    search: "Search",
    limit: 10,
  },
})

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": "leadboxer-list-leads",
    "configured_props": {
      "leadboxer": { "authProvisionId": "apn_xxxxxxx" },
      "search": "Search",
      "limit": 10
    }
  }'
```

---

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