Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป
Search Changes Help | Posts (0) History
  • Help
guro
scat
furry -rating:g

Recent Changes (all)

  • shaman king
  • battle girl high school
  • cecilia immergreen (new year)
  • sasaki moe (nekommokuwan)
  • tachimiboshi makiri
  • radical pop gaming
  • ai-generated
  • thaumiel (zenless zone zero)
  • sakuramiya haru
  • isshin-ji
  • figure four sitting
  • satake minako (poka poka service)
  • fujimaru ritsuka (female) (fgo fes. 2026)
  • baobhan sith (fate)
  • baobhan sith (fgo fes. 2026) (fate)
  • sigma (curtain damashii) (fate)
  • no name assassin (curtain damashii) (fate)
  • jester karture (curtain damashii)
  • flat escardos (curtain damashii)
  • richard i (fate)
  • sajou ayaka (curtain damashii) (fate/strange fake)
  • guided headpat
  • richard i (curtain damashii) (fate)
  • guided fingering
  • guided hand on cheek

Options

  • Wiki History
  • Discussions
  • What Links Here

api:tags

Table of Contents
  • 01. Record field format
  • 02. Associated attributes
  • 03. Index
  • 04. Show
  • 05. Update
  • 06. See also
  • 07. External links

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

01 Record field format


NameTypeDetails
idinteger>0
namestring
categoryintegerincludes [0,1,3,4,5]
post_countinteger>=0
is_deprecatedboolean
created_attimestamp
updated_attimestamp
Category
ValueDescription
0General
1Artist
3Copyright
4Character
5Meta

02 Associated attributes


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

NameTypeNumberAvailabilityDetails
wiki_pagewiki pagesingleoptionalWiki page whose title matches the tag name.
artistartistsingleoptionalArtist whose name matches the tag name.
antecedent_aliastag aliassingleoptionalAlias where the tag is the antecedent.
consequent_aliasestag aliasmultipleoptionalAliases where the tag is the consequent.
antecedent_implicationstag implicationmultipleoptionalImplications where the tag is the antecedent.
consequent_implicationstag implicationmultipleoptionalImplications where the tag is the consequent.
dtext_linksdtext linkmultipleoptionalDtext links to the page whose title matches the tag name.

03 Index


Returns multiple tag records.

HTTP MethodGET
Base URL/tags.json
Typeread request
DescriptionThe default order is ID descending.
Search attributes

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

search[FIELD]=VALUE

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

  • Number syntax
    • id
    • category
    • post_count
    • created_at
    • updated_at
  • String syntax
    • name
  • Boolean syntax
    • is_deprecated
  • Chaining syntax
    • wiki_page
    • artist
    • antecedent_alias
    • consequent_aliases
    • antecedent_implications
    • consequent_implications
    • consequent_implications
    • dtext_links
Special search parameters

The following are additional search fields.

  • 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 tags with a post count of 0 (true) or all tags (false) (Help:Boolean syntax).
  • is_empty - 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 order with one of the following values changes the order of the results.

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

04 Show


Returns a single tag record.

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

05 Update


Updates a single tag record.

HTTP MethodPUT/PATCH
Base URL/tags/$id.json
Typewrite request
Description$id is the tag ID.
Update parameters

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

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

06 See also


  • Help:Common URL Parameters
  • Help:API

07 External links


Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/tags_controller.rb
Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/tag.rb
Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/tag_policy.rb
Terms / Privacy / Upgrade / Contact /