---
updatedAt: 2026-06-01T20:58:28.000Z
agentTools:
  projectIndex: https://developers.unitmap.com/llms.txt
---

# TagsCollection

An iterable group of [Tags](https://developers.unitmap.com/docs/js-api-tags) contained on a [Level](https://developers.unitmap.com/docs/js-api-level) .

> 🚧 **Deprecated.** `TagsCollection` is part of the Levels API and is deprecated in favor of the Floors API. Query floors with [`UnitMap.floors()`](https://developers.unitmap.com/docs/js-api-unitmap) instead.

## TagsCollection.only(\[keys])

Get the TagsCollection on the entity that only match the given keys.

#### Arguments

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Argument
      </th>

      <th>
        Type
      </th>

      <th>
        Default Value
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        keys
      </td>

      <td>
        Array
      </td>

      <td>
        undefined
      </td>

      <td>
        The keys to filter by
      </td>
    </tr>
  </tbody>
</Table>

#### Returns

An object containing the desired `TagsCollection`

## TagsCollection.except(\[keys])

Get the TagsCollection on the entity that does not match the given keys.

#### Arguments

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Argument
      </th>

      <th>
        Type
      </th>

      <th>
        Default Value
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        keys
      </td>

      <td>
        Array
      </td>

      <td>
        undefined
      </td>

      <td>
        The keys to filter by
      </td>
    </tr>
  </tbody>
</Table>

#### Returns

An object containing the desired `Tags` exceptions.

## TagsCollection.all()

Get all Tags on the entity.

#### Returns

An object containing all `Tags`.