Endpoints

This guide will get you all set up and ready to use the Animality API. We’ll cover how to get started on making your first API request.

Random Image

This endpoint allows you to request a random image URL for a specific animal. The data returned is a JSON object with a URL to the specified image.

GET
/img/cat
{
  "animal": "cat",
  "image": "https://cdn.animality.xyz/cat/19.png",
  "image_id": "a24d86e6-e4c6-43b0-9a80-989466d109ea"
}

Random Fact

This endpoint allows you to request a random fact for a specific animal. The data returned is a JSON object with the fact as a string.

GET
/fact/capybara
{
  "animal": "capybara",
  "fact": "They live in groups, and a typical group can consist of 10 to 30 individuals.",
  "fact_id": "3fb93b98-6981-42b4-b623-2bf0fa23ccd0"
}

Random Image & Fact

This endpoint allows you to request all data for a specific animal. The data returned is a JSON object with a URL to the specified image and the fact as a string.

GET
/all/dog
{
  "animal": "dog",
  "image": "https://cdn.animality.xyz/dog/9.png",
  "fact": "Puppies need a lot of sleep, up to 15 to 20 hours a day.",
  "image_id": "7998c20e-8089-4eda-8ffe-458d995d2175",
  "fact_id": "05693d13-71c9-47fa-9678-6d04122c2687"
}