Introducing Shibe.online API Docs

Shibe.online is a free API that provides randomized images of Shiba Inu dogs, cats, birds, and foxes.

This API provides you a simple and easy way to integrate Shiba Inu images on your projects. In this tutorial, you will learn how to fetch images using JavaScript.

Basic Usage

To use the API, you simply need to make a GET request to the following endpoint:

fetch('http://shibe.online/api/shibes?count=[count]&urls=[urls]&httpsUrls=[httpsUrls]')
  .then(response => response.json())
  .then(data => console.log(data))

In the above example, replace [count] with the number of images you would like to receive. You can specify a maximum of 100 images at a time. [urls] and [httpsUrls] are optional parameters that will define whether or not you want URLs or HTTPS URLs for the image.

Example Code

Here is an example code using JavaScript:

async function getShibes(count) {
  const url = `http://shibe.online/api/shibes?count=${count}&urls=true&httpsUrls=true`;

  const response = await fetch(url);
  const data = await response.json();

  console.log(data);
}

getShibes(4); // will return an array of 4 random Shiba Inu images

Conclusion

Integrating Shibe.online API into your projects is easy and fun. That being said, make sure you are using this API in a respectful way and not overloading their servers with too many requests.

Related APIs in Animals