TL;DR
Cataas (Cat as a Service) is a delightful API that serves random cat images, GIFs, and videos. You can optionally add custom text captions to any cat image, filter by specific cat tags, and control image dimensions. It's one of the most popular free APIs for adding lightweight fun to web projects, dashboards, or error pages.
Quick start: https://cataas.com/cat — redirects to a random cat image
No API key needed — just make a request!
How to Use This API
1. Random Cat Image
https://cataas.com/cat
Get a random cat image. The URL itself returns the image directly.
2. Cat with Custom Text
https://cataas.com/cat/says/hello%20world
Add any text caption to a random cat image. Text appears overlaid on the image.
3. Cat GIF
https://cataas.com/cat/gif
Returns a random cat GIF instead of a static image.
4. Cat by Tag
https://cataas.com/cat/white
Filter by tag — available tags include colors (white, orange, black), mood (sleepy, playful), and features (fluffy, cute, funny).
5. JavaScript — Random Cat with Message
async function displayRandomCat(tag, message) {
const base = 'https://cataas.com';
const path = tag
? `/cat/${encodeURIComponent(tag)}/says/${encodeURIComponent(message)}`
: `/cat/says/${encodeURIComponent(message)}`;
// Returns a cat image with your message
const img = document.createElement('img');
img.src = `${base}${path}`;
img.alt = 'Random cat';
img.style = 'max-width:400px;border-radius:8px;';
document.body.appendChild(img);
}
displayRandomCat('orange', 'Purrfect!');
// Or just get the URL directly:
console.log('Random cat:', 'https://cataas.com/cat');
console.log('With text:', 'https://cataas.com/cat/sites/Hi');
console.log('GIF:', 'https://cataas.com/cat/gif');
6. Python — Download Cat Images
import requests
import shutil
def download_random_cat(filename='cat.jpg', tag=None, text=None):
url = 'https://cataas.com/cat'
if tag:
url += f'/{tag}'
if text:
url += f'/says/{text}'
with requests.get(url, stream=True) as r:
r.raise_for_status()
with open(filename, 'wb') as f:
shutil.copyfileobj(r.raw, f)
print(f'Saved cat to {filename}')
download_random_cat('my-cat.jpg', 'fluffy', 'Meow!')
https://cataas.com/cat/says/Hi%20there!
Frequently Asked Questions
- What image formats are available?
- JPEG (static cat images) and GIF (animated cats). The default endpoint returns JPEG; add
/giffor animated cats. - Can I control the image size?
- Yes, use query parameters:
?width=300&height=300to specify exact dimensions, or?filter=monofor grayscale. - What tags can I use?
- Common tags: white, black, orange, grey, brown, calico, tabby, fluffy, sleepy, playful, cute, funny, grumpy, kitten, saiamese, persian, bengal, maine-coon.
- Are there usage limits?
- Cataas is free and open with no documented rate limits. It's a hobby project, so be respectful and avoid hammering it with thousands of requests per second.
- Can I get a JSON response instead of an image?
- Yes! Add
?json=trueto get JSON metadata:https://cataas.com/cat?json=truereturns{"url":"/cat/5f9c...","tags":["white"],"created_at":"..."}. - How do I list all available tags?
- Hit
https://cataas.com/api/tags— returns a JSON array of all tag strings.
API Details
- API URL
https://cataas.com- Documentation
- cataas.com
- Category
- Animals
- Authentication
- Not Required
- Geographic Coverage
- Global
What You Can Build
- "Random cat" button for fun personal websites
- Custom 404 error pages with a soothing cat message
- Pet app that generates cat images with user text
- Daily cat image generator for social media bots
- Cat-themed dashboard with tagged cat images per section