---
id: tags-query-all
slug: /apis/tags/query-all
title: 'Query All Tags'
description: 'Retrieve every tag in use across the instance with usage counts, via GET ~/api/tags/all.'
sidebar_label: 'Query All Tags'
sidebar_position: 3
tags: ['api', 'tags', 'query']
---

Returns every tag in use across the instance, with the same usage breakdown as
[querying a single tag](/apis/tags/query).

## Request

```text
GET ~/api/tags/all
```

```bash title="Request"
curl "https://{host}/{instance}/api/tags/all" \
  -H "Authorization: Bearer <access-token>" \
  -H "Accept: application/json"
```

## Response

The response is a **JSON object, not an array**. Each key is a tag name; each value carries the
tag's stored form plus its counts.

```json title="200 OK"
{
  "acceptanceTestDetails": {
    "tag": "AcceptanceTestDetails",
    "colorName": "yellow500",
    "count": 1,
    "visibleCount": 1
  },
  "acceptanceTestDetails 2": {
    "tag": "AcceptanceTestDetails 2",
    "colorName": "blue500",
    "count": 1,
    "visibleCount": 1
  },
  "acceptanceTestDetails 3": {
    "tag": "AcceptanceTestDetails 3",
    "colorName": null,
    "count": 1,
    "visibleCount": 1
  }
}
```

| Field          | Type    | Meaning                                                       |
| -------------- | ------- | ------------------------------------------------------------- |
| `tag`          | string  | The tag as stored, with its original casing.                  |
| `colorName`    | string  | The display colour assigned to the tag, e.g. `yellow500`. May be `null`. |
| `count`        | integer | Total usages across the whole instance.                       |
| `visibleCount` | integer | Usages on assets the calling member can see.                  |

:::warning Read the value, not the key
The object keys are **not** the tag strings. They are passed through the API's camel-casing JSON
serializer, which lowercases the first character — the tag `AcceptanceTestDetails` appears under
the key `acceptanceTestDetails`.

**The `tag` field inside each value is the authoritative tag string.** That is what to display
and what to pass to [merge](/apis/tags/merge) or [remove](/apis/tags/remove). Keying off the
object key will usually still work, because tag matching is case-insensitive, but you will
render the wrong casing to your users.
:::

## Notes

- There is **no paging** on this endpoint. On an instance with a large, uncurated tag vocabulary
  the response can be substantial. Enable gzip (`Accept-Encoding: gzip`) and cache the result
  rather than calling it per page view.
- `visibleCount` is relative to the calling member. Two members hitting this endpoint will get
  different numbers against the same `count`.
- A tag with `visibleCount` of `0` and a non-zero `count` means the tag exists but only on
  assets outside the caller's scope visibility.

## Finding Unused or Near-Duplicate Tags

The typical vocabulary-cleanup workflow starts here: pull the full list, sort by `count`
ascending to find one-off tags, and look for casing and spacing variants of the same intent
(`RegressionTests`, `Regression Tests`, `RegTests`). Then collapse them with
[merge](/apis/tags/merge).

## Related Topics

- [Query a tag](/apis/tags/query)
- [Merge tags](/apis/tags/merge)
- [Tags overview](/apis/tags)
