🐶 Dog API by kinduff

The Dog API provides dog data as a service!

API V2 - Docs

The Dog API provides a wealth of information on dog breeds, groups, and fun facts. Access and integrate this data into your website or application with our easy-to-use JSON API.

Base URL
https://dogapi.dog/api/v2
Auth
None. No key, no sign up — just send the request.
Returns
JSON, following the JSON:API convention.
OpenAPI
/api-docs/v2/swagger.json
License
MIT
Questions
dev@dogapi.dog

Quick start

Ask for something and read what comes back. This works in a terminal, in the browser console, or from any language that can make an HTTP request.

Terminal
curl -s "https://dogapi.dog/api/v2/breeds?page[number]=1"
JavaScript
const response = await fetch(
  "https://dogapi.dog/api/v2/breeds"
);
const body = await response.json();

console.log(body);

The answer looks like this:

Response
{
  "data": [
    {
      "id": "f9643a80-af1d-422a-9f15-18d466822053",
      "type": "breed",
      "attributes": {
        "name": "Caucasian Shepherd Dog",
        "description": "The Caucasian Shepherd dog is a serious guardian breed and should never be taken lightly.",
        "hypoallergenic": false,
        "life": {
          "min": 15,
          "max": 20
        },
        "male_weight": {
          "min": 50,
          "max": 100
        },
        "female_weight": {
          "min": 45,
          "max": 70
        },
        "male_height": {
          "min": 72,
          "max": 75
        },
        "female_height": {
          "min": 67,
          "max": 70
        },
        "origin": {
          "country": "Georgia",
          "region": "Caucasus Mountains",
          "era": "antiquity"
        },
        "coat": {
          "type": "double",
          "length": "long",
          "colors": [
            "gray",
            "fawn",
            "brindle",
            "white"
          ]
        },
        "traits": {
          "energy": 3,
          "trainability": 2,
          "barking": 4,
          "grooming": 4,
          "shedding": 5,
          "drooling": 3,
          "good_with_children": 3,
          "good_with_dogs": 2,
          "good_with_strangers": 1,
          "apartment_friendly": 1,
          "exercise_minutes": 60,
          "temperament": [
            "fearless",
            "self-confident",
            "territorial"
          ]
        },
        "other_names": [
          "Caucasian Ovcharka",
          "Kavkazskaia Ovtcharka",
          "Nagazi"
        ],
        "recognized_by": [
          "AKC",
          "FCI",
          "UKC"
        ],
        "sources": [
          {
            "url": "https://www.akc.org/dog-breeds/caucasian-shepherd-dog/",
            "title": "Caucasian Shepherd Dog Dog Breed Information - AKC"
          }
        ],
        "images": [
          {
            "id": "3f1c5f4e-1a6b-4f2e-9b8d-2c0e5a7d4b31",
            "url": "https://images.dogapi.dog/caucasian-shepherd-dog.jpg",
            "thumb": "https://images.dogapi.dog/caucasian-shepherd-dog-thumb.webp",
            "medium": "https://images.dogapi.dog/caucasian-shepherd-dog-medium.webp",
            "large": "https://images.dogapi.dog/caucasian-shepherd-dog-large.webp",
            "attribution": {
              "author": "Magdalena Niemiec",
              "license": "CC BY-SA 3.0",
              "license_url": "https://creativecommons.org/licenses/by-sa/3.0/",
              "source": "wikimedia_commons",
              "source_url": "https://commons.wikimedia.org/wiki/File:Caucasian_Shepherd_Dog.jpg"
            }
          }
        ]
      },
      "relationships": {
        "group": {
          "data": {
            "id": "02124eb6-1baa-410c-90ea-6b8629fb0837",
            "type": "group"
          }
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "current": 1,
      "next": 2,
      "last": 2,
      "records": 340
    }
  },
  "links": {
    "self": "https://dogapi.dog/api/v2/breeds",
    "current": "https://dogapi.dog/api/v2/breeds?page[number]=1",
    "next": "https://dogapi.dog/api/v2/breeds?page[number]=2",
    "last": "https://dogapi.dog/api/v2/breeds?page[number]=2"
  }
}

Reading a response

Responses follow JSON:API, so the shape is the same everywhere. Once you can read one, you can read all of them:

data
What you asked for — an array for a list, a single object for one record.
id and type
Every record carries both. The id is a UUID: treat it as an opaque string and never try to guess or build one.
attributes
The actual values — a breed's name, description, weight and so on.
relationships
Pointers to other records, as id + type pairs rather than the whole nested object. Follow one by requesting that record by its id.
meta and links
Information about the response itself: which page you are on, how many records exist, and the URLs of the next and last pages.

So a breed's name lives at body.data[0].attributes.name, and the group it belongs to at body.data[0].relationships.group.data.id.

Endpoints

Every endpoint below can be run straight from this page — fill in the fields and press Send request. The examples show what comes back.

Breeds

Over 340 dog breeds, each one belonging to a group.

GET /breeds

list breeds

Returns every breed, ordered by name and split into pages.

Pages hold up to 1000 records. A missing, zero, negative or oversized page[size] falls back to that maximum, so a plain request returns the whole collection. Each breed links to the group it belongs to.

Most breeds have no picture imported yet. filter[has_images]=true narrows the collection to the ones that do, which is what you want if you are putting photographs on a screen.

Responses may be cached publicly for up to 5 minutes.

Parameters

  • page[number] integer, after the ? — min 1

    Page number for pagination

  • page[size] integer, after the ? — min 1, max 1000

    Number of records per page (max 1000)

  • filter[has_images] boolean, after the ?

    Only breeds that have at least one picture

Request
curl -s "https://dogapi.dog/api/v2/breeds?page[number]=1"
Try it
Runs against this site.

What comes back

200 successful
Example
{
  "data": [
    {
      "id": "f9643a80-af1d-422a-9f15-18d466822053",
      "type": "breed",
      "attributes": {
        "name": "Caucasian Shepherd Dog",
        "description": "The Caucasian Shepherd dog is a serious guardian breed and should never be taken lightly.",
        "hypoallergenic": false,
        "life": {
          "min": 15,
          "max": 20
        },
        "male_weight": {
          "min": 50,
          "max": 100
        },
        "female_weight": {
          "min": 45,
          "max": 70
        },
        "male_height": {
          "min": 72,
          "max": 75
        },
        "female_height": {
          "min": 67,
          "max": 70
        },
        "origin": {
          "country": "Georgia",
          "region": "Caucasus Mountains",
          "era": "antiquity"
        },
        "coat": {
          "type": "double",
          "length": "long",
          "colors": [
            "gray",
            "fawn",
            "brindle",
            "white"
          ]
        },
        "traits": {
          "energy": 3,
          "trainability": 2,
          "barking": 4,
          "grooming": 4,
          "shedding": 5,
          "drooling": 3,
          "good_with_children": 3,
          "good_with_dogs": 2,
          "good_with_strangers": 1,
          "apartment_friendly": 1,
          "exercise_minutes": 60,
          "temperament": [
            "fearless",
            "self-confident",
            "territorial"
          ]
        },
        "other_names": [
          "Caucasian Ovcharka",
          "Kavkazskaia Ovtcharka",
          "Nagazi"
        ],
        "recognized_by": [
          "AKC",
          "FCI",
          "UKC"
        ],
        "sources": [
          {
            "url": "https://www.akc.org/dog-breeds/caucasian-shepherd-dog/",
            "title": "Caucasian Shepherd Dog Dog Breed Information - AKC"
          }
        ],
        "images": [
          {
            "id": "3f1c5f4e-1a6b-4f2e-9b8d-2c0e5a7d4b31",
            "url": "https://images.dogapi.dog/caucasian-shepherd-dog.jpg",
            "thumb": "https://images.dogapi.dog/caucasian-shepherd-dog-thumb.webp",
            "medium": "https://images.dogapi.dog/caucasian-shepherd-dog-medium.webp",
            "large": "https://images.dogapi.dog/caucasian-shepherd-dog-large.webp",
            "attribution": {
              "author": "Magdalena Niemiec",
              "license": "CC BY-SA 3.0",
              "license_url": "https://creativecommons.org/licenses/by-sa/3.0/",
              "source": "wikimedia_commons",
              "source_url": "https://commons.wikimedia.org/wiki/File:Caucasian_Shepherd_Dog.jpg"
            }
          }
        ]
      },
      "relationships": {
        "group": {
          "data": {
            "id": "02124eb6-1baa-410c-90ea-6b8629fb0837",
            "type": "group"
          }
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "current": 1,
      "next": 2,
      "last": 2,
      "records": 340
    }
  },
  "links": {
    "self": "https://dogapi.dog/api/v2/breeds",
    "current": "https://dogapi.dog/api/v2/breeds?page[number]=1",
    "next": "https://dogapi.dog/api/v2/breeds?page[number]=2",
    "last": "https://dogapi.dog/api/v2/breeds?page[number]=2"
  }
}
Every field, explained
Field Type Description
data array of Breed
meta object
meta.pagination PaginationMeta
links object
links.self string uri
links.current string uri
links.next string uri
links.last string uri

GET /breeds/{id}

get breed

Returns a single breed. Unknown and malformed ids both return 404.

Parameters

  • id string uuid, in the URL required

    Breed id

Request
curl -s "https://dogapi.dog/api/v2/breeds/036feed0-da8a-42c9-ab9a-57449b530b13"
Try it
Runs against this site.

What comes back

200 successful
Example
{
  "data": {
    "id": "f9643a80-af1d-422a-9f15-18d466822053",
    "type": "breed",
    "attributes": {
      "name": "Caucasian Shepherd Dog",
      "description": "The Caucasian Shepherd dog is a serious guardian breed and should never be taken lightly.",
      "hypoallergenic": false,
      "life": {
        "min": 15,
        "max": 20
      },
      "male_weight": {
        "min": 50,
        "max": 100
      },
      "female_weight": {
        "min": 45,
        "max": 70
      },
      "male_height": {
        "min": 72,
        "max": 75
      },
      "female_height": {
        "min": 67,
        "max": 70
      },
      "origin": {
        "country": "Georgia",
        "region": "Caucasus Mountains",
        "era": "antiquity"
      },
      "coat": {
        "type": "double",
        "length": "long",
        "colors": [
          "gray",
          "fawn",
          "brindle",
          "white"
        ]
      },
      "traits": {
        "energy": 3,
        "trainability": 2,
        "barking": 4,
        "grooming": 4,
        "shedding": 5,
        "drooling": 3,
        "good_with_children": 3,
        "good_with_dogs": 2,
        "good_with_strangers": 1,
        "apartment_friendly": 1,
        "exercise_minutes": 60,
        "temperament": [
          "fearless",
          "self-confident",
          "territorial"
        ]
      },
      "other_names": [
        "Caucasian Ovcharka",
        "Kavkazskaia Ovtcharka",
        "Nagazi"
      ],
      "recognized_by": [
        "AKC",
        "FCI",
        "UKC"
      ],
      "sources": [
        {
          "url": "https://www.akc.org/dog-breeds/caucasian-shepherd-dog/",
          "title": "Caucasian Shepherd Dog Dog Breed Information - AKC"
        }
      ],
      "images": [
        {
          "id": "3f1c5f4e-1a6b-4f2e-9b8d-2c0e5a7d4b31",
          "url": "https://images.dogapi.dog/caucasian-shepherd-dog.jpg",
          "thumb": "https://images.dogapi.dog/caucasian-shepherd-dog-thumb.webp",
          "medium": "https://images.dogapi.dog/caucasian-shepherd-dog-medium.webp",
          "large": "https://images.dogapi.dog/caucasian-shepherd-dog-large.webp",
          "attribution": {
            "author": "Magdalena Niemiec",
            "license": "CC BY-SA 3.0",
            "license_url": "https://creativecommons.org/licenses/by-sa/3.0/",
            "source": "wikimedia_commons",
            "source_url": "https://commons.wikimedia.org/wiki/File:Caucasian_Shepherd_Dog.jpg"
          }
        }
      ]
    },
    "relationships": {
      "group": {
        "data": {
          "id": "02124eb6-1baa-410c-90ea-6b8629fb0837",
          "type": "group"
        }
      }
    }
  },
  "links": {
    "self": "https://dogapi.dog/api/v2/breeds/f9643a80-af1d-422a-9f15-18d466822053"
  }
}
Every field, explained
Field Type Description
data Breed
links object
links.self string uri
404 no breed with that id

GET /breeds/{id}/image

get breed image

Redirects to a picture of the breed, so the URL can be used directly in an <img> tag. Returns 404 when the breed has no images yet.

Images come from Wikimedia Commons and are served under the licence of their author. The credit for each one is in the images attribute of the breed itself, and it has to be displayed alongside the picture.

Parameters

  • id string uuid, in the URL required

    Breed id

  • size string, after the ? — default medium

    Which size to redirect to. `full` is the original file. An unknown size falls back to `medium`.

  • random boolean, after the ? — default false

    Redirect to any of the breed's images instead of the first one

Request
curl -sL "https://dogapi.dog/api/v2/breeds/036feed0-da8a-42c9-ab9a-57449b530b13/image?size=value" -o breed.webp
Try it
Runs against this site.

What comes back

302 redirect to the image file
Example
A dog of the breed

The response is a 302 to the image file, so a browser, an <img> tag or curl -L all end up with the picture. Credit for it is in the breed's images attribute.

404 the breed has no images, or does not exist

GET /breeds/image

get a random breed image

Redirects to a picture of a randomly chosen breed. Returns 404 while no images have been imported.

Parameters

  • size string, after the ? — default medium

    Which size to redirect to. `full` is the original file.

Request
curl -sL "https://dogapi.dog/api/v2/breeds/image?size=value" -o breed.webp
Try it
Runs against this site.

What comes back

302 redirect to the image file
Example
A dog of the breed

The response is a 302 to the image file, so a browser, an <img> tag or curl -L all end up with the picture. Credit for it is in the breed's images attribute.

404 no images have been imported

Groups

The breed groups, each one listing the breeds it contains.

GET /groups

list groups

Returns every breed group, ordered by name and split into pages.

Pages hold up to 1000 records, and there are only about 20 groups, so a plain request returns all of them. Each group lists the breeds that belong to it.

Responses may be cached publicly for up to 5 minutes.

Parameters

  • page[number] integer, after the ? — min 1

    Page number for pagination

  • page[size] integer, after the ? — min 1, max 1000

    Number of records per page (max 1000)

Request
curl -s "https://dogapi.dog/api/v2/groups?page[number]=1"
Try it
Runs against this site.

What comes back

200 successful
Example
{
  "data": [
    {
      "id": "02124eb6-1baa-410c-90ea-6b8629fb0837",
      "type": "group",
      "attributes": {
        "name": "Foundation Stock Service"
      },
      "relationships": {
        "breeds": {
          "data": [
            {
              "id": "b0b6810c-fb88-4987-ad0a-ae0440b04634",
              "type": "breed"
            },
            {
              "id": "38e06144-2ac3-43c0-981c-f8598eabc902",
              "type": "breed"
            }
          ]
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "current": 1,
      "records": 20
    }
  },
  "links": {
    "self": "https://dogapi.dog/api/v2/groups",
    "current": "https://dogapi.dog/api/v2/groups?page[number]=1"
  }
}
Every field, explained
Field Type Description
data array of Group
meta object
meta.pagination PaginationMeta
links object
links.self string uri
links.current string uri
links.next string uri
links.last string uri

GET /groups/{id}

get group

Returns a single group. Unknown and malformed ids both return 404.

Parameters

  • id string uuid, in the URL required

    Group id

Request
curl -s "https://dogapi.dog/api/v2/groups/8000793f-a1ae-4ec4-8d55-ef83f1f644e5"
Try it
Runs against this site.

What comes back

200 successful
Example
{
  "data": {
    "id": "02124eb6-1baa-410c-90ea-6b8629fb0837",
    "type": "group",
    "attributes": {
      "name": "Foundation Stock Service"
    },
    "relationships": {
      "breeds": {
        "data": [
          {
            "id": "b0b6810c-fb88-4987-ad0a-ae0440b04634",
            "type": "breed"
          },
          {
            "id": "4bc90a09-5406-4739-96c6-ac2161fbfa4e",
            "type": "breed"
          }
        ]
      }
    }
  },
  "links": {
    "self": "https://dogapi.dog/api/v2/groups/02124eb6-1baa-410c-90ea-6b8629fb0837"
  }
}
Every field, explained
Field Type Description
data Group
links object
links.self string uri
404 no group with that id

Facts

Random dog facts.

GET /facts

list facts

Returns random dog facts.

limit is clamped to 1..5: anything missing, zero, negative or non-numeric returns a single fact, and anything above 5 returns 5.

Every response is different, so these are sent with Cache-Control: no-store and must not be cached.

Parameters

  • limit integer, after the ? — min 1, max 5, default 1

    Number of facts to return (max 5, defaults to 1)

Request
curl -s "https://dogapi.dog/api/v2/facts?limit=1"
Try it
Runs against this site.

What comes back

200 successful
Example
{
  "data": [
    {
      "id": "1cd1a16d-6fe1-40ea-9dd2-c21dd0f7c24e",
      "type": "fact",
      "attributes": {
        "body": "Many foot disorders in dogs are caused by long toenails."
      }
    }
  ]
}
Every field, explained
Field Type Description
data array of Fact

Object reference

The objects the responses are built from. Breed, Group and Fact are the things themselves; Range and PaginationMeta are small helpers that show up inside them.

Range

Field Type Description
min integer e.g. 10
max integer e.g. 14

PaginationMeta

Field Type Description
current integer Current page number e.g. 1
next integer Next page number, absent on the last page e.g. 2
last integer Last page number e.g. 2
records integer Total number of records e.g. 340

BreedImage

Field Type Description
id string uuid
url string uri The original file, as imported
thumb string uri Square 200x200 WebP crop
medium string uri WebP, longest side 600px
large string uri WebP, longest side 1200px
attribution object
attribution.author string e.g. Magdalena Niemiec
attribution.license string e.g. CC BY-SA 3.0
attribution.license_url string uri
attribution.source string e.g. wikimedia_commons
attribution.source_url string uri Page the image was taken from

BreedOrigin

Field Type Description
country string e.g. Japan
region string e.g. Akita Prefecture
era string e.g. 17th century

BreedCoat

Field Type Description
type string e.g. double
length string e.g. medium
colors array of string e.g. ["red","brindle","white"]

BreedTraits

Field Type Description
energy integer e.g. 3
trainability integer e.g. 3
barking integer e.g. 3
grooming integer e.g. 3
shedding integer e.g. 3
drooling integer e.g. 3
good_with_children integer e.g. 3
good_with_dogs integer e.g. 3
good_with_strangers integer e.g. 3
apartment_friendly integer e.g. 3
exercise_minutes integer Typical daily exercise for an adult e.g. 60
temperament array of string e.g. ["loyal","dignified","courageous"]

BreedSource

Field Type Description
url string uri
title string e.g. Akita Dog Breed Information

Breed

Field Type Description
id string uuid
type string
attributes object
attributes.name string e.g. Caucasian Shepherd Dog
attributes.description string e.g. The Caucasian Shepherd dog is a serious guardian breed and should never be taken lightly.
attributes.life Range Life expectancy in years
attributes.male_weight Range Male weight in kilograms
attributes.female_weight Range Female weight in kilograms
attributes.hypoallergenic boolean e.g. false
attributes.male_height Range Male height at the withers, in centimetres
attributes.female_height Range Female height at the withers, in centimetres
attributes.origin BreedOrigin
attributes.coat BreedCoat
attributes.traits BreedTraits
attributes.other_names array of string Names the breed also goes by e.g. ["Akita Inu","Japanese Akita"]
attributes.recognized_by array of string Kennel clubs that recognise the breed e.g. ["AKC","FCI"]
attributes.sources array of BreedSource Where the researched attributes above came from
attributes.images array of BreedImage Pictures of the breed, empty when none have been imported yet
relationships object
relationships.group object
relationships.group.data object
relationships.group.data.id string uuid
relationships.group.data.type string

Group

Field Type Description
id string uuid
type string
attributes object
attributes.name string e.g. Herding Group
relationships object
relationships.breeds object
relationships.breeds.data array of object

Fact

Field Type Description
id string uuid
type string
attributes object
attributes.body string e.g. Two Labradors, Lucky and Flo, were the first dogs known for sniffing out pirated DVDs.