Searches boorus for images using some js magic
Switch branches/tags
Clone or download
AtlasTheBot Add a check for Boorus returning success: false
booru will throw a BooruError with the message/reason the Booru gave
Latest commit 3986607 Nov 8, 2018


A node package to do stuff on various boorus, like search 'em


  • Able to search 17 different boorus (check sites.json)
  • Also alias support so you can be lazy (sb for
  • Promises because they're magical
  • Choose the amount of images to get
  • Random support for all sites, using order:random on sites that support it and using a bit of magic on sites that don't
  • Coming soon: Support for more than just searching


npm i --save booru

Or if you use yarn

yarn add booru


const Booru = require('booru')

// Instantiate a booru and search it
const e9 = new Booru('e9')
let imgs = await['cute', 'cat'], {limit: 3})

// Log the url to first post found

// Don't instantiate, plus some demo error-checking, [tag1, tag2], {limit: 1, random: false})
.then(images => {
  //Log the direct link to each image
  for (let image of images) {
.catch(err => {
  if ( === 'BooruError') {
    //It's a custom error thrown by the package
  } else {
    //This means I messed up. Whoops.


Available here:



Change from request-promise-native to snek-fetch


Add 2 new boorus (
Various Derpibooru fixes


What are the properties of a Post?

The basic structure of a Post object looks like:

Post {
  _data: {/*...*/},                     // The raw data from the booru
  file_url: '', // The direct link to the image, ready to post
  id: '124125',                         // The image ID, as a string
  tags: ['cat', 'cute'],                // The tags, split into an Array
  score: 5,                             // The score as a Number
  source: '',     // Source of the image, if supplied
  rating: 's',                          // Rating of the image
  createdAt: Date,                      // The `Date` this image was created at

s: 'Safe' q: 'Questionable' e: 'Explicit' u: 'Unrated'

Derpibooru has Safe, Suggestive, Questionable, Explicit, although Suggestive will be shown as q in <Post>.rating

Can I contribute?

Sure! Just fork this repo, push your changes, and then make a PR.

I'll accept PR based on what they do and code style (Not super strict about it, but it's best if it roughly follows the rest of the code)


Why not?

This is terrible code



It's GPLv3