Skip to main content

Random Pet & Animal Data API

MOCK DATA

Coherent pet records for vet and pet-app fixtures — real breeds matched to species, realistic per-species ages and weights, names that follow sex.

Generated test data for fixtures and development

Base URL
/api/animals
Category
People
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/animals

Live requestRuns against the public API
No key required
GET/api/animals?species=cat&count=5

Request parameters

Only generate this species — breed, age and weight all follow it. Omit for a mixed batch.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/animals?species=cat&count=5"
const res = await fetch("https://randomapi.dev/api/animals?species=cat&count=5");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/animals?species=cat&count=5").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/animals?species=cat&count=5"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 1
species enum

Only generate this species — breed, age and weight all follow it. Omit for a mixed batch.

allowed: dog | cat | bird | fish | rabbit | hamster | reptile | horse
example: species=cat
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=name,species
exclude list

Return all fields except these (comma-separated).

example: exclude=vaccinated
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 7
name string

Pet name, matched to the record's sex.

example: Luna

species string

One of: dog, cat, bird, fish, rabbit, hamster, reptile, horse.

example: cat

breed string

Real breed/type name drawn strictly from this species' pool.

example: Maine Coon

sex string

male | female.

example: female

age integer

Age in whole years, from 0 (under a year) up to the species' documented maximum (e.g. hamster 3, dog 16, horse 30).

example: 4

weightKg float

Weight in kilograms, always inside the species' documented range (breed-independent).

example: 4.6

vaccinated boolean

True for ~80% of routine-vaccine species (dog, cat, rabbit, horse) and ~25% of the rest.

example: true

Documented examples

Build-generated requests and complete responses
3
Five cats
GET /api/animals?species=cat&count=5
{
  "data": [
    {
      "name": "Gracie",
      "species": "cat",
      "breed": "Sphynx",
      "sex": "female",
      "age": 6,
      "weightKg": 5.4,
      "vaccinated": true
    },
    {
      "name": "Toby",
      "species": "cat",
      "breed": "Maine Coon",
      "sex": "male",
      "age": 11,
      "weightKg": 7.9,
      "vaccinated": true
    },
    {
      "name": "Oliver",
      "species": "cat",
      "breed": "Burmese",
      "sex": "male",
      "age": 9,
      "weightKg": 5.6,
      "vaccinated": true
    },
    {
      "name": "Luna",
      "species": "cat",
      "breed": "Bengal",
      "sex": "female",
      "age": 3,
      "weightKg": 7.8,
      "vaccinated": false
    },
    {
      "name": "Coco",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Reproducible dog fixtures
GET /api/animals?species=dog&seed=42&count=10
{
  "data": [
    {
      "name": "Gracie",
      "species": "dog",
      "breed": "Dachshund",
      "sex": "female",
      "age": 5,
      "weightKg": 33.2,
      "vaccinated": true
    },
    {
      "name": "Toby",
      "species": "dog",
      "breed": "Labrador Retriever",
      "sex": "male",
      "age": 8,
      "weightKg": 59.4,
      "vaccinated": true
    },
    {
      "name": "Oliver",
      "species": "dog",
      "breed": "Shih Tzu",
      "sex": "male",
      "age": 7,
      "weightKg": 35.2,
      "vaccinated": true
    },
    {
      "name": "Luna",
      "species": "dog",
      "breed": "Golden Retriever",
      "sex": "female",
      "age": 3,
      "weightKg": 57.5,
      "vaccinated": false
    },
    {
      "name": "Coco",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Mixed shelter intake, names and breeds only
GET /api/animals?count=20&seed=7&fields=name,species,breed
{
  "data": [
    {
      "name": "Sadie",
      "species": "hamster",
      "breed": "Chinese"
    },
    {
      "name": "Ziggy",
      "species": "rabbit",
      "breed": "Mini Lop"
    },
    {
      "name": "Hazel",
      "species": "fish",
      "breed": "Zebra Danio"
    },
    {
      "name": "Daisy",
      "species": "reptile",
      "breed": "Ball Python"
    },
    {
      "name": "Rocky",
      "species": "horse",
      "breed": "Morgan"
    },
    {
      "name": "Hank",
      "species": "hamster",
      "breed": "Chinese"
    },
    {
      "name": "Hank",
      "species": "horse",
      "breed": "Friesian"
    },
    {
      "name": "Leo",
      "species": "reptile",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates internally-coherent pet records. The breed is drawn strictly from the record's own species' pool of real breed names — a cat gets Maine Coon or Siamese, never Beagle — and age and weightKg always stay inside realistic per-species ranges, so a hamster is never 12 years old and a horse never weighs 4 kg.

?species= genuinely constrains every record; omit it for a mixed batch where each record is still coherent with its own species. The exact ranges:

species breeds in pool age (years) weight (kg)
dog 16 0–16 3–60
cat 14 0–20 2.5–8
bird 12 0–30 0.02–1.2
fish 12 0–10 0.001–2
rabbit 12 0–12 1–7
hamster 5 0–3 0.02–0.05
reptile 12 0–30 0.05–6
horse 14 0–30 300–700

name follows sex (separate male/female name pools), and vaccinated mirrors real-world practice: true for roughly 80% of species with routine vaccine protocols (dog, cat, rabbit, horse) and roughly 25% of the rest. Weight is species-coherent but deliberately breed-independent — a Chihuahua record may weigh like a Great Dane. Everything is mock data; only the breed names themselves are real. With a seed, the same request reproduces byte-for-byte.

Use it for

  • Seed a veterinary clinic or pet-adoption demo database with species-coherent patients
  • Test pet-insurance or booking forms with realistic species/breed/age/weight combinations
  • Stable shelter-roster fixtures via seed — the same animals in every CI run

Frequently asked questions

Are the breeds real?

Yes — breed names are real breeds matched to their species (a Labrador never shows up as a cat), while the individual animals are generated.

Can I generate only one species?

Yes — pass species (e.g. species=dog) and every record returns that species with a matching breed, realistic age and weight.

Why do ages and weights differ per species?

Each species has its own realistic age and weight range, so a hamster never weighs 30 kg — that keeps fixtures believable for vet and pet-app demos.