Imouto.BooruParser 2.0.6

.NET 7.0
dotnet add package Imouto.BooruParser --version 2.0.6
NuGet\Install-Package Imouto.BooruParser -Version 2.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Imouto.BooruParser" Version="2.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Imouto.BooruParser --version 2.0.6
#r "nuget: Imouto.BooruParser, 2.0.6"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Imouto.BooruParser as a Cake Addin
#addin nuget:?package=Imouto.BooruParser&version=2.0.6

// Install Imouto.BooruParser as a Cake Tool
#tool nuget:?package=Imouto.BooruParser&version=2.0.6


NuGet license

The dotnet library for retrieving info from booru sites (,,, You can get individual posts, tags/notes history, and search by tags. Install as NuGet package:

Install-Package Imouto.BooruParser
<PackageReference Include="Imouto.BooruParser" Version="2.*" />

Version 2.0 released!

The new version of this library has been released. It's a complete rewrite and has a lot of breaking changes. Please don't update unless you're ready to spent some time in refactoring and reading.

The new version has gelbooru as partly supported booru. It doesn't provide a way to get tags or notes history, but you can search and retrieve posts by id or md5. To consume this library you should use IBooruApiLoader interface. The library provides following implementations, one for each booru:

var loader = new DanbooruApiLoader(...);
var loader = new YandereApiLoader(...);
var loader = new SankakuApiLoader(...);
var loader = new GelbooruApiLoader(...);

The recommended way to consume them is to regiter them in your container:


// It'ts nessesary for Sankaku auth management. 
// You can skip it, if you don't plan to access sankaku with authorization.

But you can also register them yourself. You also need to provide configuration for booru if you want to have more relaxed limits:


Each settings has PauseBetweenRequestsInMs param which defines a pause between requests. 0 means you can run your requests in parallel and any positive number means that all requests would be called with the provided pause in ms between them. It's important to have some reserves to not get banned.

! Sankaku is a difficult case for the authorization. It requires access and refresh tokens (you can extract them from cookies), but refresh token has to be updated. So SankakuSettings has a callback method SaveTokensCallbackAsync that will be called, when it's necessary to update refresh and access tokens. It's you responsibility to store them somewhere and pass on the next application start.

Simplest usage

var loader = new DanbooruApiLoader(
    new PerBaseUrlFlurlClientFactory(), 
    Options.Create(new DanbooruSettings()))
var post = await loader.GetPostAsync(5628013);

Version 1.x.x

Simplest usage

var username = "user";~~~~
var apiKey = "HBArbAk4WcKTSeAfsyBO";
var delayBetweenRequestsInMs = 1240;

var danbooruLoader = new DanbooruLoader(username, apiKey, delayBetweenRequestsInMs);
var post = await danbooruLoader.LoadPostAsync(5628013);
Product Versions
.NET net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.6 52 12/28/2022
2.0.4 61 11/2/2022
2.0.3 59 10/30/2022
2.0.2 55 10/29/2022
1.18.1 229 9/17/2022
1.17.6 215 9/15/2022
1.17.5 211 9/15/2022
1.17.4 211 9/15/2022
1.17.3 208 9/15/2022
1.17.2 214 9/15/2022
1.17.1 215 9/15/2022
1.17.0 209 9/15/2022
1.16.1 225 9/8/2022
1.15.0 240 5/30/2022
1.14.1 250 5/2/2022
1.14.0 202 1/13/2022
1.13.0 179 1/11/2022
1.12.0 346 1/3/2021
1.11.0 451 5/2/2020
1.10.0 366 4/25/2020
1.9.0 562 2/7/2020
1.8.0 399 1/30/2020
1.7.0 432 12/3/2019
1.6.0 479 8/25/2019
1.5.0 429 8/25/2019
1.4.0 434 8/25/2019
1.3.0 505 3/16/2019
1.2.0 971 3/26/2018
1.1.0 860 3/25/2018
1.0.1 864 1/22/2018
1.0.0 898 9/15/2017