The Dog API gives you access to 1000's of dog images, and breeds.
Our goal is to create free, fun & useful public service API's, helping people learn to code, create awesome projects, and be a stable fixture in a turbulent world.
Just signup for an API Key from https://thedogapi.com. We're looking forward to seeing what you build!
Searches all approved public images. Default is to return RANDOM images, but with an API-Key you can use 'order=DESC' or 'order=ASC' along with the 'page' and 'limit' parameters to paginate through them in the order they were approved. Pagination-Count, Pagination-Page, and Pagination-Limit headers are present in the response so you know the total number of images that can be paginated through for the passed search filters.
size | string Example: size=full [optional] thumb , small, med or full - small is perfect for Discord. Default is full |
mime_types | string Example: mime_types=jpg,png [optional] a comma separated string of types to return e.g. jpg,png for static, or gif for gifs. Default will return any mime_type |
format | string Example: format=json [optional] json | src - Default is json |
has_breeds | boolean Example: has_breeds=false [optional] - only return images with breed data. Default false |
order | string Example: order=RANDOM [optional] default:RANDOM - RANDOM | ASC | DESC |
page | integer Example: page=0 [optional] paginate through results |
limit | integer Example: limit=1 [optional] number of results to return, up to 25 with a valid API-Key |
x-api-key | string Example: {{YOUR-API-KEY}} [optional] without it only the a basic set of images can be searched |
[- {
- "id": "6euYVVE_u",
- "width": 1024,
- "height": 685,
- "breeds": [
- {
- "weight": {
- "imperial": "23 - 28",
- "metric": "10 - 13"
}, - "height": {
- "imperial": "15.5 - 20",
- "metric": "39 - 51"
}, - "id": 111,
- "name": "Finnish Spitz",
- "bred_for": "Hunting birds, small mammals",
- "breed_group": "Non-Sporting",
- "life_span": "12 - 15 years",
- "temperament": "Playful, Loyal, Independent, Intelligent, Happy, Vocal",
- "reference_image_id": "3PjHlQbkV"
}
]
}
]
Get a specific image by its ID. This can either be a public image, or one you have uploaded.
image_id required | string Example: 6euYVVE_u The ID of the image to retrieve |
{- "id": "6euYVVE_u",
- "width": 1024,
- "height": 685,
- "breeds": [
- {
- "weight": {
- "imperial": "23 - 28",
- "metric": "10 - 13"
}, - "height": {
- "imperial": "15.5 - 20",
- "metric": "39 - 51"
}, - "id": 111,
- "name": "Finnish Spitz",
- "bred_for": "Hunting birds, small mammals",
- "breed_group": "Non-Sporting",
- "life_span": "12 - 15 years",
- "temperament": "Playful, Loyal, Independent, Intelligent, Happy, Vocal",
- "reference_image_id": "3PjHlQbkV"
}
]
}
Get the raw analysis results for any uploaded image
image_id required | string Example: xxBaNrfM0 The ID of the image to analyze |
x-api-key | string Example: {{YOUR-API-KEY}} [optional] will save this request to your account analytics |
[- {
- "labels": [
- {
- "Name": "Animal",
- "Confidence": 99.90064239501953,
- "Instances": [ ],
- "Parents": [ ]
}, - {
- "Name": "Cat",
- "Confidence": 99.90064239501953,
- "Instances": [
- {
- "BoundingBox": {
- "Width": 0.9043794274330139,
- "Height": 0.803057074546814,
- "Left": 0.024559099227190018,
- "Top": 0.15806715190410614
}, - "Confidence": 97.5887680053711
}
], - "Parents": [
- {
- "Name": "Animal"
}, - {
- "Name": "Mammal"
}, - {
- "Name": "Pet"
}
]
}, - {
- "Name": "Mammal",
- "Confidence": 99.90064239501953,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Animal"
}
]
}, - {
- "Name": "Manx",
- "Confidence": 99.90064239501953,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Animal"
}, - {
- "Name": "Cat"
}, - {
- "Name": "Mammal"
}, - {
- "Name": "Pet"
}
]
}, - {
- "Name": "Pet",
- "Confidence": 99.90064239501953,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Animal"
}
]
}, - {
- "Name": "Kitten",
- "Confidence": 98.19309997558594,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Animal"
}, - {
- "Name": "Cat"
}, - {
- "Name": "Mammal"
}, - {
- "Name": "Pet"
}
]
}, - {
- "Name": "Sleeping",
- "Confidence": 76.68528747558594,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Person"
}
]
}, - {
- "Name": "Couch",
- "Confidence": 63.19022750854492,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Furniture"
}
]
}, - {
- "Name": "Chair",
- "Confidence": 57.31343078613281,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Furniture"
}
]
}, - {
- "Name": "Abyssinian",
- "Confidence": 57.038516998291016,
- "Instances": [ ],
- "Parents": [
- {
- "Name": "Animal"
}, - {
- "Name": "Cat"
}, - {
- "Name": "Mammal"
}, - {
- "Name": "Pet"
}
]
}
], - "moderation_labels": [ ],
- "vendor": "AWS Rekognition",
- "image_id": "xxBaNrfM0",
- "created_at": "2023-10-28T17:44:36.000Z"
}
]
Lists the images you have uploaded via the POST /images/upload endpoint
limit | integer Example: limit=10 [Optional] number of images to return valid 1 to 10 - default: 1 |
page | integer Example: page=0 [Optional] only works if account_id is present to page through your own uploads |
order | string Example: order=DESC [Optional] only works if account_id is present, either ASC or DESC - ascending or descending. |
x-api-key required | string Example: {{YOUR-API-KEY}}
|
[- {
- "id": "S1bsCGxrf",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [
- {
- "id": 3,
- "name": "Alaskan Malamute",
},
], - "animals": [ ],
- "categories": [ ]
}, - {
- "id": "B1gZsCMgrG",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "HJZWiCGgSf",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "HyGWiRfgBM",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "Bk4-oAzlHM",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "H1HWiCMxHG",
- "width": null,
- "height": null,
- "mime_type": "image/png",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "rkUZsAGeHM",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "BkDZjRzlSz",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "ByuZj0GgBf",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}, - {
- "id": "r1tWjAfxHz",
- "width": null,
- "height": null,
- "mime_type": "image/jpeg",
- "entities": [ ],
- "breeds": [ ],
- "animals": [ ],
- "categories": [ ]
}
]
Make sure you're using the right field to send the image, and Content-Type header
Content-Type | string Example: multipart/form-data |
x-api-key required | string Example: {{YOUR-API-KEY}}
|
file | string <binary> |
sub_id | string [optional] - a string you can use to segment your images, e.g. knowing which of your own users uploaded it. |
breed_ids | string [optional] comma separated string of breed ids contained in the image |
{- "id": "xxBaNrfM0",
- "sub_id": "my-user-1",
- "width": 480,
- "height": 640,
- "original_filename": "bl4.jpeg",
- "pending": 0,
- "approved": 1
}
Tag an image with a specific breed to associate them together
image_id required | string |
Content-Type | string Example: application/json |
x-api-key required | string Example: {{YOUR-API-KEY}}
|
{- "breed_id": 10
}
Remove the association between an image and a specific breed
image_id required | string |
breed_id required | string |
Content-Type | string Example: application/json |
x-api-key required | string Example: {{YOUR-API-KEY}}
|
Get a list of all available dog breeds with optional pagination
limit | integer Example: limit=10 |
page | integer Example: page=0 |
[- {
- "weight": {
- "imperial": "23 - 28",
- "metric": "10 - 13"
}, - "height": {
- "imperial": "15.5 - 20",
- "metric": "39 - 51"
}, - "id": 111,
- "name": "Finnish Spitz",
- "bred_for": "Hunting birds, small mammals",
- "breed_group": "Non-Sporting",
- "life_span": "12 - 15 years",
- "temperament": "Playful, Loyal, Independent, Intelligent, Happy, Vocal",
- "reference_image_id": "3PjHlQbkV"
}
]
Get detailed information about a specific dog breed
breed_id required | string |
{- "weight": {
- "imperial": "23 - 28",
- "metric": "10 - 13"
}, - "height": {
- "imperial": "15.5 - 20",
- "metric": "39 - 51"
}, - "id": 111,
- "name": "Finnish Spitz",
- "bred_for": "Hunting birds, small mammals",
- "breed_group": "Non-Sporting",
- "life_span": "12 - 15 years",
- "temperament": "Playful, Loyal, Independent, Intelligent, Happy, Vocal",
- "reference_image_id": "3PjHlQbkV"
}
Search for dog breeds by name with optional image attachment
q | string Example: q=air search term for breed name |
attach_image | integer Example: attach_image=1 [optional] whether to attach the reference_image_id image or not |
[- {
- "weight": {
- "imperial": "23 - 28",
- "metric": "10 - 13"
}, - "height": {
- "imperial": "15.5 - 20",
- "metric": "39 - 51"
}, - "id": 111,
- "name": "Finnish Spitz",
- "bred_for": "Hunting birds, small mammals",
- "breed_group": "Non-Sporting",
- "life_span": "12 - 15 years",
- "temperament": "Playful, Loyal, Independent, Intelligent, Happy, Vocal",
- "reference_image_id": "3PjHlQbkV"
}
]
Get all your favourite images that you have saved
x-api-key required | string Example: {{YOUR-API-KEY}} |
[- {
- "id": 232413577,
- "user_id": "1ejqec",
- "image_id": "asf2",
- "sub_id": "my-user-1234",
- "created_at": "2023-10-28T17:39:28.000Z"
}
]
Save an image as a favourite to your account - with optional sub_id to represent your own user that is performing the action. You can then list /favourites using that sub_id as a filter.
Content-Type | string Example: application/json |
x-api-key required | string Example: {{YOUR-API-KEY}} |
"{\n\t\"image_id\":asf2,\n\t\"sub_id\": \"my-user-1234\"\n}"
{- "message": "SUCCESS",
- "id": 232413577
}
Get all votes that you have submitted for images
x-api-key required | string Example: {{YOUR-API-KEY}} |
[- {
- "id": 1120951,
- "image_id": "asf2",
- "sub_id": "my-user-1234",
- "created_at": "2023-10-28T17:29:28.000Z",
- "value": 1,
- "country_code": "AU",
- "image": { }
}
]
Submit a vote (like or dislike) for a specific image - with optional sub_id to represent your own user that is performing the action. You can then list /votes using that sub_id as a filter.
Content-Type | string Example: application/json |
x-api-key required | string Example: {{YOUR-API-KEY}} |
{- "image_id": "asf2",
- "sub_id": "my-user-1234",
- "value": 1
}
{- "message": "SUCCESS",
- "id": 1120951,
- "image_id": "asf2",
- "sub_id": "my-user-1234",
- "value": 1,
- "country_code": "AU"
}
Premium feature: https://portal.thatapicompany.com/catalog
Returns an evergrowing list of Facts about Cats, Dogs and their different breeds. These have been checked for accuracy and to be safe for schools.
Get one or more facts about the Species. For more at a time just update the 'limit' field, and to paginate through them just increment the 'page' field.
The response headers have the pagination details, such as how many there are in total, what page you're on, and the current amount per page.
To redorder change the order to ASC for ascending order, DESC for descending, and RAND for random order.
breed_id required | string Example: 111 |
limit | integer Example: limit=5 |
page | integer Example: page=0 |
order | string Example: order=ASC |
[- {
- "id": "JO85Z",
- "fact": "Finnish Spitz were originally bred in Finland for hunting birds and small mammals.",
- "breed_id": 111,
- "title": "Origin"
}, - {
- "id": "ADPHH",
- "fact": "Finnish Spitz are known for their playful, loyal, and intelligent temperament, making them excellent hunting companions.",
- "breed_id": 111,
- "title": "Temperament"
}, - {
- "id": "269Q9",
- "fact": "Finnish Spitz are medium-sized dogs, with males weighing between 25-33 pounds and females weighing between 20-28 pounds.",
- "breed_id": 111,
- "title": "Size"
}, - {
- "id": "DE3CY",
- "fact": "Finnish Spitz have a dense double coat that requires regular grooming, especially during shedding seasons.",
- "breed_id": 111,
- "title": "Coat"
}, - {
- "id": "ADM62",
- "fact": "Finnish Spitz are known for their distinctive fox-like appearance and their unique barking style used for hunting.",
- "breed_id": 111,
- "title": "Hunting Characteristics"
}
]
Get one or more Random facts and the Species. For more at a time just update the 'limit' field
[- {
- "id": "MBM2F",
- "fact": "Finnish Spitz dogs are known for their distinctive bark, which they use to alert hunters to the location of game birds in trees.",
- "breed_id": 111,
- "title": "Hunting Bark"
}
]