A C# wrapper for the Nekos.Best API, which serves fully SFW, high quality anime images and GIFs. All endpoints are available through two APIs: ActionsApi for action-based GIFs and CategoryApi for image categories.
If you find any bugs or want a feature added, create an issue.
dotnet add package NekosBestApiNetThe constructor takes a client name string used as the User-Agent header.
using NekosBestApiNet;
var api = new NekosBestApi("MyAppName");
var result = await api.ActionsApi.Hug();
Console.WriteLine(result.Results[0].Url);All endpoints accept an optional amount parameter (defaults to 1).
var results = await api.ActionsApi.Pat(amount: 5);
foreach (var r in results.Results)
Console.WriteLine(r.Url);You can provide your own HttpClient. You must set BaseAddress manually.
using System.Net.Http;
using NekosBestApiNet;
var httpClient = new HttpClient
{
BaseAddress = new Uri("https://nekos.best/api/v2")
};
var api = new NekosBestApi(httpClient);using NekosBestApiNet;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddSingleton(new NekosBestApi("MyAppName"));
var provider = services.BuildServiceProvider();
var api = provider.GetRequiredService<NekosBestApi>();
var result = await api.ActionsApi.Hug();
Console.WriteLine(result.Results[0].Url);| Method | Endpoint |
|---|---|
Angry |
/angry |
Baka |
/baka |
Bite |
/bite |
Bleh |
/bleh |
Blowkiss |
/blowkiss |
Blush |
/blush |
Bonk |
/bonk |
Bored |
/bored |
Carry |
/carry |
Clap |
/clap |
Confused |
/confused |
Cry |
/cry |
Cuddle |
/cuddle |
Dance |
/dance |
Facepalm |
/facepalm |
Feed |
/feed |
Happy |
/happy |
Handhold |
/handhold |
Handshake |
/handshake |
Highfive |
/highfive |
Hug |
/hug |
Kabedon |
/kabedon |
Kick |
/kick |
Kiss |
/kiss |
Laugh |
/laugh |
Lappillow |
/lappillow |
Lurk |
/lurk |
Nod |
/nod |
Nom |
/nom |
Nope |
/nope |
Nya |
/nya |
Pat |
/pat |
Peck |
/peck |
Poke |
/poke |
Pout |
/pout |
Punch |
/punch |
Run |
/run |
Salute |
/salute |
Shake |
/shake |
Shoot |
/shoot |
Shocked |
/shocked |
Shrug |
/shrug |
Sip |
/sip |
Slap |
/slap |
Sleep |
/sleep |
Smile |
/smile |
Smug |
/smug |
Spin |
/spin |
Stare |
/stare |
TableFlip |
/tableflip |
Teehee |
/teehee |
Think |
/think |
Thumbsup |
/thumbsup |
Tickle |
/tickle |
Wag |
/wag |
Wave |
/wave |
Wink |
/wink |
Yawn |
/yawn |
Yeet |
/yeet |
Fetch images by category. See docs.nekos.best for the full list of available categories.