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

# Filtering

> Narrow Zenamu list responses with query parameters.

Filters take **comma-separated numeric IDs** with no spaces:

```bash theme={null}
?lecturerIds=5,10&labelIds=8
```

Values within one parameter are combined with OR — `lecturerIds=5,10` returns
events taught by either lecturer. Different parameters are combined with AND.

## Supported filters

| Parameter     | Classes | Workshops | Matches                                                                                                              |
| ------------- | :-----: | :-------: | -------------------------------------------------------------------------------------------------------------------- |
| `placeIds`    |   Yes   |     —     | The place the event is held at.                                                                                      |
| `lecturerIds` |   Yes   |    Yes    | The main lecturer or any additional lecturer; for a course session with a substitute lecturer, only that substitute. |
| `labelIds`    |   Yes   |    Yes    | Any of the event's tags.                                                                                             |

Workshops have no `placeIds` filter because they carry their own address rather
than referencing a place. See [Workshop](/api/objects/workshop).

When a studio assigns a substitute lecturer to a single course session, that
substitute replaces the course's main and additional lecturers for that session
only. The session matches `lecturerIds` for the substitute, not for the
lecturers it replaced, and its own `lecturerIds` lists only the substitute.
Other sessions of the same course are unaffected.

## Filtering online classes

`placeIds` accepts the special value `-1`, meaning **online** — classes the
studio marked as online:

```bash theme={null}
# Online classes only
?placeIds=-1

# The main studio plus online
?placeIds=3,-1
```

## Numeric IDs, not opaque IDs

Filters expect the **numeric** IDs your studio uses internally, not the opaque
`_id` strings the API returns. A class response carries
`lecturerIds: ["a05e73c81df946b20c3ea8175f6b4e92"]`, but the filter takes
`lecturerIds=5`.

<Note>
  Numeric label IDs come straight from `tags[].id` on any class or workshop.
  Places and lecturers do not expose their numeric ID through the API — ask the
  studio for it, or filter client-side on the `_id` values you already have.
</Note>

An unknown numeric ID simply matches nothing. A malformed value, zero, an
unsupported negative value, or whitespace in the list returns `400`.
