Algobook
- The developer's handbook
mode-switch
back-button
Buy Me A Coffee

Random Image API

Our random image API will provide you with high quality and royalty free images based on the category that are given in the parameter.

The categories supported are:

  • backgrounds
  • fashion
  • nature
  • science
  • education
  • feelings
  • health
  • people
  • places
  • animals
  • industry
  • computer
  • food
  • sports
  • transportation
  • travel
  • buildings
  • business
  • music

Example

This API only has one endpoint, and it should be called like this:

https://api.algobook.info/v1/randomimage?category={category}

and it will return an array buffer with content-type image/png.

To display an image, you can directly access it in an img tag.

<img src="https://api.algobook.info/v1/randomimage?category=nature" />

Or you can access the array buffer directly if you want:

const response = await fetch( "https://api.algobook.info/v1/randomimage?category=nature" ); const buffer = await response.text(); console.log(buffer);

Feedback

We hope you enjoy this API, but if you have any feedback such as feature requests or similar, don't hesitate to contact us with whatever you have on your mind. Contact us here.

signature
See all our articlesSee all our open source projects