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

# Database

> Mailchimp local sync: searchable entities, `.search()` filters, and operators.

The Mailchimp plugin syncs data locally. Use `corsair.mailchimp.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Campaigns

Path: `mailchimp.db.campaigns.search`

```ts theme={null}
const rows = await corsair.mailchimp.db.campaigns.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field         | Type     | Operators                                  |
| ------------- | -------- | ------------------------------------------ |
| `entity_id`   | `string` | equals, contains, startsWith, endsWith, in |
| `id`          | `string` | equals, contains, startsWith, endsWith, in |
| `web_id`      | `number` | equals, gt, gte, lt, lte, in               |
| `type`        | `string` | equals, contains, startsWith, endsWith, in |
| `status`      | `string` | equals, contains, startsWith, endsWith, in |
| `create_time` | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Lists

Path: `mailchimp.db.lists.search`

```ts theme={null}
const rows = await corsair.mailchimp.db.lists.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field          | Type     | Operators                                  |
| -------------- | -------- | ------------------------------------------ |
| `entity_id`    | `string` | equals, contains, startsWith, endsWith, in |
| `id`           | `string` | equals, contains, startsWith, endsWith, in |
| `web_id`       | `number` | equals, gt, gte, lt, lte, in               |
| `name`         | `string` | equals, contains, startsWith, endsWith, in |
| `date_created` | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Members

Path: `mailchimp.db.members.search`

```ts theme={null}
const rows = await corsair.mailchimp.db.members.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field           | Type     | Operators                                  |
| --------------- | -------- | ------------------------------------------ |
| `entity_id`     | `string` | equals, contains, startsWith, endsWith, in |
| `id`            | `string` | equals, contains, startsWith, endsWith, in |
| `list_id`       | `string` | equals, contains, startsWith, endsWith, in |
| `email_address` | `string` | equals, contains, startsWith, endsWith, in |
| `status`        | `string` | equals, contains, startsWith, endsWith, in |
| `full_name`     | `string` | equals, contains, startsWith, endsWith, in |
| `last_changed`  | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***
