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

# Filtering leads

> Find leads by any field.

Field keys come from [List lead fields](/api-reference/reference/list-fields).

[List leads](/api-reference/leads/list-leads) takes a `filter` query parameter.

A JSON array of field filters: `[{"field":"city","operator":"contains","value":"Hyd"}]`. All filters must match. The operators each field type takes are in this parameter’s `x-filter-operators`.

```bash theme={null}
curl -G "https://app.marro.si/api/v1/leads" \
  -H "Authorization: Bearer $MARRO_API_KEY" \
  --data-urlencode 'filter=[{"field":"city","operator":"contains","value":"Hyd"}]'
```

Up to 10 conditions; all must match.

| Field type | Operator | Meaning | Takes |
| - | - | - | - |
| text, textarea, phone, email, url | `contains` | contains | `value` |
| | `equals` | is | `value` |
| | `is_empty` | is empty | No value |
| | `is_not_empty` | is not empty | No value |
| number | `equals` | is | `value` |
| | `gt` | is more than | `value` |
| | `lt` | is less than | `value` |
| | `between` | is between | `values` with two items |
| | `is_empty` | is empty | No value |
| | `is_not_empty` | is not empty | No value |
| date | `on` | is on | `value` |
| | `before` | is before | `value` |
| | `after` | is after | `value` |
| | `between` | is between | `values` with two items |
| | `is_empty` | is empty | No value |
| | `is_not_empty` | is not empty | No value |
| select, lead\_source, user | `is_any_of` | is any of | `values` with one or more items |
| | `is_empty` | is empty | No value |
| | `is_not_empty` | is not empty | No value |
| multiselect | `has_any_of` | includes any of | `values` with one or more items |
| | `is_empty` | is empty | No value |
| | `is_not_empty` | is not empty | No value |
| checkbox | `is_true` | is yes | No value |
| | `is_false` | is no | No value |

Other query parameters on this endpoint:

| Parameter | Type | Description |
| - | - | - |
| `limit` | integer | How many leads to return, 1–100. |
| `cursor` | integer | The `nextCursor` from the previous page. |
| `updated_since` | string (date-time) | Only leads changed at or after this time, for syncing. |
| `stage_id` | integer | Only leads in this stage (IDs from GET /api/v1/lead-stages). |
| `pipeline_id` | integer | Only leads in this pipeline (IDs from GET /api/v1/pipelines). |
| `source_id` | integer | Only leads from this source (IDs from GET /api/v1/lead-sources). |
| `owner_id` | integer | Only leads owned by this person (IDs from GET /api/v1/users). |
