api:tags
The following includes the details of how to interface with the tag records through the API.
Record field format
Name | Type | Details |
---|---|---|
id |
integer | >0 |
name |
string | |
category |
integer | includes [0,1,3,4,5] |
post_count |
integer | >=0 |
is_locked |
boolean | |
created_at |
timestamp | |
updated_at |
timestamp |
Associated attributes
Name | Type | Number | Availability | Details |
---|---|---|---|---|
wiki_page |
wiki page | single | optional | |
artist |
artist | single | optional | |
antecedent_alias |
tag alias | single | optional | Alias where the tag is the antecedent. |
consequent_aliases |
tag alias | multiple | optional | Aliases where the tag is the consequent. |
antecedent_implications |
tag implication | multiple | optional | Implications where the tag is the antecedent. |
consequent_implications |
tag implication | multiple | optional | Implications where the tag is the consequent. |
Nomenclature
- Plural form: "tags"
- Used in the URL pathname
- Singular form: "tag"
- Used for write parameters (Help:API Write Requests)
- Versions: none
Actions
These are the various actions that can be done with tag records.
Index
The base URL is GET /tags.json
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
id
category
post_count
created_at
updated_at
- Text syntax
name
- Boolean syntax
is_locked
Special search parameters
-
fuzzy_name_matches
- Shows tags with names that are within a certain percentage of similarity. -
name_matches
- Normalized wildcard search on the name field. -
name_normalize
- Normalized wildcard search on the name field that supports multiple tags split by a comma ",". -
name_or_alias_matches
- Normalized wildcard search on the name field that also checks for aliases where the search term is the antecedent. -
hide_empty
- Shows only tags that have a post count greater than 0 (Help:Boolean syntax). -
has_wiki
- Shows tags that do or do not have a wiki (Help:Boolean syntax). -
has_artist
- Shows tags that do or do not have an artist (Help:Boolean syntax). -
order
- Sets the order of results. -
name
- Alphabetical order on the name. -
date
- Orders by ID descending. -
count
- Orders by post count. -
similarity
- Orders by similarity to the search term. - Only when the
fuzzy_name_matches
parameter is used.
Note: The default order is ID descending.
Show
The base URL is GET /tags/$id.json where $id is the tag ID.
Update
The base URL is PUT /tags/$id.json where $id is the tag ID.
Update parameters
- Optional:
-
category
Restricted by user level - Member+: < 50 posts
- Builder+: < 1000 posts
- Restricted to Moderator+
is_locked
Autocomplete
The base URL is POST /tags/autocomplete.json
Autocomplete parameters
- Required
-
name_matches
- Normalized wildcard search on the name field. - Returns up to 10 matches
Note: The default order is by post count, with an optional weight applied (Builder+ only).
Autocomplete format
Name | Type | Details |
---|---|---|
name |
string | |
category |
integer | includes [0,1,3,4,5] |
post_count |
integer | >=0 |
antecedent_name |
string or null | Antecedent name if found through an alias. |
source |
string | includes [exact, prefix, alias, correct] (Builder+ only) |
weight |
float | <=1.0 && >0.0; The weight applied to the post count when ordering results. |