Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Danbooru apps

Moekura answers Danbooru’s API too, so apps and tools made for Danbooru can use a Moekura site: point them at the site as if it were a Danbooru instance. Logged out, they see what visitors see. To log in, make an API key under Settings → API keys and give the app your name and the key (not your password).

Put Danbooru: in front of a site URL:

gallery-dl "Danbooru:https://booru.example.com/posts?tags=cat"
gallery-dl -u yourname -p mka_… "Danbooru:https://booru.example.com/posts?tags=cat"

Or add the site once in gallery-dl’s configuration, and use its URLs as they are:

{
  "extractor": {
    "Danbooru": {
      "mybooru": { "root": "https://booru.example.com" }
    },
    "mybooru": { "username": "yourname", "password": "mka_…" }
  }
}

CI checks gallery-dl against every change.

The apps below aren’t tested automatically; if one trips over something, please open an issue.

Grabber

Add a source with the site’s address and choose Danbooru (2.0) as its type. In the source’s settings, enter your name and your API key under login.

Boorusama

Add a booru with the site’s address and choose Danbooru as its engine, then log in with your name and your API key.

What works

EndpointNotes
/posts.json, /posts/{id}.json, /posts/random.json, /counts/posts.jsonsearch with the site’s syntax; page takes numbers, b<id> and a<id>; up to 200 per page; only= picks fields
PUT /posts/{id}.jsonpost[tag_string] (with post[old_tag_string]), post[rating], post[source], post[parent_id]
/post_versions.jsonby search[post_id]
/tags.json, /autocomplete.json, /related_tag.jsonrelated tags are estimated from a search’s newest 200 posts; for a single tag, wiki_page_tags are the tags its wiki page links to
/tag_aliases.json, /tag_implications.json
/tag_versions.jsonby search[tag_id], search[name], search[updater_id] or search[updater_name]
/wiki_pages.json, /wiki_pages/{title or id}.jsonby search[title], search[other_names_match] (* wildcards; without one, the whole name) or search[other_names_include_any]
/profile.json, /users.json, /users/{id}.jsonlevels follow roles: Member 20, Contributor 35, Janitor 37, Moderator 40, Admin 50
/favorites.json, /favorites/{post_id}.json, /posts/{id}/favorites.json
/posts/{id}/votes.json, /post_votes.jsononly your own votes are listed
/artists.json, /artists/{id}.json, /artist_urls.json, /artist_versions.jsonread-only; artists by search[name], search[any_name_matches], search[url_matches] (any page of the artist’s), search[is_banned], search[is_deleted] or search[id], each with its urls; URLs by search[artist_id] or search[url_matches]; versions by search[artist_id], search[updater_id] or search[updater_name]
/artist_commentaries.json, /artist_commentaries/{post_id}.json, /posts/{id}/artist_commentary.json, /artist_commentary_versions.jsona commentary’s id is its post’s; by search[post_id], search[text_matches], search[original_present] or search[translated_present]; PUT /artist_commentaries/create_or_update.json sets artist_commentary[post_id]’s texts (those left out stay)
/media_assets.json, /media_assets/{id}.json, /media_metadata.jsona post’s file has the post’s id; files by search[id] or search[md5]; metadata by search[media_asset_id], as Group:Tag pairs like EXIF:Make
/post_replacements.jsonread-only, by search[post_id] or search[creator_id]
/iqdb_queries.jsonsearching by image: GET with search[url] or search[post_id], or POST a file too; [{post_id, score, post}], score in percent
/wiki_page_versions.json, /pool_versions.jsonwiki versions by search[wiki_page_id], search[title], search[updater_id] or search[updater_name]; pool versions by search[pool_id] or the updater, with added_post_ids and removed_post_ids
/explore/posts/popular.json, /explore/posts/viewed.jsonthe best-scored and most viewed posts of a date’s day, or with scale, week or month
/explore/posts/searches.json, /explore/posts/missed_searches.json[query, count] pairs: the searches made most, and those that most often found nothing, by date and scale like the posts
/comments.json, /comments/{id}.jsonlisted newest first, by search[post_id], search[creator_id] or search[creator_name]; page takes numbers and b<id>; post with comment[post_id] and comment[body], and change or delete your own
/comments/{id}/votes.json, /comment_votes.jsononly your own votes are listed
/pools.json, /pools/{id}.jsonby search[name_matches], search[name_contains], search[id] or search[category]; post_ids lists the posts you can see
/favorite_groups.json, /favorite_groups/{id}.jsonby search[creator_id] or search[creator_name], otherwise yours
/notes.json, /notes/{id}.json, /note_versions.jsonnotes by search[post_id] (one or more posts); versions by search[post_id] or search[note_id]; read-only
POST /uploads.json, /uploads/{id}.jsonthe first step of an upload: a file as upload[files][0], or a link as upload[source]; its upload, upload media asset and media asset share one id
POST /posts.jsonthe second step: upload_media_asset_id with post[tag_string], post[rating], post[source] and optionally post[parent_id]; upload limits apply. Uploads not made into posts within a day are removed
/ai_tags.jsonthe tagger’s suggestions, newest posts first, by search[post_id] (or search[media_asset_id], the same number), search[tag_name], search[tag_id], search[is_posted] and search[score] (>=50, 50..90); score is 0 to 100
/saved_searches.jsonyours; add with saved_search[query] and saved_search[label_string], and delete

What doesn’t

  • Forums and messages don’t exist in Moekura: their lists are empty, and single ones are “not found”.
  • Favorites and your votes on posts and comments have no ids of their own: their id is the post’s or comment’s.
  • Pools, favorite groups and notes are read-only here; change them on the site or with Moekura’s API.
  • Responses are JSON only, not XML.