BYTETOOLS

Cat Facts API

Free cat facts API with no key. Random feline facts as JSON, with pagination and length filtering. CORS enabled. Tested curl example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 19 Aug 2026

What is the Cat Facts API?

The Cat Facts API is a free, key-free API that returns random facts about cats as JSON. It supports fetching a single fact, paginated lists, and filtering by maximum fact length.

Cat Facts is one of the most-used APIs in beginner tutorials, and it earns the position: the response is a two-field object, the endpoint needs nothing configured, and CORS is enabled so it works straight from browser JavaScript.

Beyond novelty, it is a genuinely convenient fixture for testing pagination. The `/facts` endpoint accepts `limit` and `page` parameters and returns a standard paginated envelope, which makes it useful for exercising list UI, infinite scroll and page controls.

Quick facts

Base URL
https://catfact.ninja
Authentication
No key required.
Rate limit
No published limit.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the Cat Facts API

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

1. Fetch a random cat fact

GET https://catfact.ninja/fact

curl
curl 'https://catfact.ninja/fact'
JavaScript (fetch)
const res = await fetch("https://catfact.ninja/fact");
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://catfact.ninja/fact", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "fact": "In just 7 years, one un-spayed female cat and one un-neutered male cat and their offspring can result in 420,000 kittens.",
  "length": 121
}

Parameters

ParameterTypeRequiredDescription
max_lengthintegerOptionalOnly return facts shorter than this many characters. 100
limitintegerOptionalFacts per page on the /facts endpoint. 10
pageintegerOptionalPage number for paginated results. 2

Response fields

factstring
The cat fact text.
lengthinteger
Character count of the fact.
dataarray
On /facts, the array of facts for the current page.
current_page / last_page / totalinteger
Standard pagination metadata on /facts.

What you can build with the Cat Facts API

  • Build a first fetch tutorial with an instantly visible result
  • Test pagination and infinite scroll against a real paginated API
  • Add a fun fact widget to a pet or veterinary site
  • Practise filtering with query parameters using max_length

Common errors and how to fix them

Empty data array

Requested a page beyond the last one.

Fix: Check `last_page` in the response before requesting further pages.

422

Invalid parameter value, such as a negative limit.

Fix: Keep limit and page positive integers.

Cat Facts API — frequently asked questions

Is the Cat Facts API free?

Yes, completely free with no API key or registration, and CORS is enabled so it works directly from browser JavaScript.

How do I get multiple cat facts at once?

Use the /facts endpoint with `limit` and `page` parameters, which returns a paginated array along with standard pagination metadata.

Can I limit how long each fact is?

Yes, the `max_length` parameter restricts results to facts under a given character count — handy when fitting text into a fixed-size card.

Is there a dog equivalent?

Yes, several. The Dog CEO API serves dog images by breed, and Dog API provides dog facts in a similar format.

Tools that pair with this API

Alternatives to Cat Facts API

If Cat Facts does not fit, these animal 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
Dog CEOFree dog image API with no key: 20,000+ photos across 100+ breeds and sub-breeds, random or filtered. CORS enabled. Tested curl example and live JSON.No keyYes19 Aug 2026
TheCatAPIFree cat image API with breed data, filtering and search. Works without a key for basic use; free key unlocks more. Tested curl example and live JSON.No keyYes19 Aug 2026
RandomFoxFree fox image API with no key. Returns a random fox photo URL as JSON. CORS enabled, minimal payload. Tested curl example and live response included.No keyYes19 Aug 2026
Cataas (Cat as a Service)Free cat image API with no key: random cats, tag filtering, text overlays and on-the-fly resizing, as an image or as JSON metadata. Tested example included.No keyYes21 Aug 2026
HTTP DogFree HTTP status code API with no key: a dog photo for every HTTP status, as JSON metadata or direct images in JPG, WebP and AVIF. Tested example.No keyNo20 Aug 2026
OBISFree marine biodiversity API with no key: 100M+ georeferenced species occurrence records with full taxonomy, depth, date and dataset provenance. Tested example included.No keyYes21 Aug 2026
All Animal APIs

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