{
  "openapi": "3.1.0",
  "info": {
    "title": "Animals API",
    "version": "1.0.0",
    "description": "2,800 animal species with taxonomy, diet, lifespan, speed, habitat, prey, predators and IUCN status.\n\nDetailed reference data for 2,800+ animal species — full taxonomy (kingdom, phylum, class, order, family, genus, scientific name), diet, activity pattern, lifespan, weight, top speed, IUCN conservation status and population trend, alternative names, imperial and metric measurements, skin/coat type, colors, distinctive features, countries, biomes, main prey, predators, reproduction (mating system, gestation, litter size), fun facts and a summary — each with an image and source link. Filter by name, taxonomic class, order, family, diet, conservation status, country and color. Self-hosted dataset scraped from a-z-animals.com — no third-party calls.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/animals.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/animals"
  },
  "servers": [
    {
      "url": "https://api-animals.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Animals API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/animals/classes": {
      "get": {
        "operationId": "animalClasses",
        "summary": "Animal Classes",
        "description": "Animal Classes endpoint of the Animals API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/animals/animal-classes"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 6,
                  "classes": [
                    {
                      "class": "Mammalia",
                      "count": 1082
                    },
                    {
                      "class": "Reptilia",
                      "count": 458
                    },
                    {
                      "class": "Aves",
                      "count": 405
                    },
                    {
                      "class": "Actinopterygii",
                      "count": 276
                    },
                    {
                      "class": "Insecta",
                      "count": 240
                    },
                    {
                      "class": "Arachnida",
                      "count": 71
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/animals/statuses": {
      "get": {
        "operationId": "conservationStatuses",
        "summary": "Conservation Statuses",
        "description": "Conservation Statuses endpoint of the Animals API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/animals/conservation-statuses"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 8,
                  "statuses": [
                    {
                      "status": "Least Concern",
                      "count": 1800
                    },
                    {
                      "status": "Endangered",
                      "count": 200
                    },
                    {
                      "status": "Vulnerable",
                      "count": 180
                    },
                    {
                      "status": "Critically Endangered",
                      "count": 62
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/animals/{slug}": {
      "get": {
        "operationId": "getAnimal",
        "summary": "Get Animal",
        "description": "Get Animal endpoint of the Animals API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/animals/get-animal"
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "amur-leopard"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "slug": "cheetah",
                  "name": "Cheetah",
                  "scientificName": "Acinonyx jubatus",
                  "taxonomy": {
                    "kingdom": "Animalia",
                    "phylum": "Chordata",
                    "class": "Mammalia",
                    "order": "Carnivora",
                    "family": "Felidae",
                    "genus": "Acinonyx"
                  },
                  "diet": "Carnivore",
                  "activity": "Diurnal",
                  "lifespan": "10 years",
                  "lifespanYears": 10,
                  "weightLbs": 72,
                  "topSpeedMph": 58,
                  "conservationStatus": "Vulnerable",
                  "populationTrend": "Population Decreasing",
                  "altNames": [
                    "Hunting leopard",
                    "Guépard"
                  ],
                  "measures": {
                    "Height": {
                      "imperial": "2 ft 7 in",
                      "metric": "80 cm"
                    },
                    "Length": {
                      "imperial": "6 ft 9 in",
                      "metric": "2.0 m"
                    },
                    "Weight": {
                      "imperial": "110 lbs",
                      "metric": "50 kg"
                    },
                    "Top Speed": {
                      "imperial": "58 mph",
                      "metric": "93 km/h"
                    }
                  },
                  "skinType": "Furred mammal skin with short, thick fur...",
                  "colors": [
                    "Black",
                    "Cream",
                    "Gold",
                    "Tan",
                    "White"
                  ],
                  "features": [
                    "Taxon identity: the sole extant species of genus Acinonyx..."
                  ],
                  "countries": [
                    "Algeria",
                    "Angola",
                    "Benin",
                    "Botswana",
                    "Iran",
                    "Kenya"
                  ],
                  "biomes": [
                    "Desert Cold",
                    "Desert Hot",
                    "Savanna",
                    "Temperate Grassland"
                  ],
                  "prey": [
                    "Thomson's gazelle",
                    "Grant's gazelle",
                    "Springbok"
                  ],
                  "predators": [
                    "Black-backed jackal",
                    "Leopard",
                    "Lion",
                    "Nile crocodile"
                  ],
                  "reproduction": {
                    "Mating System": "Polygynandry",
                    "Social Structure": "Solitary",
                    "Breeding Pattern": "Transient"
                  },
                  "funFact": "Fastest land mammal: peak recorded sprint speeds up to about 104 km/h in wild hunting cheetahs.",
                  "facts": [
                    "Fastest land mammal: peak recorded sprint speeds up to about 104 km/h..."
                  ],
                  "summary": "Classification and evolution of the Cheetah...",
                  "image": "https://a-z-animals.com/media/graphicstock-cheetah-sits-under-tree.jpg",
                  "sourceUrl": "https://a-z-animals.com/animals/cheetah/"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/animals": {
      "get": {
        "operationId": "listAnimals",
        "summary": "List Animals",
        "description": "List Animals endpoint of the Animals API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/animals/list-animals"
        },
        "parameters": [
          {
            "name": "class",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Mammalia"
          },
          {
            "name": "color",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Gold"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Colombia"
          },
          {
            "name": "diet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Carnivore"
          },
          {
            "name": "family",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Felidae"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "20"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Carnivora"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "panthera"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Endangered"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 2802,
                  "page": 1,
                  "limit": 20,
                  "count": 1,
                  "results": [
                    {
                      "id": 1,
                      "slug": "aardvark",
                      "name": "Aardvark",
                      "scientificName": "Orycteropus afer",
                      "taxonomy": {
                        "kingdom": "Animalia",
                        "phylum": "Chordata",
                        "class": "Mammalia",
                        "order": "Tubulidentata",
                        "family": "Orycteropodidae",
                        "genus": "Orycteropus"
                      },
                      "diet": "Myrmecophage",
                      "activity": "Nocturnal",
                      "lifespanYears": 15,
                      "weightLbs": 82,
                      "topSpeedMph": 25,
                      "conservationStatus": "Least Concern",
                      "altNames": [],
                      "colors": [
                        "Black",
                        "Brown",
                        "Cream",
                        "Gray",
                        "Tan"
                      ],
                      "image": "https://a-z-animals.com/media/animals/images/original/aardvark.jpg"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/animals/random": {
      "get": {
        "operationId": "randomAnimals",
        "summary": "Random Animals",
        "description": "Random Animals endpoint of the Animals API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/animals/random-animals"
        },
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "3"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 2,
                  "results": [
                    {
                      "slug": "tufted-titmouse",
                      "name": "Tufted Titmouse",
                      "scientificName": "Baeolophus bicolor",
                      "taxonomy": {
                        "class": "Aves",
                        "order": "Passeriformes"
                      },
                      "diet": "Omnivore",
                      "conservationStatus": "Least Concern"
                    },
                    {
                      "slug": "jaguar",
                      "name": "Jaguar",
                      "scientificName": "Panthera onca",
                      "taxonomy": {
                        "class": "Mammalia",
                        "order": "Carnivora"
                      },
                      "diet": "Carnivore",
                      "conservationStatus": "Near Threatened"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}