Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป Listing Upload Hot Changes Help
A list of tags to help categorize this search. Space delimited.

Search

Blacklisted (help)

  • guro
  • scat
  • furry -rating:g
Disable all Re-enable all

Tags

Options

Related

  • Deleted
  • Random
  • History
  • Discussions
  • Count
  • Posts Wiki Search »
  • Size
    • Small
    • Medium
    • Large
    • Huge
    • Huge
    • Gigantic
    • Absurd
    • Show scores
  • Edit

    Table of Contents
    • 1. Record field format
    • 2. Associated attributes
    • 3. Nomenclature
    • 4. Actions
      • 4.01 Index
      • 4.02 Show
      • 4.03 Create
      • 4.04 Update
      • 4.05 Revert
    • 5. See also
    • 6. External links

    The following includes the details of how to interface with the post records through the API.

    Record field format

    NameTypeDetails
    idinteger>0
    uploader_idinteger>0
    approver_idinteger>0
    tag_stringstring
    tag_string_generalstring
    tag_string_artiststring
    tag_string_copyrightstring
    tag_string_characterstring
    tag_string_metastring
    ratingstring or nullincludes [g, s, q, e]
    parent_idinteger or null>0
    sourcestring
    md5string
    file_urlstring
    large_file_urlstring
    preview_file_urlstring
    file_extstring
    file_sizeinteger
    image_widthinteger
    scoreinteger
    fav_countinteger
    tag_count_generalinteger
    tag_count_artistinteger
    tag_count_copyrightinteger
    tag_count_characterinteger
    tag_count_metainteger
    last_comment_bumped_attimestamp or null
    last_noted_attimestamp or null
    has_childrenboolean
    image_heightinteger
    created_attimestamp
    updated_attimestamp

    Associated attributes

    NameTypeNumberAvailabilityDetails
    uploaderusersinglerequired
    updaterusersinglerequired
    approverusersingleoptional
    parentpostsingleoptional
    childrenpostmultipleoptional
    artist_commentaryartist_commentarysingleoptional
    notesnotemultipleoptional
    commentscommentmultipleoptional
    flagspost flagmultipleoptional
    appealspost appealsmultipleoptional
    approvalspost approvalmultipleoptional
    replacementspost replacementmultipleoptional
    pixiv_ugoira_frame_dataPixiv ugoira frame datasingleoptional

    Nomenclature

    • Plural form: "posts"
      • Used in the URL pathname
    • Singular form: "post"
      • Used for write parameters (Help:API Write Requests)
    • Versions: API:Post versions

    Actions

    These are the various actions that can be done with upload records.

    Index
    HTTP MethodGET
    Base URL/posts.json
    Typeread request
    DescriptionThe default order is ID descending
    Index parameters
    • tags - The post query to search for using tags and metatags (Help:Cheatsheet).
      • post[tags] can also be used.
    • random - Selects a random sampling under the post query.
    • format - Chooses which format to return. Can be: html, json, xml, atom.
    • md5 - Search for an MD5 match. Takes priority over all other parameters.
    Show
    HTTP MethodGET
    Base URL/posts/$id.json
    Typeread request
    Description$id is the post ID
    Create
    HTTP methodPOST
    Base URL/posts.json
    Typewrite request
    Create parameters
    • Mandatory:
      • upload_media_asset_id
    • Optional:
      • tag_string
      • rating
      • parent_id
      • source
      • artist_commentary_title
      • artist_commentary_desc
      • translated_commentary_title
      • translated_commentary_desc
      • is_pending - only matters for users with unrestricted uploads.
    Update
    HTTP MethodPUT/PATCH
    Base URL/posts/$id.json
    Typewrite request
    Description$id is the post ID
    Update parameters
    • Optional:
      • tag_string
      • old_tag_string
      • parent_id
      • old_parent_id
      • source
      • old_source
      • rating
      • old_rating
      • has_embedded_notes
    Revert
    HTTP MethodPUT/PATCH
    Base URL/posts/$id/revert.json
    Typewrite request
    Description
    Revert parameters
    • Required:
      • version_id - The post version ID to revert to.

    See also

    • Help:Common URL Parameters
    • Help:API

    External links

    Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/posts_controller.rb
    Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/post.rb
    Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/post_policy.rb

    View wiki

    No posts found.

    1
    Terms / Privacy / Upgrade / Contact /