Booru Search API

I provide an API for those who are wanting to search many booru sites easily.

Supported response types

The API supports the following response types.

Type Note
html This is used by this site for results shown.
json JavaScript Object Notation responses.
rss RSS Feed of images.
download Special case with two types, html and text, that only returns a list of image urls found.
headerimage Special case for header image on front page.

html, json, rss, and download all responds to the available options listed below with the exceptions as below:
rss: There is no children response.
download: This only ever will list urls and does not work with md5, url, or children responses.

Querying by MD5

To grab a post by it's MD5, use the following URL: https://cure.ninja/booru/api/json/md5/d3352244080ab8c04980bb1fba5848aa

Querying by URL

To grab a post by it's URL, use the following URL: https://cure.ninja/booru/api/json/url/?url=http%3A%2F%2Fdonmai.us%2Fdata%2Feae4828342217c4498d6d9831a4558ca.jpg

Receiving a posts children

To grab children of a post, use the following URL: https://cure.ninja/booru/api/json/children/9f0dc529faafc60872a3aab70ed520a7

Querying by All Posts

Querying all posts works as follows: https://cure.ninja/booru/api/json/{page}

Replace {page} with the page number you would like to receive. Results are always limited to 96 per page.

Passing the argument q will pass a query to filter the results. There are many available available functions within a query to help narrow down a search.

Function Notes
width: You can query in many ways baised on width. For example width:<=1920 width:<1920 width:>=1920 width:>1920 width:1920,lte width:1920,gt
height: Same as width:, but with the height
aspect: Filter based on aspect. Examples aspect:4:3 aspect:16/9,ct aspect:1.7777777777778,0.001
date: Filters by the upload date. Examples date:1/1/15 date:1/1/15-1/2/15 date:today_at_5_AM
hash: Filter by the hash. md5: also exists for the same thing.
rating: Filter by the rating of the content.
created: Filter to an exact unix time stamp.
tag: This is for if you want a specific tag and not possibly a tag that contains the tag within it. Example. ore_no_imouto_ga_konna_ni_kawaii_wake_ga_nai contains many words that doesn't especially have to do with it. If you want to specifically search for imouto, you can use tag:imouto
url: This contains basically the components to build the URL to an image. You can use this function to filter for a specific file type or a specific booru site. Examples url:webm url:gif url:danbooru url:gelbooru

Passing the argument f will filter the results by it's quality. Available qualities are as follows:

Name Value Notes
Safe s Default
Questionable q
Explicit e
Any a

Passing the argument s will set a size limit (how many posts are returned) and can be any number between 1 and 1000.

Passing the argument o will set the order in which to sort the images. Available orders are as follows:

Name Value Notes
Random Order r
No Order n
Aspect asc aa
Aspect desc a
Width asc wa
Width desc w
Height asc ha
Height desc h
Date asc da
Date desc d Default

Passing the argument w will filter results by a width value.

Passing the argument wc sets the width constraint. Available options are as follows:

Name Value Notes
Equal to e Default
Less than or equal to lte
Less than lt
Greater than or equal to gte
Greater than gt

Passing the argument h will filter results by a height value.

Passing the argument hc sets the height constraint. Available options are as follows:

Name Value Notes
Equal to e Default
Less than or equal to lte
Less than lt
Greater than or equal to gte
Greater than gt

Passing the argument a will filter results by a aspect ratio. Ratio can be 16/9, 16:9, or actual number (1.77777777).

Passing the argument ac sets the aspect constraint. You can provide ether a real number or one of the options that follows:

Name Value Notes
Equal to e +- 0.0001 Default
Close to ct +- 0.2

Passing the argument l only provides limited info on the post making response quicker. Look to see if the information is enough for you.

All arguments are optional.

Special for RSS

There are some parameters only available for RSS which are listed below.

Parameter Note
maxsize Max size (width/height) of the image to scale down if too large.
Using 1 will set it to not limit size.
Default is 1024
maxwidthonly Max size only applies to width.
0 means no and 1 means yes.
Default is no
preview Loads preview instead of full image.
0 means full image and 1 means preview.
Full image by default.