> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Lemlist: Get Database Filters

> List the filters you can use to search the Lemlist People and Companies databases. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List the filters you can use to search the Lemlist People and Companies databases.

> [!NOTE]
>
> Tool ID: `lemlist_get_database_filters`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'lemlist_get_database_filters',
  {
    "usage": "api",
    "mode": "leads"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute lemlist_get_database_filters --input '{
  "usage": "api",
  "mode": "leads"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": [
    {
      "filterId": "filter_123",
      "description": "Example description",
      "type": "text"
    }
  ]
}
```

Use `deepline describe lemlist_get_database_filters --json` for the latest machine-readable contract.

## Input reference

Get Database Filters

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.usage` | `"api" \| "ui"` | No | `"api"` | Context the filters will be used in. `api` (default) lists the filters accepted by the search endpoints. `ui` lists the filters usable in the People Database UI: use it to pick the filters of a [saved search](https://deepline.com/docs/api-reference/objects-definitions/saved-search), which refuses the others. Allowed: `api`, `ui`. |
| `payload.mode` | `"leads" \| "companies"` | No | — | Restrict the list to the filters of one search mode Allowed: `leads`, `companies`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Get Database Filters",
    "properties": {
      "usage": {
        "type": "string",
        "description": "Context the filters will be used in. `api` (default) lists the filters accepted by the search endpoints. `ui` lists the filters usable in the People Database UI: use it to pick the filters of a [saved search](/api-reference/objects-definitions/saved-search), which refuses the others.",
        "default": "api",
        "enum": [
          "api",
          "ui"
        ]
      },
      "mode": {
        "type": "string",
        "description": "Restrict the list to the filters of one search mode",
        "enum": [
          "leads",
          "companies"
        ]
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `array` | Yes | — | Provider response payload. |
| `result.data[].filterId` | `string` | Yes | — | Filter identifier, to send as `filterId` in the search filters |
| `result.data[].description` | `string` | Yes | — | Human-readable filter name, followed by a description of what the filter matches when one exists |
| `result.data[].mode` | `array` | No | — | Search modes the filter can be used in: `leads` for Search People Database, `companies` for Search Companies Database. Omitted when the request is scoped to a single `mode`. |
| `result.data[].type` | `"text" \| "select" \| "autocomplete" \| "static" \| "slider" \| "level" \| "elasticId"` | Yes | — | Kind of input the filter expects. `level` is a two-level dropdown of the People Database UI. It is reported as `select` by default. Allowed: `text`, `select`, `autocomplete`, `static`, `slider`, `level`, `elasticId`. |
| `result.data[].values` | `array` | No | — | Allowed values, for the filters that have a fixed list |
| `result.data[].range` | `object` | No | — | Slider configuration, for the `slider` filters |
| `result.data[].range.min` | `number` | No | — | Lowest accepted value |
| `result.data[].range.max` | `number` | No | — | Highest accepted value |
| `result.data[].range.default` | `string` | No | — | Default range, formatted `min\|max` |
| `result.data[].range.percentage` | `boolean` | No | — | Whether the values are percentages |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "array",
        "description": "Provider response payload.",
        "items": {
          "type": "object",
          "description": "A filter usable in the People and Companies database searches, as listed by Get Database Filters.",
          "properties": {
            "filterId": {
              "type": "string",
              "description": "Filter identifier, to send as `filterId` in the search filters"
            },
            "description": {
              "type": "string",
              "description": "Human-readable filter name, followed by a description of what the filter matches when one exists"
            },
            "mode": {
              "type": "array",
              "description": "Search modes the filter can be used in: `leads` for Search People Database, `companies` for Search Companies Database. Omitted when the request is scoped to a single `mode`.",
              "items": {
                "type": "string",
                "enum": [
                  "leads",
                  "companies"
                ]
              }
            },
            "type": {
              "type": "string",
              "description": "Kind of input the filter expects. `level` is a two-level dropdown of the People Database UI; it is reported as `select` by default.",
              "enum": [
                "text",
                "select",
                "autocomplete",
                "static",
                "slider",
                "level",
                "elasticId"
              ]
            },
            "values": {
              "type": "array",
              "description": "Allowed values, for the filters that have a fixed list",
              "items": {
                "type": "string"
              }
            },
            "range": {
              "type": "object",
              "description": "Slider configuration, for the `slider` filters",
              "properties": {
                "min": {
                  "type": "number",
                  "description": "Lowest accepted value"
                },
                "max": {
                  "type": "number",
                  "description": "Highest accepted value"
                },
                "default": {
                  "type": "string",
                  "description": "Default range, formatted `min|max`"
                },
                "percentage": {
                  "type": "boolean",
                  "description": "Whether the values are percentages"
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "filterId",
            "description",
            "type"
          ],
          "additionalProperties": false
        }
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Lemlist provider guide](https://deepline.com/docs/providers/lemlist/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.