---
title: The Tag Object
description: An object that represents a tag in a space
url: https://storyblok.com/docs/api/management/tags/the-tag-object
---

# The Tag Object

An object that represents a tag in a space.

Each space can have separate tags with the same name. The Management API can retrieve all of them with the `all_tags` parameter. The response then includes two properties that represent different data points.

| Property | Counts |
| --- | --- |
| `taggings_count` | The number of tags with this name that exist in the space, or  <br>The number of draft or published stories with this tag, or  <br>The number of deleted stories with this tag |
| `tag_on_stories` | The number of draft or published stories with this tag |

The following scenarios illustrate possible property values, depending on the number of stories associated with each tag and the status of the stories (draft/published, deleted):

-   For tags assigned to draft or published stories, `taggings_count` and `tag_on_stories` return the _same_ number of tagged stories.
    
-   For tags assigned only to _deleted_ stories, `taggings_count` returns the number of tagged stories, and `tag_on_stories` returns `0`.
    
-   For unassigned tags, `taggings_count` returns `1`, and `tag_on_stories` returns `0`.
    

For example, when you assign a tag to five stories and then delete all five stories, `taggings_count` returns `5`, but `tag_on_stories` returns `0`. If you delete only four stories, both properties return `1`.

## Properties

-   `name` (string)
    
    The name of the tag.
    
-   `taggings_count` (number)
    
    -   The number of tags with this name that exist in the space, or - The number of draft or published stories with this tag, or - The number of deleted stories with this tag The minimum value of `taggings_count` is `1`, not `0`.
    
-   `tag_on_stories` (number)
    
    Only visible when passing the `all_tags` parameter. The number of stories currently associated with the tag, corresponding to the **Assigned items** column in [the **Tags** tab](https://www.storyblok.com/docs/manuals/stories#tags).
    

Example Object

```json
{
 "name": "Editor's choice",
 "taggings_count": 1,
 "tag_on_stories": 1
 },
 {
 "name": "test-tag",
 "taggings_count": 1,
 "tag_on_stories": 0
 }
```

## Pagination

-   [Previous: Tag Bulk Association](/docs/api/management/tags/tag-bulk-association)
-   [Next: Update a Tag](/docs/api/management/tags/update-a-tag)
