HTTP Dogs

Development API · Status code dog photos · Fun error pages · No auth

TL;DR

HTTP Dogs is a delightful service that maps HTTP status codes to dog photos. Instead of boring error pages, you get an expressive dog photo that matches the mood of each status code. Use it in your app's error UI, custom 404 pages, or anywhere you want to add canine charm to web development.

Quick start: https://http.dog/{status-code}.jpg — replace with any HTTP status code

No API key needed — just make a request!

How to Use This API

1. Common Status Codes

https://http.dog/200.jpg  (Happy dog — OK)
https://http.dog/201.jpg  (Created)
https://http.dog/301.jpg  (Moved permanently)
https://http.dog/404.jpg  (Confused dog — Not Found)
https://http.dog/418.jpg  (I'm a teapot — with a dog!)
https://http.dog/500.jpg  (Sad dog — Server Error)

Each status code returns a unique dog photo that fits the code's "personality".

2. Image Formats

https://http.dog/404.jpg   (JPEG format)
https://http.dog/404.png   (PNG format)
https://http.dog/404.json  (JSON — returns metadata including image URL)

Choose JPEG, PNG, or JSON output formats.

3. Custom Image Dimensions

https://http.dog/404.jpg?width=300&height=300

Resize the dog image to fit your layout.

4. JavaScript — Dog-Powered Error Handler

function showHttpDog(statusCode) {
  const img = document.createElement('img');
  img.src = `https://http.dog/${statusCode}.jpg`;
  img.alt = `HTTP ${statusCode} dog`;
  img.style = 'max-width:100%;border-radius:8px;';
  
  const caption = document.createElement('p');
  caption.textContent = `HTTP ${statusCode}`;
  
  const container = document.getElementById('error-container');
  if (container) {
    container.innerHTML = '';
    container.appendChild(img);
    container.appendChild(caption);
  }
}

// Example usage for 404
showHttpDog(404);
// Or for any API error
fetch('/api/data')
  .catch(() => showHttpDog(503));

5. Python — Status Code Explorer

import requests

def discover_dog(status_codes):
    for code in status_codes:
        resp = requests.head(f'https://http.dog/{code}.jpg')
        print(f"Status {code}: HTTP {resp.status_code}, "
              f"Content-Type: {resp.headers.get('content-type', 'N/A')}")

discover_dog([200, 201, 204, 301, 302, 400, 401, 403, 404, 418, 429, 500, 502, 503])
Try a 404 dog: https://http.dog/404.jpg

Frequently Asked Questions

What status codes are available?
All standard HTTP status codes from 1xx (informational) through 5xx (server errors). Common ones: 200, 201, 204, 301, 302, 400, 401, 403, 404, 405, 408, 418, 429, 500, 502, 503. Each has its own unique dog photo.
Is this the same as HTTPStatusDogs?
Similar concept, different domain. http.dog is the official site. There's also httpstatusdogs.com and the cat version at http.cat.
Can I use the JSON format?
Yes! https://http.dog/404.json returns {"code":404,"image_url":"https://http.dog/404.jpg"}.
Are there usage limits?
The service is free and open for personal and commercial use. It's a popular developer tool with lightweight hosting, so avoid high-frequency scraping.
Can I embed directly in my error pages?
Absolutely! Use <img src="https://http.dog/{code}.jpg"> directly in your HTML error pages or web app.

API Details

API URL
https://http.dog
Documentation
http.dog
Category
Development
Authentication
Not Required
Geographic Coverage
Global

What You Can Build