/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
Key | Datatype | Required | Description |
---|---|---|---|
size | string | [optional] thumb , small, med or full - small is perfect for Discord | |
mime_types | string | [optional] a comma separated strig of types to return e.g. jpg,png for static, or gif for gifs | |
format | string | [optional] json | |
has_breeds | boolean | [optional] - only return images with breed data | |
order | string | [optional] default:RANDOM - RANDOM | |
page | number | [optional] paginate through results | |
limit | number | [optional] number of results to return, up to 25 with a valid API-Key | |
include_breeds | number | [optional] default to true. Adds the 'breed' object ot the image, only if an api | |
include_categories | number | [optional] default to true. Adds the 'breed' object ot the image, only if an api |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
x-api-key | string | [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":[]}]