Dog API
A small API that provides information and images of the dog breeds. We are using the amazing free Dog API as our source of data.
Documentation
The API consists of three endpoints.
GET https://api.algobook.info/v1/dogs/all GET https://api.algobook.info/v1/dogs/:id GET https://api.algobook.info/v1/dogs/search/:search
Example in JavaScript
Below we will share some example in JavaScript on how to consume the API
GET /dogs/all
const response = await fetch("https://api.algobook.info/v1/dogs/all"); const data = await response.json(); console.log(data);
Response
Note that we only show a small fraction of the data in below response
[ { "name": "Affenpinscher", "id": 1, "origin": "Germany, France", "temperament": "Stubborn, Curious, Playful, Adventurous, Active, Fun-loving", "lifespan": "10 - 12 years", "imgUrl": "https://cdn2.thedogapi.com/images/BJa4kxc4X.jpg", "weightKg": "3 - 6", "weightLbs": "6 - 13", "heightCm": "23 - 29", "heightInches": "6 - 13" }, { "name": "Afghan Hound", "id": 2, "origin": "Afghanistan, Iran, Pakistan", "temperament": "Aloof, Clownish, Dignified, Independent, Happy", "lifespan": "10 - 13 years", "imgUrl": "https://cdn2.thedogapi.com/images/hMyT4CDXR.jpg", "weightKg": "23 - 27", "weightLbs": "50 - 60", "heightCm": "64 - 69", "heightInches": "50 - 60" }, ...etc ]
GET /dogs/search/:search
const response = await fetch("https://api.algobook.info/v1/dogs/search/husky"); const data = await response.json(); console.log(data);
Response
[ { "name": "Alaskan Husky", "id": 8, "temperament": "Friendly, Energetic, Loyal, Gentle, Confident", "lifespan": "10 - 13 years", "imgUrl": "https://cdn2.thedogapi.com/images/-HgpNnGXl.jpg", "weightKg": "17 - 23", "weightLbs": "38 - 50", "heightCm": "58 - 66", "heightInches": "38 - 50" }, { "name": "Siberian Husky", "id": 226, "temperament": "Outgoing, Friendly, Alert, Gentle, Intelligent", "lifespan": "12 years", "imgUrl": "https://cdn2.thedogapi.com/images/S17ZilqNm_1280.jpg", "weightKg": "16 - 27", "weightLbs": "35 - 60", "heightCm": "51 - 60", "heightInches": "35 - 60" } ]
GET /dogs/:id
If you want retrieve one specific dog by the ID, call the API as follows
const response = await fetch("https://api.algobook.info/v1/dogs/115"); const data = await response.json(); console.log(data);
Response
{ "name": "German Shepherd Dog", "id": 115, "temperament": "Alert, Loyal, Obedient, Curious, Confident, Intelligent, Watchful, Courageous", "lifespan": "10 - 13 years", "imgUrl": "https://cdn2.thedogapi.com/images/SJyBfg5NX_1280.jpg", "weightKg": "23 - 41", "weightLbs": "50 - 90", "heightCm": "56 - 66", "heightInches": "50 - 90" }
Feedback
If you have any feedback or feature requests, please contact us here and we will do what we can do improve the API to fit your needs.