/images/search

GET {{endpoint}}v1/images/search?size=med&mime_types=jpg&format=json&has_breeds=true&order=RANDOM&page=0&limit=1

Searchs all approved images. Default is to reutrn 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.

Request Params

KeyDatatypeRequiredDescription
sizestring[optional] thumb , small, med or full - small is perfect for Discord
mime_typesstring[optional] a comma separated strig of types to return e.g. jpg,png for static, or gif for gifs
formatstring[optional] json
has_breedsboolean[optional] - only return images with breed data
orderstring[optional] default:RANDOM - RANDOM
pagenumber[optional] paginate through results
limitnumber[optional] number of results to return, up to 25 with a valid API-Key
include_breedsnumber[optional] default to true. Adds the 'breed' object ot the image, only if an api
include_categoriesnumber[optional] default to true. Adds the 'breed' object ot the image, only if an api

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
x-api-keystring[optional] without it only the a basic set of images can be searched

RESPONSES

status: OK

[{"id":"Hylo4Snaf","url":"https://cdn.thedogapi.com/images/Hylo4Snaf.jpeg","width":1200,"height":922,"mime_type":"image/jpeg","breeds":[{"id":235,"name":"Spanish Water Dog","weight":" 30 to 50 pounds","height":"16 to 20 inches at the shoulder","life_span":"12 to 15 years","breed_group":"Sporting"}],"categories":[]}]