BYTETOOLS

TheDogAPI

Free dog API with breed data: photos, temperament, weight, height, lifespan and breed groups. Works without a key for basic use. Tested curl example.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 20 Aug 2026

What is the TheDogAPI?

TheDogAPI is a free API providing dog photographs alongside detailed breed information — temperament, average weight and height, life span, bred-for purpose and breed group. Basic image requests need no key.

TheDogAPI is the canine counterpart to TheCatAPI, from the same team and with the same interface. Its breed database is the substantive part: temperament descriptors, size ranges and life expectancy for each recognised breed.

As with TheCatAPI, random image requests work with no key, while breed filtering and larger result sets require registering for a free one. The `x-api-key` header is the authentication mechanism, not a query parameter.

Quick facts

Base URL
https://api.thedogapi.com/v1
Authentication
Basic image requests work with no key. A free key unlocks breed filtering, pagination and larger limits.
Rate limit
Keyless requests are limited and return small result sets; a free key raises the allowance.
Pricing
Free tier with optional free key. Paid plans for high volume.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the TheDogAPI

Every request below was executed against the live API on 20 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. Fetch a random dog image

GET https://api.thedogapi.com/v1/images/search

curl
curl 'https://api.thedogapi.com/v1/images/search'
JavaScript (fetch)
const res = await fetch("https://api.thedogapi.com/v1/images/search");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.thedogapi.com/v1/images/search", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
[
  {
    "id": "sGQvQUpsp",
    "url": "https://s3.us-west-2.amazonaws.com/cdn2.thedogapi.com/images/sGQvQUpsp.jpg",
    "width": 1080,
    "height": 1080
  }
]

Parameters

ParameterTypeRequiredDescription
images/searchpathOptionalRandom dog images. images/search
limitintegerOptionalNumber of images. Capped without a key. 1
breed_idsstringOptionalFilter by breed — requires an API key. 1
breedspathOptionalThe full breed database. breeds
x-api-keyheaderOptionalFree API key for the full feature set. live_xxx

Response fields

idstring
Image identifier.
urlstring
Direct image URL, renderable straight into an img tag.
width / heightinteger
Native dimensions — useful for avoiding layout shift.
breedsarray
Breed objects when available, with temperament and measurements.
breeds[].temperamentstring
Comma-separated temperament descriptors.
breeds[].life_spanstring
Typical life expectancy range.
breeds[].bred_for / breed_groupstring
Original purpose and kennel club group.

What you can build with the TheDogAPI

  • Build a dog breed browser with photos and temperament data
  • Add pet imagery to an adoption or veterinary site
  • Create a breed comparison or selection tool
  • Test image handling with real, varied dimensions

Common errors and how to fix them

401

Invalid API key.

Fix: Send it in the `x-api-key` header, not as a query parameter.

Empty breeds array

Most images are not linked to a breed.

Fix: Use the /breeds endpoint for breed data, or filter images with breed_ids using a key.

limit ignored

Keyless requests are capped at a small number.

Fix: Register a free key to request larger result sets.

TheDogAPI — frequently asked questions

Can I use TheDogAPI without a key?

Yes for basic random image requests, which is what the example here does. Breed filtering, pagination and larger limits need a free API key.

What breed information is available?

Temperament, average weight and height ranges, life span, what the breed was originally bred for, and its kennel club breed group.

How do I authenticate?

Send your key in the `x-api-key` HTTP header. It is not accepted as a query parameter.

Is it related to TheCatAPI?

Yes, same team and an identical interface, so code written against one works against the other by changing the hostname.

Tools that pair with this API

Alternatives to TheDogAPI

If TheDogAPI does not fit, these entertainment apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
Official Joke APIFree joke API with no key: random jokes with setup and punchline, filterable by type. Perfect for beginner projects. Tested curl example and live JSON.No keyYes19 Aug 2026
icanhazdadjokeFree dad joke API with no key. Returns jokes as JSON, plain text or image depending on the Accept header. Search supported. Tested curl example included.No keyYes19 Aug 2026
chucknorris.ioFree Chuck Norris jokes API with no key. Random jokes, 16 categories and full-text search. CORS enabled. Tested curl example and live JSON response.No keyYes19 Aug 2026
Advice SlipFree advice API with no key. Returns random advice slips as JSON, with search and id lookup. CORS enabled. Tested curl example and live response.No keyYes19 Aug 2026
Useless FactsFree random facts API with no key: random or daily trivia facts in English and German with source attribution and permalinks. Tested curl example.No keyYes19 Aug 2026
xkcdFree xkcd comic API with no key: fetch any comic by number or the latest, with image URL, title, alt text and publication date. Tested curl example.No keyNo19 Aug 2026
All Entertainment APIs

TheDogAPI is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.