2020-01-01 22:37:59 +01:00
|
|
|
---
|
|
|
|
title: Tag
|
|
|
|
description: Represents a hashtag used within the content of a status.
|
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: entities
|
|
|
|
---
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"name": "nowplaying",
|
|
|
|
"url": "https://mastodon.social/tags/nowplaying",
|
|
|
|
"history": [
|
|
|
|
{
|
|
|
|
"day": "1574553600",
|
|
|
|
"uses": "200",
|
|
|
|
"accounts": "31"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"day": "1574467200",
|
|
|
|
"uses": "272",
|
|
|
|
"accounts": "39"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"day": "1574380800",
|
|
|
|
"uses": "345",
|
|
|
|
"accounts": "40"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"day": "1574294400",
|
|
|
|
"uses": "366",
|
|
|
|
"accounts": "46"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"day": "1574208000",
|
|
|
|
"uses": "226",
|
|
|
|
"accounts": "32"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"day": "1574121600",
|
|
|
|
"uses": "217",
|
|
|
|
"accounts": "42"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"day": "1574035200",
|
|
|
|
"uses": "214",
|
|
|
|
"accounts": "34"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Base attributes
|
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `name` {#name}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** The value of the hashtag after the \# sign.\
|
|
|
|
**Type:** String\
|
2020-01-01 22:37:59 +01:00
|
|
|
**Version history:** Added in 0.9.0
|
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `url` {#url}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** A link to the hashtag on the instance.\
|
|
|
|
**Type:** String \(URL\)\
|
2020-01-01 22:37:59 +01:00
|
|
|
**Version history:** Added in 0.9.0
|
|
|
|
|
|
|
|
## Optional attributes
|
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `history` {#history}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** Usage statistics for given days.\
|
|
|
|
**Type:** Array of [History]({{< relref "history.md" >}})\
|
2020-01-01 22:37:59 +01:00
|
|
|
**Version history:** Added in 2.4.1
|
|
|
|
|
|
|
|
## See also
|
|
|
|
|
2020-08-10 23:01:50 +02:00
|
|
|
* [Status\#tags]({{< relref "status.md#tags" >}})
|
|
|
|
* [GET /api/v1/featured\_tags/suggestions]({{< relref "../methods/accounts/featured_tags.md#suggested-tags-to-feature" >}})
|
2020-01-01 22:37:59 +01:00
|
|
|
|
|
|
|
{{< page-ref page="status.md" >}}
|
|
|
|
|
|
|
|
{{< page-ref page="methods/search.md" >}}
|
|
|
|
|
|
|
|
{{< caption-link url="https://github.com/tootsuite/mastodon/blob/master/app/serializers/rest/tag_serializer.rb" caption="app/serializers/rest/tag\_serializer.rb" >}}
|
|
|
|
|
|
|
|
|
|
|
|
|