Working with Facts
Retrieve random dog facts or facts about a specific breed.
Random facts
Request one or more facts without filtering to a particular breed.
curl --location 'https://api.thedogapi.com/v1/facts?limit=1' \\
--header 'x-api-key: YOUR-API-KEY'
Example response:
[
{
"id": "german-shepherd-dm-prevalence",
"fact": "German Shepherds are predisposed to Degenerative Myelopathy (DM), a progressive spinal cord disease leading to hind limb paralysis.",
"title": "High Incidence of Degenerative Myelopathy",
"breed_id": "115"
}
]
Facts about a breed
Supply the breed ID to scope the facts to a single breed. The limit, page, and order
query parameters work exactly the same as they do when paginating breeds (see
Paginating through any endpoint).
curl --location 'https://api.thedogapi.com/v1/breeds/115/facts?limit=2&page=0&order=ASC&lang=en' \\
--header 'x-api-key: YOUR-API-KEY'
Sample response:
[
{
"id": "founder-breed-status-and-genetic-impact",
"fact": "Horand von Grafrath, the first registered German Shepherd, is considered the foundation sire of the breed. His genetic contribution is so significant that nearly all modern German Shepherds can trace their lineage back to him. This genetic bottleneck, while establishing breed characteristics, also contributes to certain breed-specific health predispositions.",
"title": "Founder Breed Status and Genetic Impact",
"breed_id": "115"
},
{
"id": "high-incidence-of-degenerative-myelopathy",
"fact": "German Shepherds are predisposed to Degenerative Myelopathy (DM), a progressive spinal cord disease leading to hind limb paralysis. A specific genetic mutation, identified through DNA testing, significantly increases the risk. Early diagnosis and management can improve quality of life, but no cure exists currently.",
"title": "High Incidence of Degenerative Myelopathy",
"breed_id": "115"
}
]
Breed 115 corresponds to the German Shepherd, so each fact references that breed.
Localised facts
Set the optional lang parameter to retrieve translated facts. Supported values are
en, de, es, and it.
curl --location 'https://api.thedogapi.com/v1/breeds/115/facts?limit=1&page=0&order=ASC&lang=it' \\
--header 'x-api-key: YOUR-API-KEY'
Response:
[
{
"id": "founder-breed-status-and-genetic-impact",
"fact": "Horand von Grafrath, il primo Pastore Tedesco registrato, è considerato il capostipite della razza. Il suo contributo genetico è così significativo che quasi tutti i Pastori Tedeschi moderni possono far risalire il loro lignaggio a lui. Questo collo di bottiglia genetico, pur stabilendo le caratteristiche della razza, contribuisce anche a certe predisposizioni specifiche della razza alla salute.",
"title": "Status di Razza Fondatrice e Impatto Genetico",
"breed_id": "115"
}
]
Any endpoint that supports pagination also returns pagination-count, pagination-page,
and pagination-limit headers. In the example above, those headers contain the values
10, 0, and 1 respectively, indicating ten total facts, the first page, and a limit of
one item per page.