> ## 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

> Get Database Filters. Lemlist Get Database Filters reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Get Database Filters.

<Info>
  Tool ID: `lemlist_get_database_filters`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
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={null}
deepline tools execute lemlist_get_database_filters --input '{
  "usage": "api",
  "mode": "leads"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": [
    {
      "filterId": "filter_123",
      "description": "Example description",
      "type": "text"
    }
  ]
}
```

Use `deepline tools get 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](/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={null}
  {
    "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={null}
  {
    "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](/docs/providers/lemlist/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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