ScrollX Tag Page

Api:Tags

0 sourcesWiki updated 3/4/2026
Browse all Api:Tags images →

About Api:Tags

Table of Contents

This page has details for how to interact with tag records through the API.

01 Record field format

[hr]

NameTypeDetails
[code]id[/code]integer>0
[code]name[/code]string
[code]category[/code]integerincludes [0,1,3,4,5]
[code]post_count[/code]integer>=0
[code]is_deprecated[/code]boolean
[code]created_at[/code]timestamp
[code]updated_at[/code]timestamp

Category

ValueDescription
0General
1Artist
3Copyright
4Character
5Meta

[hr]

02 Associated attributes

[hr]

The following is the list of relations that can be included in the API results (see Help:Common URL Parameters for more info):

NameTypeNumberAvailabilityDetails
[code]wiki_page[/code]wiki pagesingleoptionalWiki page whose title matches the tag name.
[code]artist[/code]artistsingleoptionalArtist whose name matches the tag name.
[code]antecedent_alias[/code]tag aliassingleoptionalAlias where the tag is the antecedent.
[code]consequent_aliases[/code]tag aliasmultipleoptionalAliases where the tag is the consequent.
[code]antecedent_implications[/code]tag implicationmultipleoptionalImplications where the tag is the antecedent.
[code]consequent_implications[/code]tag implicationmultipleoptionalImplications where the tag is the consequent.
[code]dtext_links[/code]dtext linkmultipleoptionalDtext links to the page whose title matches the tag name.

03 Index

[hr]

Returns multiple tag records.

HTTP MethodGET
Base URL[code]/tags.json[/code]
Typeread request
DescriptionThe default order is ID descending.

Search attributes

Search parameters take the following format (see Help:Common URL Parameters for more info):

[code]

search[FIELD]=VALUE

[/code]

The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.

  • Number syntax
  • [code]id[/code]
  • [code]category[/code]
  • [code]post_count[/code]
  • [code]created_at[/code]
  • [code]updated_at[/code]
  • String syntax
  • [code]name[/code]
  • Boolean syntax
  • [code]is_deprecated[/code]
  • Chaining syntax
  • [code]wiki_page[/code]
  • [code]artist[/code]
  • [code]antecedent_alias[/code]
  • [code]consequent_aliases[/code]
  • [code]antecedent_implications[/code]
  • [code]consequent_implications[/code]
  • [code]consequent_implications[/code]
  • [code]dtext_links[/code]

Special search parameters

The following are additional search fields.

  • [code]fuzzy_name_matches[/code] - Shows tags with names that are within a certain percentage of similarity.
  • [code]name_matches[/code] - Normalized wildcard search on the name field.
  • [code]name_normalize[/code] - Normalized wildcard search on the name field that supports multiple tags split by a comma ",".
  • [code]name_or_alias_matches[/code] - Normalized wildcard search on the name field that also checks for aliases where the search term is the antecedent.
  • [code]hide_empty[/code] - Shows tags with a post count of 0 (true) or all tags (false) (Help:Boolean Syntax).
  • [code]is_empty[/code] - Shows tags with a post count of 0 (true) or a post count greater than 0 (false) (Help:Boolean Syntax).

Search order

Using the search parameter [code]order[/code] with one of the following values changes the order of the results.

  • [code]name[/code] - Name ascending.
  • [code]date[/code] - ID descending.
  • [code]count[/code] - Post count descending.
  • [code]similarity[/code] - Orders by similarity to the search term, then by post count descending, then tag name ascending.
  • Only when the [code]fuzzy_name_matches[/code] parameter is used.
  • [code]custom[/code] - Help:Common URL Parameters
  • In order to use this order, [code]search[id][/code] must also be set with a list of comma-separated IDs.

04 Show

[hr]

Returns a single tag record.

HTTP MethodGET
Base URL[code]/tags/$id.json[/code]
Typeread request
Description[code]$id[/code] is the tag ID.

05 Update

[hr]

Updates a single tag record.

HTTP MethodPUT/PATCH
Base URL[code]/tags/$id.json[/code]
Typewrite request
Description[code]$id[/code] is the tag ID.

Update parameters

Tag parameters take the following format (see Help:API Write Requests for more info):

[code]

tag[FIELD]=VALUE

[/code]

  • Optional:
  • [code]is_deprecated[/code]
  • can only be set to [code]false[/code] by admins
  • can only be set to [code]true[/code] if the tag has a wiki page, and either its post count is zero or the user is an admin
  • [code]category[/code] Restricted by user level
  • Member+: < 50 posts
  • Builder+: < 1000 posts
  • Admin+: No limit

06 See also

[hr]

[hr]

Controller<https://github.com/danbooru/danbooru/blob/master/app/controllers/tags_controller.rb>
Model<https://github.com/danbooru/danbooru/blob/master/app/models/tag.rb>
Policy<https://github.com/danbooru/danbooru/blob/master/app/policies/tag_policy.rb>

Api:Tags Gallery

0 visible posts on page 1