TL;DR
Cat Facts delivers a never-ending stream of verified cat facts at the tap of an endpoint. Each call returns a random fact about feline anatomy, behavior, history, or biology in clean JSON. It's absurdly simple — one endpoint, no params, no key — but perfect for adding a dash of whimsy to any app, homepage widget, or command-line tool.
Quick start: https://catfact.ninja/fact
No API key needed — just make a request!
How to Use This API
1. Get a Random Fact
https://catfact.ninja/fact
Returns: {"fact":"A cat's nose is as unique as a human's fingerprint.","length":56}
2. Get Multiple Facts
Use the limit parameter to batch them:
https://catfact.ninja/facts?limit=5
Returns up to 25 facts per page with pagination support.
3. JavaScript — Daily Cat Fact Widget
async function getCatFact() {
const resp = await fetch('https://catfact.ninja/fact');
const data = await resp.json();
return data.fact;
}
getCatFact().then(fact => {
console.log('🐱 Did you know?', fact);
});
// Display in an HTML element
getCatFact().then(fact => {
document.getElementById('cat-fact').textContent = fact;
});
4. Python — CLI Cat Fact Tool
import requests
import json
def random_cat_fact():
resp = requests.get('https://catfact.ninja/fact')
return resp.json()['fact']
def batch_facts(count=5):
resp = requests.get(
'https://catfact.ninja/facts',
params={'limit': count}
)
return [f['fact'] for f in resp.json()['data']]
# Print 3 random facts
for i, fact in enumerate(batch_facts(3), 1):
print(f"Cat Fact #{i}: {fact}")
https://catfact.ninja/fact
Frequently Asked Questions
- How many cat facts are in the database?
- The API has hundreds of curated cat facts covering topics from anatomy (cats have 32 muscles per ear) to history (ancient Egyptians shaved their eyebrows when cats died).
- Can I get facts in other languages?
- The API currently returns facts in English only. There is no language parameter available.
- Does the API support pagination for multiple facts?
- Yes. The
/factsendpoint supportspageandlimit(max 25) parameters. Response includescurrent_page,last_page, andtotalfields. - Are the facts verified for accuracy?
- Yes, the facts are researched and curated. You'll find scientifically accurate information sourced from veterinary journals and feline research.
- Can I use this in a commercial app?
- Yes. The API is free for any use, including commercial applications. No attribution required but always appreciated.
- Are there non-cat facts available?
- No, this API only returns cat facts. For dog facts, check out Dog CEO or Dog API. For general animal facts, try Amazing Endemic Species.
API Details
- API URL
https://catfact.ninja/fact- Documentation
- catfact.ninja
- Category
- Fun
- Authentication
- Not Required
- Geographic Coverage
- Global
What You Can Build
- Browser extension that shows a cat fact on every new tab
- Daily cat fact email or SMS subscription service
- Discord/Slack bot that posts random cat facts on command
- Widget for pet store websites to engage visitors
- Desktop notification app that delivers a fact every hour