RESTful + Website for Lolis API.
This is a RESTful API which will be used on Lolis API Website and Wrapper. This API uses Imgur to get images from different existing album for different endpoints.
Please note that this API is free for non-commercial usage, that's mean you cannot make money with it, otherwise, you are free to use it.
Current API version: v1
Base URL: https://api.waifu.sbs
Supported request: GET
Found a bug? Contact me - Email - Discord: LT#0100
This API does not require any types of authorization. Just make a GET request and you are done.
Retrieve an image link (imgur) about loli.
https://api.waifu.sbs/loli
format
[gif, pic]
- Get format of image (Gif image or PNG/JPG image).nsfw
[boolean]
- NSFW image.
{
success: true,
code: 200,
data: {
type: "loli",
url: "https://i.imgur.com/example.png",
width: 1280,
height: 720,
size: 69420727,
nsfw: false,
isGif: false
}
}
Retrieve an image link (imgur) about shota.
https://api.waifu.sbs/shota
format
[gif, pic]
- Get format of image (Gif image or PNG/JPG image).nsfw
[boolean]
- NSFW image.
{
success: true,
code: 200,
data: {
type: "shota",
url: "https://i.imgur.com/example.png",
width: 1280,
height: 720,
size: 69420727,
nsfw: false,
isGif: false
}
}
Retrieve a random image link (imgur).
https://api.waifu.sbs/random
type
[loli, shota]
- Get type of image (loli or shota).format
[gif, pic]
- Get format of image (Gif image or PNG/JPG image).nsfw
[boolean]
- NSFW image.
{
success: true,
code: 200,
data: {
type: "loli",
url: "https://i.imgur.com/example.png",
width: 1280,
height: 720,
size: 69420727,
nsfw: false,
isGif: false
}
}
Code | Description | Occur reason |
---|---|---|
200 |
Successful | Successful request. |
204 |
No content | The album on imgur of specified endpoint does not contain any images. |
403 |
Permission denied | Imgur Client-ID header maybe invalid or empty. |
404 |
Not found | Cannot GET / |
500 |
Internal Error | Something went wrong with the API (Album ID is empty, function exceptions). |
{
success: false,
code: 403,
error: "Permission denied"
}
curl https://api.waifu.sbs/loli
const axios = require("axios");
async function getImage() {
try {
var response = await axios.get('https://api.waifu.sbs/loli');
console.log(response);
} catch (err) {
console.log(err);
}
}
getImage();
<p id="data"></p>
$.getJSON("https://api.waifu.sbs/loli", function(res) {
$("#data").text = res.data.link;
});
import requests
data = requests.get('https://api.waifu.sbs/loli')
print(data.data.link)
You can contribute to this project by submitting images about loli/shota.
- Fork and clone the repository
git clone https://github.com/username/lolis-rest.git
- Commit your changes
git add .
git commit -m "cool new feature"
- Push your changes
git push
- Submit a pull request
- Lolis.life for inspiring this project.