Get Danbooru Post
Turn any anime booru post into prompt-ready tags
- IMAGE
- GENERAL_TAGS
- CHARACTER_TAGS
- COPYRIGHT_TAGS
- ARTIST_TAGS
- META_TAGS
- ORIGINAL_WIDTH
- ORIGINAL_HEIGHT
Danbooru is the board whose tag vocabulary is the prompting language for the entire anime model ecosystem - Illustrious, NoobAI, and Pony all learned to read 1girl, long hair, looking at viewer. So if you browse Danbooru for prompt ideas, Get Danbooru Post is the node that turns any post URL into the exact ingredients: the image, the tags split into the board's categories, and the dimensions. One paste, one queue, and the tags are already formatted the way a tag-prompting model wants them.
It's part of DraconicDragon's e621 booru toolkit, and it's one of the pack's cleaner wins: dedicated handlers per site instead of the old node's "guess and fall back to Danbooru" approach. There's no API key, no account, no config - just a URL.
How it works
The node appends .json to the post URL, fetches Danbooru's API response, and reads the tag_string_* fields for each category. For the image it pulls the media_asset variants list and grabs whichever img_size you asked for, falling back to the full file if the variant is missing. Everything rides on curl_cffi impersonating a Firefox browser with a real User-Agent, because Danbooru has long since learned to be picky about plain scripts.
Inputs and outputs that matter
url- a post URL fromdanbooru.donmai.us(the handler also covers thesafebooru.donmai.usanddonmai.moemirrors).img_size-sampleis the sensible default;originalfor the full-res file;none - don't download imageif you only want tags.format_tags- on by default, and it's what makes the output paste-ready: underscores become spaces, parentheses get backslash-escaped so they don't trigger prompt weighting.exclude_tags- a default blocklist (patreon,text,dialogue,conditional dnpand friends) that strips the tags that do nothing in a prompt. Edit the box as you like; the node's parser tolerates underscores or spaces, backslashes or not.
The outputs are IMAGE, GENERAL_TAGS, CHARACTER_TAGS, COPYRIGHT_TAGS, ARTIST_TAGS, META_TAGS, plus ORIGINAL_WIDTH and ORIGINAL_HEIGHT. Note there's no species or contributor output - Danbooru doesn't have those categories, and that's precisely why the pack ships a separate e621 node. If you want tags that genuinely matter for a furry model, grab the e621 one.
Install
Clone or use ComfyUI Manager:
cd ComfyUI/custom_nodes
git clone https://github.com/DraconicDragon/ComfyUI_e621_booru_toolkit
restart, done. Dependencies are just requests, pillow, and curl_cffi.
Gotchas
Danbooru rate-limits and occasionally block bursts of unauthenticated API calls. If you hit a run of failures, slow down rather than hammering it - this node has no retry logic, and a 403 surfaces as a fetch error on the console. And the standing disclaimer for every node in this pack: you're pulling from an imageboard with plenty of NSFW content, so it serves whatever the post holds. For anything on the anime side of the hobby, this is the node to reach for.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | Enter the booru post URL | |
| img_size | COMBO | sample | Select the image size variant to output through 'IMAGE'. Choose 'none' to output a blank image. For e6, anything below sample will be 'preview' |
| format_tags | BOOLEAN | true | Format tags for prompt use. Removes underscores and adds backslashes to brackets |
| trailing_comma | BOOLEAN | false | Appends a comma to the last tag in each output |
| exclude_tags | BOOLEAN | true | Toggle exclusion of tags from output |
| user_excluded_tags | STRING | conditional dnp, sound_warning, unknown_artist, third-party_edit, anonymous_artist, e621, e621 post recursion, e621_comment, patreon, patreon logo, patreon username, instagram username, text, dialogue | Comma separated list of tags to exclude for output (they can include underscores or spaces, with or without backslashes) |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| GENERAL_TAGS | STRING | — |
| CHARACTER_TAGS | STRING | — |
| COPYRIGHT_TAGS | STRING | — |
| ARTIST_TAGS | STRING | — |
| META_TAGS | STRING | — |
| ORIGINAL_WIDTH | INT | — |
| ORIGINAL_HEIGHT | INT | — |