API Directory › 🐾 Animals › Zoo Animals
No authHTTPSCORS

Zoo Animals API

Random zoo-animal facts and images from a free, no-key API.

Category
Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Zoo Animals docs ↗

What it does

The Zoo Animal API returns random animal profiles with facts — common and Latin name, animal type, habitat, diet, geographic range, length, weight, lifespan and an image link. It is a small curated dataset aimed at learning projects.

Base URL

https://zoo-animal-api.herokuapp.com

Authentication

None. /animals/rand for one, /animals/rand/{amount} for several. Reliability note: the API is hosted on a now-discontinued free Heroku tier, so it may be slow to wake or offline — have a fallback.

Code examples

curl
curl -s https://zoo-animal-api.herokuapp.com/animals/rand
curl -s https://zoo-animal-api.herokuapp.com/animals/rand/3
Python
import requests

try:
    a = requests.get("https://zoo-animal-api.herokuapp.com/animals/rand", timeout=15).json()
    print(a["name"], "-", a["habitat"], "-", a["diet"])
except requests.RequestException:
    print("API unavailable")

Rate limits & quotas

No documented rate limit, but expect cold-start delays (several seconds on the first request after idle) and occasional downtime because of the free hosting. {amount} is capped around 10.

Key response fields

name / latin_name / animal_typeIdentity
active_time / habitat / diet / geo_rangeLifestyle and range
length_min / length_max / weight_min / weight_max / lifespanMeasurements (imperial)
image_linkURL to a photo of the animal

Common errors

(timeout / 503)Heroku dyno asleep or retired — retry once with a long timeout, then fall back.
(small dataset)Only a few dozen animals — repeats come quickly.

When to use it (and alternatives)

Fine for a classroom project, a ‘animal of the day’ card or a fetch tutorial — if you handle the flakiness. For robust biodiversity data use GBIF or the Encyclopedia of Life; for adoptable pets, Petfinder.

FAQ

Why is the first request so slow?

Free Heroku dynos sleep after inactivity and take several seconds to wake. Use a generous timeout, and consider caching a batch of animals on your side.

Is it still online?

It has been intermittent since Heroku ended its free tier. Build in a fallback (a bundled JSON of animals) so your app degrades gracefully.

How many animals are in the dataset?

A few dozen curated entries — enough for a demo, not a reference. Expect repeats with more than a handful of calls.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON Formatter

Related Animals APIs

← Back

More Animals APIs · All 196 APIs